[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #10233b;
}

a {
    color: #0f4c81;
    text-decoration: none;
}

.shell-header,
.primary-nav,
.secondary-nav,
.shell-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.shell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: #0f172a;
    color: #fff;
}

.shell-brand a {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.shell-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shell-admin-link {
    border-color: #d97706;
    color: #d97706;
}

.current-user {
    font-size: 0.9rem;
    opacity: 0.85;
}

.profile-chip {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(191, 219, 254, 0.45);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.45) 100%);
    color: #fff;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.profile-chip:hover,
.profile-chip:focus {
    border-color: rgba(147, 197, 253, 0.9);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.55) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    transform: translateY(-1px);
}

.profile-chip-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.profile-chip-meta {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    opacity: 0.78;
    text-transform: uppercase;
}

.session-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.75rem;
}

.session-google-import-form,
.session-google-connect-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.session-google-import-form {
    padding: 0.85rem 1rem;
    border: 1px solid #d7e0eb;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.session-google-import-form .field-block {
    margin: 0;
}

.session-google-date-stack {
    display: grid;
    gap: 0.6rem;
    align-content: start;
    min-width: 11rem;
}

.field-block.session-google-offset-field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    justify-items: start;
    min-width: 0;
}

.field-block.session-google-offset-field label {
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
}

.session-google-date-field {
    min-width: 11rem;
}

.session-google-day-offset-input {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px;
    flex: 0 0 70px;
}

.session-google-connect-shell {
    flex-direction: column;
    align-items: flex-start;
}

.session-google-connect-note {
    margin: 0;
    max-width: 22rem;
}

.session-import-summary-card,
.session-import-review-card,
.session-import-skipped-card {
    gap: 1rem;
}

.session-import-defaults-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.session-import-default-field {
    min-width: 16rem;
}

.session-import-default-toggle {
    min-height: 3.35rem;
    display: flex;
    align-items: center;
}

.session-import-review-table select,
.session-import-review-table textarea,
.session-import-review-table input[type="text"],
.session-import-review-table input[type="time"] {
    min-width: 8rem;
}

.session-import-review-table .session-import-date-field input[type="text"] {
    min-width: 8.5rem;
}

.session-import-review-table .session-import-time-field input[type="text"] {
    min-width: 5.5rem;
}

.session-import-select-field select {
    min-width: 10rem;
}

.session-import-textarea-field textarea {
    min-width: 14rem;
}

.session-import-warning-cell {
    min-width: 16rem;
}

.primary-nav,
.secondary-nav {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #d5dde8;
}

.primary-nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.secondary-nav {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.nav-link,
.subnav-link,
.ghost-button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    border: 1px solid #c8d2df;
    background: #fff;
    color: #10233b;
    cursor: pointer;
    font-size: 0.95rem;
}

.nav-link.is-active,
.subnav-link.is-active {
    background: #0f4c81;
    color: #fff;
    border-color: #0f4c81;
    box-shadow: 0 10px 18px rgba(15, 76, 129, 0.18);
}

.primary-button {
    background: #0f4c81;
    color: #fff;
    border-color: #0f4c81;
}

.danger-button {
    border-color: #b42318;
    color: #b42318;
}

.shell-main {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.card,
.subcard {
    background: #fff;
    border: 1px solid #d7e0eb;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.subcard + .subcard,
.card + .card {
    margin-top: 1rem;
}

.list-page-header-card,
.list-page-content-card {
    display: grid;
    gap: 1rem;
}

.list-page-header-card .list-filter-bar,
.list-page-content-card .list-footer-controls {
    margin-top: 0;
}

.list-page-content-card .table-wrap:first-child,
.list-page-content-card .stack-sections:first-child,
.list-page-content-card .banner:first-child {
    margin-top: 0;
}

.narrow-card {
    max-width: 42rem;
}

.stack-form p,
.stack-sections {
    display: grid;
    gap: 1rem;
}

.stack-sections {
    gap: 1.25rem;
}

.stack-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
    width: 100%;
    border: 1px solid #c8d2df;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    box-sizing: border-box;
    font: inherit;
}

.stack-form input:not([type="checkbox"]):not([type="radio"]),
.stack-form select {
    max-width: 24rem;
}

.stack-form textarea {
    max-width: none;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.7rem;
    border-bottom: 1px solid #e4ebf2;
    text-align: left;
    vertical-align: top;
}

.localization-table {
    table-layout: fixed;
    min-width: 104rem;
}

.localization-table th,
.localization-table td {
    padding: 0.45rem 0.55rem;
}

.localization-col-group {
    width: 8rem;
}

.localization-col-key {
    width: 14rem;
}

.localization-col-source {
    width: 16rem;
}

.localization-col-current {
    width: 26rem;
}

.localization-col-actions {
    width: 7.5rem;
}

.localization-key {
    display: inline-block;
    white-space: normal;
    word-break: break-word;
}

.localization-source-text {
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.localization-textarea {
    width: 100%;
    min-width: 24rem;
    min-height: 7.5rem;
    border: 1px solid #c8d2df;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    box-sizing: border-box;
    background: #fff;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
}

.field-block {
    display: grid;
    gap: 0.35rem;
    position: relative;
}

.field-block input,
.field-block select,
.field-block textarea,
.inline-search-form input {
    width: 100%;
    border: 1px solid #c8d2df;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    box-sizing: border-box;
    background: #fff;
    font: inherit;
}

.field-block label {
    font-weight: 600;
}

.row-space {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    flex-wrap: wrap;
}

.row-actions,
.settings-default-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.report-card-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
    align-items: baseline;
    margin-bottom: 1rem;
}

.report-card-heading h2,
.report-card-note {
    margin: 0;
}

.report-card-note-right {
    margin-left: auto;
    text-align: right;
}

.settings-inline-confirm {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: end;
}

.settings-inline-confirm label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

.settings-inline-confirm input {
    width: 8rem;
}

.required-marker {
    color: #dc2626;
    margin-left: 0.2rem;
    font-weight: 700;
}

.form-grid,
.lookup-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: start;
    align-items: start;
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.request-form-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: flex-start;
}

.request-form-grid > .field-block {
    min-width: 0;
    max-width: none;
    width: auto;
}

.request-form-staff-status-field {
    flex: 0 0 9rem;
}

.request-form-psychologist-field {
    flex: 1 1 18rem;
}

.request-form-client-field {
    flex: 1.15 1 20rem;
}

.request-form-date-field {
    flex: 0 0 13rem;
}

.request-form-date-field .date-picker-input-group {
    width: 13rem;
    min-width: 13rem;
    max-width: 13rem;
}

.request-form-date-field .date-picker-input-group input[type="text"] {
    min-width: 8.25rem;
}

.request-form-status-field {
    flex: 0 0 10rem;
}

.request-active-field {
    flex: 0 0 auto;
    min-width: max-content;
}

.request-priority-hint {
    margin: 0;
}

.request-priority-reorder-cell {
    white-space: nowrap;
}

.request-priority-reorder-actions {
    display: grid;
    grid-template-columns: repeat(2, 2rem);
    gap: 0.45rem;
    align-items: center;
    justify-content: start;
}

.request-priority-slot {
    min-width: 2rem;
    display: flex;
}

.request-priority-slot-up {
    justify-content: flex-start;
}

.request-priority-slot-down {
    justify-content: flex-end;
}

.request-priority-button {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.request-priority-button-down {
    background: #ffffff;
    color: #0f4c81;
    border-color: #0f4c81;
    box-shadow: none;
}

.request-priority-button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.request-row-band-base td {
    background: #ffffff;
}

.request-row-band-alt td {
    background: #e6f0fb;
}

.payment-page,
.payment-form-shell,
.payment-form-card {
    min-width: 0;
}

.assignment-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: start;
}

.assignment-grid > .field-block {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.assignment-grid > .assignment-psychologist-field {
    flex: 0.9 0.9 0;
}

.assignment-grid > .assignment-status-filter {
    flex: 0.6 0.6 0;
}

.assignment-grid > .assignment-category-field {
    flex: 0.5 0.5 0;
}

.assignment-grid > .assignment-diagnosis-field {
    flex: 0.75 0.75 0;
}

.assignment-grid > .assignment-date-field {
    flex: 0 0 13.25rem;
    max-width: 13.25rem;
}

.assignment-grid > .assignment-date-field input {
    width: 100%;
    max-width: 13.25rem;
}

.assignment-grid > .assignment-date-field label {
    white-space: nowrap;
}

.payment-form-grid {
    display: grid;
    gap: 0.75rem;
    width: max(100%, 72rem);
    min-width: 72rem;
    grid-template-columns:
        minmax(7.5rem, 0.72fr)
        minmax(6.5rem, 0.6fr)
        minmax(6.5rem, 0.55fr)
        minmax(5.5rem, 0.45fr)
        minmax(7.25rem, 0.8fr)
        minmax(8.25rem, 1.05fr)
        minmax(7.25rem, 0.78fr)
        minmax(7.75rem, 0.8fr)
        minmax(8.25rem, 1.05fr)
        minmax(4.75rem, 0.48fr);
    align-items: start;
}

.payment-form-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.35rem;
}

.payment-field-compact {
    min-width: 0;
}

.payment-field-code {
    min-width: 0;
}

.payment-field-description {
    min-width: 0;
}

.payment-field-party {
    min-width: 0;
}

.payment-field-staff-status {
    min-width: 0;
}

.payment-field-toggle {
    min-width: 0;
}

.payment-field-staff-status select {
    min-height: 6rem;
}

.payment-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.75rem;
}

.payment-import-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.payment-import-template-field {
    min-width: 11rem;
}

.payment-import-page {
    display: grid;
    gap: 1rem;
}

.payment-import-skipped-wrap,
.payment-import-review-wrap {
    overflow-x: auto;
}

.payment-import-defaults-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: start;
    justify-content: flex-start;
}

.payment-import-default-field {
    width: max-content;
    min-width: 0;
}

.payment-import-default-field select {
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.payment-import-review-card h2,
.payment-import-skipped-card h2 {
    margin: 0;
}

.payment-import-review-table {
    width: max(100%, 128rem);
}

.payment-import-skipped-table {
    width: max(100%, 88rem);
}

.payment-import-review-table td,
.payment-import-review-table th,
.payment-import-skipped-table td,
.payment-import-skipped-table th {
    vertical-align: top;
}

.payment-import-toggle-cell {
    white-space: nowrap;
    text-align: center;
}

.payment-inline-toggle {
    justify-content: flex-start;
}

.payment-import-field {
    min-width: 0;
}

.payment-import-field input,
.payment-import-field select,
.payment-import-field textarea {
    min-width: 8rem;
}

.payment-import-date-field .date-picker-input-group {
    min-width: 14rem;
}

.payment-import-date-field .date-picker-input-group input[type="text"] {
    min-width: 10rem;
}

.payment-import-amount-field input {
    min-width: 8rem;
}

.payment-import-code-field input {
    min-width: 10.5rem;
}

.payment-import-textarea-field textarea {
    min-width: 14rem;
    min-height: 4.75rem;
}

.payment-import-description-field textarea {
    min-width: 24rem;
}

.payment-import-notes-field textarea {
    min-width: 11rem;
}

.payment-import-psychologist-field input[type="text"] {
    min-width: 12rem;
}

.payment-import-client-field input[type="text"] {
    min-width: 18rem;
}

.payment-import-method-field select {
    min-width: 11rem;
}

.payment-import-kind-field select {
    min-width: 8.5rem;
}

.payment-import-payer-cell {
    min-width: 11rem;
    white-space: normal;
}

.payment-import-warning-cell {
    min-width: 13rem;
    white-space: normal;
}

.payment-row-inactive {
    background: #f8fafc;
    color: #526479;
}

.operations-payment-requests-grid {
    grid-template-columns:
        max-content
        minmax(10rem, 1.2fr)
        max-content
        minmax(9rem, 0.95fr)
        max-content
        minmax(7rem, 0.8fr)
        minmax(7rem, 0.8fr);
    align-items: start;
}

.operations-payment-requests-grid > .field-block,
.operations-payment-requests-grid > .inline-toggle,
.operations-general-grid > .field-block,
.operations-general-grid > .inline-toggle,
.recipient-account-form-grid > .field-block {
    max-width: none;
    width: 100%;
}

.operations-payment-requests-grid > .list-toggle {
    align-self: start;
}

.operations-payment-requests-prefix-grid {
    grid-template-columns: max-content minmax(12rem, 1fr);
    gap: 0.85rem;
    align-items: start;
    margin-top: 0.85rem;
}

.operations-payment-requests-prefix-grid > .field-block,
.operations-payment-requests-prefix-grid > .inline-toggle {
    max-width: none;
    width: 100%;
}

.operations-sessions-grid > .field-block,
.operations-sessions-grid > .inline-toggle {
    max-width: none;
    width: 100%;
}

.settings-policy-input {
    width: 100%;
    border: 1px solid #c8d2df;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    box-sizing: border-box;
    background: #fff;
    font: inherit;
}

.settings-policy-input:disabled {
    background: #f4f7fb;
    color: #68778c;
}

.recipient-account-form-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    align-items: start;
}

.admin-dialog {
    width: min(48rem, calc(100vw - 2rem));
    border: 1px solid #d7e0eb;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.22);
}

.admin-dialog::backdrop {
    background: rgba(15, 23, 42, 0.38);
}

.admin-dialog-close-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.admin-tree {
    display: grid;
    gap: 0.75rem;
}

.admin-tree-node {
    display: grid;
    gap: 0.5rem;
}

.admin-tree-children {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.25rem;
}

.admin-danger-banner {
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    border: 2px solid #e11d48;
    color: #881337;
    box-shadow: 0 14px 28px rgba(190, 24, 93, 0.16);
}

.admin-danger-banner.is-muted {
    opacity: 0.55;
}

.admin-option-panel {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d7e0eb;
    border-radius: 0.85rem;
    background: #f8fbff;
}

.admin-option-help {
    margin: 0;
    color: #54657a;
    font-size: 0.9rem;
}

.admin-import-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem 1rem;
}

.admin-import-toolbar__field {
    min-width: 0;
    margin: 0;
}

.admin-import-toolbar__field-workbook {
    flex: 1.4 1 18rem;
}

.admin-import-toolbar__field-psychologist {
    flex: 1 1 13rem;
}

.admin-import-toolbar__field-payment {
    flex: 1 1 13rem;
}

.admin-import-toolbar__field-date {
    flex: 0 1 11rem;
}

.admin-import-toolbar__toggles {
    display: flex;
    flex: 3 1 28rem;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border: 1px solid #d7e0eb;
    border-radius: 0.85rem;
    background: #f8fbff;
}

.admin-import-toolbar__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
}

.locked-toggle {
    opacity: 0.7;
}

.recipient-account-form-grid textarea {
    min-height: 6.75rem;
}

.reference-data-form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.reference-data-form-row > .field-block {
    flex: 1 1 0;
    max-width: none;
    width: 100%;
}

.reference-data-row-trigger {
    cursor: pointer;
    transition: background 120ms ease;
}

.reference-data-row-trigger:hover,
.reference-data-row-trigger:focus {
    background: #f8fbff;
    outline: none;
}

.reference-inline-editor-row td {
    padding: 0;
    background: #f8fbff;
}

.reference-inline-editor-row.request-row-band-base td {
    background: #ffffff;
}

.reference-inline-editor-row.request-row-band-alt td {
    background: #e6f0fb;
}

.reference-inline-editor-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #d7e0eb;
}

.reference-inline-editor-shell h3 {
    margin: 0;
}

.reference-inline-bank-grid textarea {
    min-height: 6.75rem;
}

.lookup-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid > .field-block,
.form-grid-2 > .field-block,
.form-grid-3 > .field-block,
.form-grid-4 > .field-block,
.form-grid-5 > .field-block,
.payment-form-grid > .field-block,
.lookup-grid > .field-block {
    width: 100%;
}

.form-grid > .field-block:not(.field-span-2):not(.field-span-3),
.form-grid-2 > .field-block:not(.field-span-2):not(.field-span-3),
.form-grid-3 > .field-block:not(.field-span-2):not(.field-span-3),
.form-grid-4 > .field-block:not(.field-span-2):not(.field-span-3),
.form-grid-5 > .field-block:not(.field-span-2):not(.field-span-3) {
    max-width: 20rem;
}

.payment-form-grid > .field-block {
    max-width: none;
}

.lookup-grid > .field-block {
    max-width: 18rem;
}

.field-span-all {
    grid-column: 1 / -1;
}

.field-span-2 {
    grid-column: span 2;
}

.field-span-3 {
    grid-column: span 3;
}

.readonly-input {
    background: #f4f7fb;
    color: #334155;
}

.checkbox-stack,
.checkbox-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-items: start;
    gap: 0.45rem;
}

.checkbox-stack label {
    margin-bottom: 0;
}

.checkbox-stack .field-errors,
.checkbox-stack .field-help,
.checkbox-field .field-errors,
.checkbox-field .field-help {
    flex-basis: 100%;
}

.checkbox-stack input,
.checkbox-field input {
    width: auto;
    margin: 0;
}

.client-identity-row,
.staff-identity-row,
.contact-entry-row,
.staff-role-row,
.notes-grid,
.contact-panel-grid {
    display: grid;
    gap: 1rem;
}

.client-identity-row,
.staff-identity-row,
.contact-panel-grid,
.notes-grid {
    align-items: start;
}

.contact-entry-row,
.staff-role-row {
    align-items: end;
}

.client-identity-row {
    grid-template-columns:
        minmax(12rem, 1.8fr)
        minmax(8rem, 0.9fr)
        minmax(8rem, 0.9fr)
        minmax(10rem, 1.1fr)
        minmax(10rem, 1.1fr)
        minmax(16rem, 2fr)
        max-content;
}

.staff-identity-row {
    grid-template-columns:
        minmax(12rem, 1.8fr)
        minmax(8rem, 0.95fr)
        minmax(8rem, 0.95fr)
        minmax(10rem, 1.1fr)
        minmax(16rem, 2fr);
}

.contact-entry-row-phone {
    grid-template-columns:
        minmax(5.75rem, 0.9fr)
        minmax(5rem, 0.8fr)
        max-content
        minmax(5.75rem, 0.9fr)
        minmax(5rem, 0.8fr)
        max-content;
}

.contact-entry-row-email {
    grid-template-columns:
        minmax(9rem, 1fr)
        max-content
        minmax(9rem, 1fr)
        max-content;
}

.contact-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-role-row {
    grid-template-columns:
        minmax(9rem, 1fr)
        minmax(10rem, 1fr)
        minmax(8rem, 0.9fr)
        minmax(8rem, 0.9fr)
        minmax(14rem, 1.3fr)
        max-content;
}

.staff-role-row-extended {
    grid-template-columns:
        minmax(9rem, 1fr)
        minmax(10rem, 1fr)
        minmax(8rem, 0.9fr)
        minmax(8rem, 0.9fr)
        minmax(14rem, 1.3fr)
        minmax(9rem, 0.95fr)
        minmax(10rem, 1fr)
        max-content;
}

.notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-identity-row > .field-block,
.staff-identity-row > .field-block,
.contact-entry-row > .field-block,
.staff-role-row > .field-block,
.notes-grid > .field-block {
    width: 100%;
    max-width: none;
}

.identity-address-field textarea {
    min-height: 3.35rem;
}

.identity-inline-toggle-field {
    align-content: start;
}

.field-label-spacer {
    display: block;
    min-height: 1.35rem;
}

.identity-inline-toggle {
    min-height: 3.35rem;
    align-items: center;
}

.align-bottom-checkbox {
    align-self: end;
}

.align-top-checkbox {
    align-self: start;
}

.align-bottom-checkbox.checkbox-stack,
.align-bottom-checkbox.checkbox-field {
    min-height: 3.35rem;
    align-items: center;
}

.align-top-checkbox.checkbox-stack,
.align-top-checkbox.checkbox-field {
    min-height: auto;
    align-items: flex-start;
    align-content: flex-start;
}

.party-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.party-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.field-errors,
.errorlist {
    color: #9f1239;
    font-size: 0.92rem;
}

.field-errors ul,
.errorlist {
    margin: 0;
    padding-left: 1.15rem;
}

.table-wrap {
    overflow-x: auto;
}

.report-fit-table {
    width: auto;
    min-width: 0;
    display: inline-table;
}

.dense-table th,
.dense-table td {
    white-space: nowrap;
}

.dense-table td:last-child,
.dense-table th:last-child {
    white-space: normal;
}

.dense-table th.payment-request-national-id-column,
.dense-table td.payment-request-national-id-column,
.dense-table th.payment-request-address-column,
.dense-table td.payment-request-address-column {
    min-width: 20rem;
    max-width: 20rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.autocomplete-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid #c8d2df;
    border-radius: 0.8rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    display: grid;
    overflow: hidden;
}

.autocomplete-item {
    text-align: left;
    padding: 0.75rem 0.85rem;
    border: 0;
    background: #fff;
    cursor: pointer;
}

.autocomplete-item + .autocomplete-item {
    border-top: 1px solid #e4ebf2;
}

.autocomplete-item:hover {
    background: #eef6ff;
}

.row-space,
.row-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.form-record-header {
    align-items: flex-start;
}

.form-record-meta {
    margin-top: 0.6rem;
}

.form-record-nav {
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.rate-form-header-actions {
    justify-content: flex-end;
}

.record-nav-button,
.rate-nav-button {
    min-width: 2.2rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.rate-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns:
        minmax(13rem, 1.45fr)
        minmax(10rem, 1fr)
        minmax(10rem, 1fr)
        minmax(10rem, 1fr)
        minmax(11rem, 1fr)
        max-content
        minmax(9.5rem, 0.95fr)
        minmax(12rem, 1fr)
        minmax(12rem, 1fr)
        minmax(8rem, 0.8fr)
        max-content;
    align-items: start;
}

.rate-form-grid > .field-block {
    max-width: none;
    min-width: 0;
}

.rate-date-field {
    min-width: 12rem;
}

.rate-date-field .date-picker-input-group {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.rate-date-field .date-picker-input-group input[type="text"] {
    min-width: 9rem;
}

.rate-internal-field {
    min-width: 0;
    align-content: start;
    width: fit-content;
    max-width: 6.5rem;
    justify-self: start;
}

.rate-price-field {
    min-width: 8rem;
}

.rate-price-input {
    width: 100% !important;
    min-width: 8rem !important;
    max-width: none;
}

.rate-active-field {
    min-width: max-content;
    align-self: end;
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-status {
    color: #54657a;
    font-weight: 600;
}

.pagination-jump-form {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin: 0;
}

.pagination-jump-input {
    width: 4.25rem;
    min-width: 4.25rem;
    border: 1px solid #c8d2df;
    border-radius: 0.65rem;
    padding: 0.55rem 0.7rem;
    box-sizing: border-box;
    background: #fff;
    font: inherit;
    line-height: 1.2;
}

.pagination-arrow {
    min-width: 2.7rem;
    padding-inline: 0.85rem;
}

.shortcut-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.shortcut-card {
    display: grid;
    gap: 0.5rem;
    flex: 0 1 18rem;
    padding: 1rem;
    border-radius: 0.9rem;
    border: 1px solid #d7e0eb;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.shortcut-card:hover {
    transform: translateY(-1px);
    border-color: #a9bfd7;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.shortcut-links {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.shortcut-links li {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #24537d;
    font-size: 0.85rem;
}

.dashboard-section-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-section-card {
    gap: 0.85rem;
}

.dashboard-section-header {
    align-items: baseline;
}

.dashboard-section-link {
    font-size: 1.05rem;
    font-weight: 700;
}

.dashboard-shortcut-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.15rem;
}

.dashboard-destination-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid #d7e0eb;
    background: #f8fbff;
    font-weight: 600;
}

.dashboard-destination-card:hover {
    border-color: #a9bfd7;
    background: #eef6ff;
}

.muted {
    color: #54657a;
}

.field-help {
    margin: 0;
}

.banner {
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.info-banner {
    background: #eef6ff;
    border: 1px solid #cfe0f3;
}

.warning-banner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.action-divider {
    color: #94a3b8;
    margin: 0 0.35rem;
}

.payment-request-document {
    display: grid;
    gap: 1rem;
}

.payment-request-title {
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.document-grid {
    display: grid;
    gap: 1rem;
}

.document-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.document-panel {
    border: 1px solid #d7e0eb;
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.document-panel h3 {
    margin-top: 0;
    margin-bottom: 0.85rem;
    font-size: 1rem;
}

.document-facts {
    margin: 0;
    display: grid;
    gap: 0.7rem;
}

.document-facts div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
}

.document-facts dt {
    font-weight: 700;
}

.document-facts dd {
    margin: 0;
}

.document-amount-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.document-amount-layout .document-facts {
    flex: 1 1 180px;
}

.payment-request-recipient-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 0.85rem;
}

.payment-request-recipient-caution {
    flex: 1 1 180px;
    display: grid;
    gap: 0.25rem;
}

.payment-request-recipient-caution-label {
    font-weight: 700;
}

.payment-request-qr-block {
    display: grid;
    justify-items: end;
    align-content: start;
    margin-left: auto;
    flex: 0 0 130px;
}

.payment-request-qr-block[hidden] {
    display: none;
}

.payment-request-qr-image {
    width: 130px;
    height: 130px;
    display: block;
}

.payment-request-ledger th,
.payment-request-ledger td {
    font-size: 0.9rem;
}

.data-table th.number-cell,
.data-table td.number-cell,
.number-cell {
    text-align: right;
}

.data-table th.percentage-cell,
.data-table td.percentage-cell,
.percentage-cell {
    text-align: right;
    color: #4b5563;
    font-style: italic;
}

.report-total-row td {
    font-weight: 700;
}

.report-subtotal-row td {
    font-weight: 700;
}

.report-heat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 3.2rem;
    max-width: 100%;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: right;
}

.report-heat-badge.missing-field-badge {
    display: block;
    width: 1.6rem;
    min-width: 1.6rem;
    height: 0.8rem;
    min-height: 0.8rem;
    padding: 0;
    margin-inline: auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    box-shadow: inset 0 0 0 1px rgba(153, 27, 27, 0.14);
    vertical-align: middle;
}

.report-heat-band-0 {
    background: #ffffff;
    color: #10233b;
}

.report-heat-band-1 {
    background: #ecfdf3;
    color: #166534;
}

.report-heat-band-2 {
    background: #bbf7d0;
    color: #166534;
}

.report-heat-band-3 {
    background: #4ade80;
    color: #ffffff;
}

.report-heat-band-4 {
    background: #15803d;
    color: #ffffff;
}

.report-heat-band-neutral {
    background: #ffffff;
    color: #10233b;
}

.report-heat-band-green-0 {
    background: #ecfdf3;
    color: #166534;
}

.report-heat-band-green-1 {
    background: #d1fae5;
    color: #166534;
}

.report-heat-band-green-2 {
    background: #86efac;
    color: #166534;
}

.report-heat-band-green-3 {
    background: #22c55e;
    color: #ffffff;
}

.report-heat-band-green-4 {
    background: #15803d;
    color: #ffffff;
}

.report-heat-band-red-0 {
    background: #fee2e2;
    color: #991b1b;
}

.report-heat-band-red-1 {
    background: #fecaca;
    color: #991b1b;
}

.report-heat-band-red-2 {
    background: #fca5a5;
    color: #991b1b;
}

.report-heat-band-red-3 {
    background: #ef4444;
    color: #ffffff;
}

.report-heat-band-red-4 {
    background: #b91c1c;
    color: #ffffff;
}

.report-heat-band-yellow-0 {
    background: #fef9c3;
    color: #713f12;
}

.report-heat-band-yellow-1 {
    background: #fde68a;
    color: #713f12;
}

.report-heat-band-yellow-2 {
    background: #facc15;
    color: #713f12;
}

.report-heat-band-yellow-3 {
    background: #eab308;
    color: #ffffff;
}

.report-heat-band-yellow-4 {
    background: #ca8a04;
    color: #ffffff;
}

.report-heat-band-purple-0 {
    background: #f3e8ff;
    color: #6b21a8;
}

.report-heat-band-purple-1 {
    background: #e9d5ff;
    color: #6b21a8;
}

.report-heat-band-purple-2 {
    background: #d8b4fe;
    color: #6b21a8;
}

.report-heat-band-purple-3 {
    background: #a855f7;
    color: #ffffff;
}

.report-heat-band-purple-4 {
    background: #7e22ce;
    color: #ffffff;
}

.report-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.report-sort-link:hover,
.report-sort-link:focus {
    text-decoration: underline;
}

.report-sort-link.is-active {
    font-weight: 700;
}

.report-sort-indicator {
    font-size: 0.85em;
}

.session-nav-button {
    min-width: 2.25rem;
    text-align: center;
}

.ghost-button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.report-card-grid {
    display: grid;
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
}

.report-card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-card-flow {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: flex-start;
}

.report-results-stack {
    margin-top: 1.5rem;
}

.report-breakdown-card {
    margin-top: 1.5rem;
}

.report-table-separator {
    margin: 1rem 0 0.9rem;
    border-top: 1px solid #d7dee8;
}

.report-breakdown-card-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
}

.report-breakdown-card-section {
    min-width: 0;
}

.report-table-separator-vertical {
    margin: 0;
    align-self: stretch;
    border-top: 0;
    border-left: 1px solid #d7dee8;
}

.report-table-section-heading {
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d7dee8;
    border-radius: 0.5rem;
    background: #f4f6f9;
    color: #18324a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.report-card-flow > .report-grid-card + .report-grid-card {
    margin-top: 0;
}

.report-card-flow-4 > .report-grid-card {
    width: fit-content;
    max-width: calc((100% - 3rem) / 4);
    min-width: min(100%, 14rem);
    flex: 0 1 auto;
}

.report-card-flow-2 > .report-grid-card {
    width: fit-content;
    max-width: calc((100% - 1rem) / 2);
    min-width: min(100%, 24rem);
    flex: 1 1 0;
}

.report-card-flow-3 > .report-grid-card {
    width: fit-content;
    max-width: calc((100% - 2rem) / 3);
    min-width: min(100%, 20rem);
    flex: 0 1 auto;
}

@media (max-width: 900px) {
    .report-breakdown-card-sections {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 1rem;
    }

    .report-table-separator-vertical {
        width: 100%;
        border-left: 0;
        border-top: 1px solid #d7dee8;
    }
}

.report-grid-card {
    align-self: start;
    max-width: 100%;
}

.report-grid-card .table-wrap {
    max-width: 100%;
}

.report-level-builder {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.report-level-select {
    min-width: 16rem;
    flex: 1 1 16rem;
}

.report-level-select select {
    min-height: 10rem;
}

.report-level-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
}

.report-level-submit-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-self: flex-end;
}

.report-toggle-stack {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    min-width: 12rem;
}

.payment-request-preview-stack {
    display: grid;
    gap: 1rem;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: #e9f3ff;
    border: 1px solid #c7defc;
    color: #0f3d66;
    font-weight: 600;
}

.message.error {
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #fda4af;
    color: #9f1239;
    box-shadow: 0 10px 24px rgba(159, 18, 57, 0.12);
}

.message.warning {
    background: linear-gradient(180deg, #fff8eb 0%, #ffedd5 100%);
    border-color: #fdba74;
    color: #9a3412;
}

.message.success {
    background: linear-gradient(180deg, #ecfdf3 0%, #dcfce7 100%);
    border-color: #86efac;
    color: #166534;
}

.message.info {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
}

.split-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tri-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e4ebf2;
    border-radius: 0.85rem;
    background: #fbfdff;
}

.section-heading h3,
.contact-panel h3 {
    margin: 0;
}

.compact-stack {
    gap: 0.75rem;
}

.inline-form-row {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px solid #e4ebf2;
    border-radius: 0.85rem;
    background: #fff;
}

.inline-form-row-2 {
    grid-template-columns: minmax(0, 1fr) auto;
}

.inline-form-row-3 {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
}

.inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.inline-toggle input {
    width: auto;
    margin: 0;
}

.record-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #cfe0f3;
    color: #24537d;
    font-weight: 600;
}

.status-note {
    font-size: 0.85rem;
}

.boolean-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
}

.boolean-badge.is-yes {
    background: #e8f7ee;
    color: #166534;
}

.boolean-badge.is-no {
    background: #fef2f2;
    color: #991b1b;
}

.attachment-list {
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d7e0eb;
    border-radius: 0.8rem;
    background: #fbfdff;
}

.attachment-summary {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.attachment-meta {
    color: #54657a;
    font-size: 0.9rem;
}

.attachment-delete-button {
    flex: 0 0 auto;
}

.inline-search-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.inline-search-form input {
    flex: 0 1 26rem;
}

.inline-search-form .ghost-button {
    flex: 0 0 auto;
}

.candidate-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.candidate-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d7e0eb;
    border-radius: 0.85rem;
    background: #fff;
}

.candidate-card:hover {
    border-color: #a9bfd7;
    background: #f8fbff;
}

.table-note {
    color: #54657a;
    font-size: 0.9rem;
}

.list-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: end;
    margin: 1rem 0;
}

.list-filter-bar .field-block {
    flex: 0 1 14rem;
    max-width: 16rem;
}

.list-multiselect-field {
    flex-basis: 15rem;
    max-width: 18rem;
}

.list-multiselect-field select,
.assignment-status-filter select {
    min-height: 6rem;
}

.list-filter-bar-wide .field-block {
    max-width: 18rem;
}

.list-filter-bar .field-block.session-staff-status-field {
    flex: 0 0 8.5rem;
    max-width: 8.5rem;
}

.list-filter-bar .field-block.session-state-field {
    flex: 0 0 9.5rem;
    max-width: 9.5rem;
}

.list-filter-bar .field-block.session-date-field {
    flex: 0 0 12.75rem;
    max-width: 12.75rem;
}

.list-filter-bar .field-block.session-client-status-field {
    flex: 0 0 10.5rem;
    max-width: 10.5rem;
}

.list-filter-bar .field-block.report-internal-filter-field,
.list-filter-bar .field-block.directory-internal-filter-field,
.list-filter-bar .field-block.rate-internal-filter-field {
    flex: 0 0 auto;
    width: fit-content;
    min-width: 6.35rem;
    max-width: 6.5rem;
}

.list-filter-bar .field-block.payment-client-field,
.list-filter-bar .field-block.session-client-field {
    flex: 0 0 15rem;
    max-width: 15rem;
}

.list-filter-bar .field-block.payment-kind-field {
    flex: 0 0 9rem;
    max-width: 9rem;
}

.list-filter-bar .field-block.payment-staff-status-field {
    flex: 0 0 8.5rem;
    max-width: 8.5rem;
}

.list-filter-bar .field-block.payment-method-field {
    flex: 0 0 9rem;
    max-width: 9rem;
}

.list-filter-bar .field-block.payment-date-field {
    flex: 0 0 12.75rem;
    max-width: 12.75rem;
}

.list-filter-bar .field-block.payment-client-status-field {
    flex: 0 0 10.5rem;
    max-width: 10.5rem;
}

.list-filter-bar .field-block.payment-request-undue-field {
    flex: 0 0 10rem;
    min-width: 10rem;
    max-width: 10rem;
}

.list-filter-bar .field-block.payment-request-undue-field label {
    white-space: nowrap;
}

.list-filter-bar .field-block.payment-request-undue-field input {
    width: 100%;
    min-width: 0;
}

.list-toggle {
    flex: 0 0 auto;
    align-self: flex-end;
}

.filter-reset-link {
    flex: 0 0 auto;
    align-self: flex-end;
}

.date-picker-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    position: relative;
}

.date-picker-input-group input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
}

.date-picker-button {
    flex: 0 0 auto;
}

.date-picker-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.checkbox-column {
    width: 2.8rem;
}

.table-actions {
    white-space: nowrap;
}

.payment-request-export-repeat {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e4ebf2;
    justify-content: flex-end;
}

#payment-request-export-button:disabled {
    background: #eef3f8;
    border-color: #d0dae6;
    color: #526479;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.75;
}

.payment-request-selection-messages {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.list-footer-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: end;
    gap: 0.9rem;
    margin-top: 1rem;
}

.list-footer-page-size {
    flex: 0 0 auto;
    min-width: 5rem;
}

.list-footer-page-size label {
    margin-bottom: 0.25rem;
}

.list-footer-page-size select {
    width: 5rem;
    min-width: 5rem;
    max-width: 5rem;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0f4c81;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.session-list-table th {
    white-space: normal;
}

.table-header-stack {
    display: inline-grid;
    gap: 0.08rem;
    line-height: 1.1;
    white-space: normal;
}

.quick-panel-shell {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 20;
}

.quick-panel-card {
    width: min(72rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #d7e0eb;
    padding: 1.25rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.quick-panel-header h2 {
    margin: 0;
}

.quick-panel-sections {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.quick-panel-section-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #d7e0eb;
    border-radius: 0.9rem;
    background: #fbfdff;
}

.quick-panel-section-card h3 {
    margin: 0 0 0.85rem;
}

.quick-panel-list {
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.quick-panel-list div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.25rem 0.75rem;
    min-width: 0;
}

.quick-panel-list dt {
    font-weight: 700;
}

.quick-panel-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.session-client-lookup-grid,
.session-details-row,
.session-notes-grid {
    display: grid;
    gap: 1rem;
}

.session-client-lookup-grid {
    grid-template-columns:
        minmax(12rem, 1.15fr)
        minmax(6.5rem, 0.65fr)
        minmax(14rem, 1.35fr)
        minmax(7rem, 0.7fr)
        minmax(10rem, 0.95fr)
        minmax(10rem, 0.95fr)
        minmax(9rem, 0.85fr)
        minmax(6.35rem, max-content)
        minmax(18rem, 1.3fr);
}

.session-client-status-filter select {
    min-height: 6rem;
}

.session-client-autofill-field {
    align-content: end;
}

.session-client-internal-field {
    min-width: 0;
}

.directory-client-toggle-roles-field {
    width: fit-content;
    max-width: 100%;
}

.session-details-stack {
    display: grid;
    gap: 1rem;
}

.session-details-row-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.session-details-row-rate {
    grid-template-columns:
        minmax(0, 2.2fr)
        repeat(5, minmax(0, 1fr));
}

.session-details-row > .field-block,
.session-notes-grid > .field-block,
.session-client-lookup-grid > .field-block {
    width: 100%;
    max-width: none;
}

.session-client-lookup-grid > .field-block.session-client-internal-field {
    width: fit-content;
    max-width: 6.5rem;
    justify-self: start;
}

.session-client-internal-field input {
    min-width: 0;
}

.session-notes-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.session-rate-picker-control {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.session-rate-picker-control .readonly-input {
    flex: 1 1 auto;
    min-width: 0;
}

.session-rate-picker-control .ghost-button {
    flex: 0 0 auto;
}

.session-rate-picker-card {
    width: min(92rem, 100%);
}

#session-form .readonly-input,
#session-form :is(input, select, textarea):disabled {
    background: #eef3f8;
    border-color: #d0dae6;
    color: #526479;
}

#session-form :is(input, select, textarea):disabled {
    cursor: not-allowed;
}

.rate-picker-diagnostic-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.45rem;
}

.rate-picker-diagnostic-item.is-blocking {
    color: #991b1b;
    font-weight: 700;
}

.rate-picker-diagnostic-item.is-matched {
    color: #166534;
}

.rate-picker-diagnostic-item.is-not-applied {
    color: #54657a;
}

@media (max-width: 720px) {
    .shell-header,
    .row-space,
    .row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid,
    .lookup-grid,
    .rate-form-grid,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4,
    .form-grid-5,
    .client-identity-row,
    .staff-identity-row,
    .contact-entry-row,
    .contact-panel-grid,
    .staff-role-row,
    .staff-role-row-extended,
    .notes-grid,
    .party-card-grid,
    .split-panel,
    .tri-panel,
    .inline-form-row-2,
    .inline-form-row-3,
    .session-client-lookup-grid,
    .session-details-row,
    .session-notes-grid,
    .report-card-grid-4,
    .report-card-grid-3 {
        grid-template-columns: 1fr;
    }

    .report-card-flow-4 > .report-grid-card,
    .report-card-flow-3 > .report-grid-card,
    .report-card-flow-2 > .report-grid-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .report-card-flow {
        flex-wrap: wrap;
    }

    .assignment-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-import-toolbar {
        align-items: stretch;
    }

    .admin-import-toolbar__field,
    .admin-import-toolbar__toggles,
    .admin-import-toolbar__actions {
        flex: 1 1 100%;
    }

    .request-form-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .request-form-staff-status-field,
    .request-form-psychologist-field,
    .request-form-client-field,
    .request-form-date-field,
    .request-form-status-field,
    .request-active-field {
        flex: initial;
    }

    .request-form-date-field .date-picker-input-group {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .rate-form-grid {
        grid-template-columns: 1fr;
    }

    .rate-date-field .date-picker-input-group,
    .rate-price-input {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .reference-data-form-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .payment-import-defaults-row,
    .payment-header-actions,
    .payment-import-upload-form {
        justify-content: stretch;
        align-items: stretch;
    }

    .payment-import-defaults-row {
        flex-direction: column;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .field-span-3 {
        grid-column: auto;
    }

    .inline-search-form {
        flex-direction: column;
    }

    .attachment-item {
        flex-direction: column;
        align-items: stretch;
    }

    .list-filter-bar .field-block,
    .list-filter-bar-wide .field-block,
    .shortcut-card {
        max-width: none;
        flex-basis: 100%;
    }

    .list-footer-controls,
    .pagination-row {
        justify-content: stretch;
    }

    .quick-panel-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 70rem) and (min-width: 45.0625rem) {
    .quick-panel-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
