body {
    background:
        linear-gradient(180deg, #f8fbff 0, #f4f7fb 240px, #eef3f8 100%);
    color: #182434;
}

.operations-partner-package{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:.85rem;border:1px solid var(--app-border,#dce4e8);border-radius:7px;background:var(--app-surface-muted,#f5f7f8)}
.operations-partner-package>div:first-child{flex:1;min-width:240px}.operations-partner-package small{display:block;margin-top:.3rem;color:var(--app-muted,#657786)}.operations-partner-package-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.operations-share-secret{padding:.85rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 28%,var(--app-border,#dce4e8));border-radius:7px;background:color-mix(in srgb,var(--app-primary,#176b87) 4%,var(--app-surface,#fff))}.operations-share-secret>header{display:flex;align-items:center;gap:.65rem;margin-bottom:.7rem}.operations-share-secret>header>span{display:grid;place-items:center;width:34px;height:34px;border-radius:5px;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff)}.operations-share-secret>header>div{display:flex;flex-direction:column;min-width:0}.operations-share-secret>header strong{font-size:.82rem;letter-spacing:0}.operations-share-secret>header small{color:var(--app-muted,#657786)}.operations-share-secret-row{display:flex;align-items:center;gap:.65rem}.operations-share-secret-row>.input-group{min-width:0;flex:1}.operations-share-secret-row input{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.78rem}.operations-share-secret-row>.alert{width:100%}
.operations-parameter-head{display:grid;grid-template-columns:minmax(150px,1fr) minmax(140px,.85fr);gap:.45rem;padding:.45rem 1rem 0 2.8rem;color:var(--app-muted,#657786);font-size:.66rem;font-weight:700;text-transform:uppercase}
.operations-api-record-actions{display:flex;align-items:center;gap:.3rem}.operations-contract-permissions{display:flex;align-items:center;gap:1rem;padding:.65rem .8rem;margin-top:.65rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-contract-permissions .form-check{margin:0}.required-api-field{border-color:color-mix(in srgb,#d97706 45%,var(--app-border,#dce4e8))!important;background:color-mix(in srgb,#f59e0b 7%,var(--app-surface,#fff))}.required-api-field b{display:inline-flex;margin-left:.3rem;padding:.08rem .3rem;border-radius:3px;background:#fff3cd;color:#8a5800;font-size:.58rem;text-transform:uppercase}
.operations-match-picker{position:relative;align-self:stretch}.operations-match-picker summary{display:flex;min-height:58px;flex-direction:column;justify-content:center;gap:.2rem;padding:.4rem .55rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff);cursor:pointer;list-style:none}.operations-match-picker summary span{color:var(--app-muted,#657786);font-size:.65rem;font-weight:700}.operations-match-picker summary strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.operations-match-picker>div{position:absolute;z-index:1085;top:calc(100% + 4px);left:0;width:300px;max-height:290px;padding:.5rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff);box-shadow:0 12px 30px rgba(15,23,42,.18);overflow:auto}.operations-match-picker:not([open])>div{display:none}.operations-match-picker>div>label{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:.4rem;padding:.38rem;border-radius:4px}.operations-match-picker>div>label:hover{background:var(--app-surface-muted,#f7f9fa)}.operations-match-picker>div>label small{grid-column:2;color:var(--app-muted,#657786);font-size:.62rem}.operations-match-picker>div>.form-control{position:sticky;top:0;z-index:1;margin-bottom:.35rem;background:var(--app-surface,#fff)}
@media(max-width:680px){.operations-partner-package{align-items:stretch;flex-direction:column}.operations-partner-package-actions .btn{flex:1}.operations-share-secret-row{align-items:stretch;flex-direction:column}.operations-share-secret-row>.input-group,.operations-share-secret-row>.btn{width:100%}.operations-parameter-head{display:none}}

.document-signature-config {
    border: 1px solid #d8dee8;
    border-radius: 10px;
    padding: 14px;
    background: #f8fafc;
}

.document-summary-prompt-config {
    display: grid;
    gap: 10px;
}

.document-summary-prompt-config > div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(170px, .55fr) minmax(260px, 1fr) 34px;
    align-items: start;
}

.document-intake-rule-config {
    display: grid;
    gap: 12px;
}

.document-intake-rule {
    border: 1px solid #d9e1eb;
    border-left: 3px solid #4f7cac;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
}

.document-intake-rule-head {
    display: grid;
    grid-template-columns: auto minmax(150px, .8fr) auto minmax(140px, .7fr) 34px;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    font-size: .82rem;
    color: #536174;
}

.document-intake-condition {
    display: grid;
    grid-template-columns: minmax(145px, .75fr) minmax(150px, .8fr) minmax(200px, 1fr) 34px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.signature-signer-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr .8fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.signature-recipient-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.signature-page {
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 12px;
    background: linear-gradient(180deg, #f6f8fb 0%, #eef3f8 100%);
}

.signature-shell {
    width: min(980px, 100%);
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(23, 32, 51, .10);
    padding: 26px;
}

.signature-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e7ebf1;
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.signature-head h1 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.signature-document-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.signature-document-preview small {
    display: block;
    color: #667085;
}

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

.signature-field {
    display: grid;
    gap: 6px;
}

.signature-field > span,
.signature-field .form-label {
    font-weight: 650;
    color: #263348;
}

.signature-prefilled-field {
    align-content: start;
    padding: 12px 14px;
    border: 1px solid #b8ddd3;
    border-radius: 10px;
    background: #f0fdf9;
}

.signature-prefilled-field strong {
    color: #174f46;
    font-weight: 650;
    white-space: normal;
}

.signature-prefilled-field small {
    color: #527b73;
}

.signature-prefill-selection {
    padding: 14px;
    border: 1px solid #b8ddd3;
    border-radius: 10px;
    background: #f5fffc;
}

.signature-prefill-selection-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #174f46;
}

.signature-prefill-selection-head i {
    font-size: 1.4rem;
}

.signature-prefill-selection-head span {
    display: grid;
}

.signature-prefill-selection-head small {
    color: #527b73;
}

.signature-draw-field {
    grid-column: 1 / -1;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    padding: 14px;
    background: #fbfcfe;
}

.signature-draw-field canvas {
    width: 100%;
    height: 180px;
    border: 1px dashed #98a2b3;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
}

.signature-done-icon,
.signature-expired-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
}

.signature-done-icon {
    color: #198754;
}

.signature-expired-icon {
    color: #b45309;
}

.signature-flow-page {
    display: grid;
    gap: 18px;
}

.signature-flow-builder,
.signature-flow-list {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(23, 32, 51, .06);
    padding: 18px;
}

.signature-flow-form-head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.signature-flow-sections {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.signature-flow-sections section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 14px;
}

.signature-flow-sections h2,
.signature-flow-list h2 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.signature-flow-sections p {
    color: #667085;
    font-size: .9rem;
    margin: 0 0 10px;
}

.signature-flow-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.signature-flow-section-head p {
    margin-bottom: 0;
}

.signature-flow-grid-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.signature-flow-row-head {
    display: grid;
    gap: 8px;
    align-items: center;
    color: #667085;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 6px;
}

.signature-flow-placement-row {
    grid-template-columns: minmax(150px, 1fr) minmax(170px, 1.2fr) minmax(130px, .8fr) 58px 40px;
}

.signature-flow-signature-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 40px;
}

.signature-flow-signer-slot-row {
    position: relative;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 12px;
    padding: 14px 52px 14px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
}

.signature-flow-map-field {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.signature-flow-map-field > span {
    color: #667085;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.signature-flow-map-field .searchable-select,
.signature-flow-map-field .role-tags {
    width: 100%;
    min-width: 0;
}

.signature-flow-map-field .role-tags-control,
.signature-runtime-map-field .role-tags-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.signature-flow-map-field .role-tags-control [data-role-tags-summary],
.signature-runtime-map-field .role-tags-control [data-role-tags-summary] {
    flex: 1 1 auto;
    max-width: calc(100% - 18px);
    overflow: hidden;
    white-space: nowrap;
}

.signature-flow-map-field .role-tags-chip,
.signature-runtime-map-field .role-tags-chip {
    max-width: 92px;
}

.signature-flow-map-field .role-tags-control .lookup-caret,
.signature-runtime-map-field .role-tags-control .lookup-caret {
    flex: 0 0 auto;
}

.signature-flow-access {
    min-height: 38px;
}

.signature-technical-field {
    display: none !important;
}

.signature-technical-field + .searchable-select {
    display: none !important;
}

.signature-signer-source-preview {
    min-width: 0;
    color: #475467;
    font-size: .76rem;
    line-height: 1.35;
}

.signature-signer-source-preview strong {
    display: block;
    overflow: hidden;
    color: #263348;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signature-flow-map-field.signature-signer-source-preview {
    grid-column: span 2;
}

.signature-flow-map-field.signature-signer-source-preview [data-signature-source-preview] {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px dashed #cfd8e6;
    border-radius: 6px;
    background: #f8fafc;
}

.signature-runtime-map-field.signature-signer-source-preview > span {
    color: #667085;
    font-size: .74rem;
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
}

.signature-hidden-target-module {
    display: none !important;
}

.signature-flow-placement-row .form-control,
.signature-flow-signature-row .form-control,
.signature-flow-signer-slot-row .form-control,
.signature-flow-placement-row .form-select,
.signature-flow-signature-row .form-select,
.signature-flow-signer-slot-row .form-select {
    min-width: 0;
}

.signature-row-remove {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.signature-flow-signer-slot-row > .signature-row-remove {
    position: absolute;
    top: 34px;
    right: 10px;
}

.signature-placement-preview-panel {
    display: grid;
    gap: 14px;
}

.signature-placement-preview-head {
    display: grid;
    gap: 10px;
}

.signature-placement-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.signature-placement-toolbar .form-control {
    width: 82px;
}

.signature-document-designer {
    display: grid;
    gap: 10px;
}

.signature-document-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
}

.signature-page-number-control {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #344054;
    font-size: .9rem;
    font-weight: 700;
}

.signature-page-number-control .form-control {
    width: 76px;
    text-align: center;
}

.signature-document-stage {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: stretch;
}

.signature-page-jumper {
    position: sticky;
    top: 84px;
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 720px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
}

.signature-page-jumper button {
    display: grid;
    gap: 7px;
    justify-items: center;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 8px;
    padding: 8px 6px;
    color: #475467;
    font-size: .82rem;
    font-weight: 700;
    min-height: 112px;
}

.signature-page-thumb {
    display: block;
    width: 46px;
    height: 62px;
    border: 1px solid #d0d8e4;
    border-radius: 4px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(180deg, #e9eef5 0 2px, transparent 2px 12px);
    overflow: hidden;
}

.signature-page-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.signature-page-jumper button.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.signature-page-viewer {
    max-height: 720px;
    overflow: auto;
    padding: 18px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #e9eef5;
}

.signature-field-palette {
    position: sticky;
    top: 84px;
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 720px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
}

.signature-field-palette-head {
    display: grid;
    gap: 2px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid #e5eaf1;
}

.signature-field-palette-head strong {
    color: #263348;
    font-size: .92rem;
}

.signature-field-palette-head span {
    color: #667085;
    font-size: .76rem;
}

.signature-field-palette-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.signature-field-palette-title {
    margin-top: 6px;
    color: #667085;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.signature-field-chip {
    display: grid;
    gap: 4px;
    width: 100%;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 9px;
    color: #344054;
    text-align: left;
    cursor: grab;
    position: relative;
}

.signature-field-chip:active {
    cursor: grabbing;
}

.signature-field-chip span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: .84rem;
    font-weight: 700;
}

.signature-field-chip span i {
    color: #2563eb;
}

.signature-field-chip small {
    color: #667085;
    font-size: .72rem;
}

.signature-field-chip.is-on-page {
    border-color: #2563eb;
    background: #eff6ff;
}

.signature-field-chip.is-active {
    border-color: #16a34a;
    background: #ecfdf3;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.signature-field-chip.is-unassigned {
    border-color: #f59e0b;
    background: #fffbeb;
    cursor: pointer;
}

.signature-field-chip.is-unassigned small {
    color: #b45309;
}

.signature-chip-tools {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.signature-field-chip:hover .signature-chip-tools,
.signature-field-chip.is-active .signature-chip-tools {
    opacity: 1;
    pointer-events: auto;
}

.signature-chip-tools i {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475467;
    cursor: pointer;
}

.signature-chip-tools i:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.signature-field-inspector {
    display: grid;
    gap: 9px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #e5eaf1;
}

.signature-field-inspector strong {
    color: #263348;
    font-size: .9rem;
}

.signature-field-inspector p {
    margin: 0;
    color: #667085;
    font-size: .78rem;
}

.signature-field-inspector label {
    display: grid;
    gap: 4px;
    color: #475467;
    font-size: .74rem;
    font-weight: 700;
}

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

.signature-inspector-check {
    display: flex !important;
    grid-auto-flow: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px !important;
}

.signature-field-modal-body {
    display: grid;
    gap: 12px;
}

.signature-field-modal-body label {
    display: grid;
    gap: 5px;
    color: #475467;
    font-size: .85rem;
    font-weight: 700;
}

.signature-flow-signer-slot-row .is-muted-control {
    background-color: #f8fafc;
    color: #667085;
}

.signature-runtime-signer-row .is-muted-control {
    background-color: #f4f6f9;
    color: #667085;
}

.signature-flow-signer-slot-row .is-muted-control + .searchable-select,
.signature-flow-signer-slot-row select.is-muted-control,
.signature-runtime-signer-row .is-muted-control + .searchable-select,
.signature-runtime-signer-row select.is-muted-control {
    pointer-events: none;
    opacity: .62;
}

.role-tags-option.is-disabled {
    cursor: not-allowed;
    opacity: .55;
}

.signature-page-stack {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.signature-page-frame {
    display: grid;
    gap: 8px;
    width: min(100%, 820px);
}

.signature-page-title {
    color: #475467;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
}

.signature-page-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 8.5 / 11;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #eef5ff, #ffffff) border-box;
    box-shadow: 0 14px 32px rgba(23, 32, 51, .12);
    overflow: hidden;
    user-select: none;
}

.signature-page-preview::before {
    content: "";
    position: absolute;
    inset: 6%;
    border-top: 2px solid #e5eaf1;
    border-bottom: 2px solid #e5eaf1;
    box-shadow: 0 28px 0 #f1f5f9, 0 56px 0 #f1f5f9, 0 84px 0 #f1f5f9;
}

.signature-page-preview.has-source-document::before {
    display: none;
}

.signature-source-frame {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    pointer-events: none;
}

.signature-source-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #fff;
    pointer-events: none;
}

.signature-source-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    gap: 8px;
    color: #475467;
    background: #fff;
    text-align: center;
}

.signature-source-loading i {
    color: #dc2626;
    font-size: 2rem;
}

.signature-source-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    color: #475467;
    background: #fff;
}

.signature-source-placeholder i {
    color: #2563eb;
    font-size: 2.2rem;
}

.signature-source-placeholder strong {
    color: #1f2937;
}

.signature-source-placeholder span {
    max-width: 420px;
    font-size: .9rem;
}

.signature-preview-box {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: 1px solid #2563eb;
    border-radius: 5px;
    background: rgba(37, 99, 235, .10);
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: move;
    touch-action: none;
}

.signature-preview-box-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signature-preview-tools {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid #d0d7e2;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    transform: translateY(-2px);
}

.signature-preview-box:hover .signature-preview-tools,
.signature-preview-box.is-active .signature-preview-tools {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.signature-preview-tools button {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: #f3f6fb;
    color: #475467;
    line-height: 1;
}

.signature-preview-tools button:hover {
    background: #e7eef9;
    color: #1d4ed8;
}

.signature-preview-tools [data-preview-field-unplace]:hover {
    background: #fee4e2;
    color: #b42318;
}

.signature-preview-box.is-signature {
    border-color: #b42318;
    background: rgba(180, 35, 24, .10);
    color: #b42318;
}

.signature-preview-box.is-merge {
    border-color: #0f766e;
    background: rgba(15, 118, 110, .12);
    color: #0f5f59;
}

.signature-preview-box.is-unassigned {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .14);
    color: #92400e;
}

.signature-preview-box.is-active {
    outline: 3px solid rgba(37, 99, 235, .22);
}

.signature-preview-resize {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 13px;
    height: 13px;
    border-radius: 6px 0 4px 0;
    background: currentColor;
    cursor: nwse-resize;
}

.signature-flow-list {
    display: grid;
    gap: 10px;
}

.signature-flow-trigger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.signature-flow-trigger-grid > div {
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.signature-flow-trigger-grid h3 {
    margin: 0 0 10px;
    color: #263348;
    font-size: .95rem;
}

.signature-completed-trigger-panel {
    padding-top: 18px;
}

.signature-sent-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #a7d7ba;
    border-radius: 8px;
    background: #f0faf4;
    color: #173b28;
}

.signature-sent-banner-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.signature-sent-banner-title > i {
    color: #198754;
    font-size: 1.25rem;
}

.signature-sent-banner-title span,
.signature-sent-recipients span {
    display: grid;
    line-height: 1.25;
}

.signature-sent-banner-title small,
.signature-sent-recipients small {
    color: #667085;
    font-size: .75rem;
}

.signature-sent-recipients {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.signature-sent-recipients > div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 7px 6px 10px;
    border: 1px solid #cce4d5;
    border-radius: 7px;
    background: #fff;
}

.signature-sent-recipients button,
.signature-log-link-actions button,
.signature-log-link-actions .is-unavailable {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--app-border, #d7e0ea);
    border-radius: 6px;
    background: var(--app-surface, #fff);
    color: var(--app-primary, #176b87);
}

.signature-sent-recipients button:hover,
.signature-log-link-actions button:hover {
    border-color: var(--app-primary, #176b87);
    background: color-mix(in srgb, var(--app-primary, #176b87) 8%, #fff);
}

.signature-log-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.signature-log-link-actions .is-unavailable {
    width: 30px;
    padding: 0;
    color: #98a2b3;
    cursor: not-allowed;
}

[data-copy-signature-link].is-copied {
    border-color: #198754;
    background: #ecf8f0;
    color: #146c43;
}

.signature-log-link-actions .signature-copy-confirmation {
    display: none;
}

.signature-log-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
}

.signature-log-grid {
    display: grid;
    gap: 16px;
}

.signature-log-panel {
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(23, 32, 51, .06);
    padding: 16px;
}

.signature-log-panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.signature-log-panel td small {
    display: block;
    color: #667085;
}

.signature-flow-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.signature-flow-list article small {
    display: block;
    color: #667085;
}

.signature-flow-list article p {
    margin: 6px 0 0;
    color: #475467;
}
.signature-flow-choice-summary {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-height: 40px;
    margin-top: .45rem;
    padding: .55rem .65rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 18%, var(--app-border));
    border-radius: 5px;
    color: color-mix(in srgb, var(--app-text) 72%, transparent);
    background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface));
    font-size: .76rem;
    line-height: 1.35;
}
.signature-flow-choice-summary i {
    flex: 0 0 auto;
    margin-top: .05rem;
    color: var(--app-primary);
}

.signature-prepare-page .signature-flow-builder {
    padding: 0;
    overflow: hidden;
}

.signature-prepare-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #dbe3ee;
    border-bottom: 1px solid #dbe3ee;
}

.signature-prepare-summary > div {
    display: grid;
    gap: 3px;
    padding: 12px 16px;
    background: #f8fafc;
}

.signature-prepare-summary span {
    color: #667085;
    font-size: .75rem;
    text-transform: uppercase;
}

.signature-prepare-summary strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signature-prepare-mapping {
    padding: 18px;
    border-bottom: 1px solid #dbe3ee;
    background: #fff;
}

.signature-prepare-mapping .signature-flow-section-head {
    align-items: center;
    margin-bottom: 14px;
}

.signature-prepare-mapping h2,
.signature-prepare-page .signature-placement-preview-head h2 {
    margin: 0;
    color: #263348;
    font-size: 1.1rem;
    line-height: 1.3;
}

.signature-prepare-mapping p,
.signature-prepare-page .signature-placement-preview-head p {
    margin: 4px 0 0;
    color: #667085;
    font-size: .84rem;
    line-height: 1.45;
}

.signature-runtime-signer-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 52px 14px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
}

.signature-runtime-map-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.signature-runtime-map-field > span {
    color: #667085;
    font-size: .7rem;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
}

.signature-runtime-map-field:has(> select[hidden]) {
    display: none;
}

.signature-runtime-permissions {
    display: flex;
    align-items: center;
    min-height: 38px;
    gap: 14px;
}

.signature-runtime-remove {
    position: absolute;
    top: 31px;
    right: 12px;
}

.signature-prepare-page .signature-placement-preview-panel,
.signature-prepare-send {
    margin: 16px;
}

.signature-prepare-send {
    border-top: 1px solid #dbe3ee;
    padding-top: 18px;
}

.signature-prepare-send h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.signature-prepare-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.signature-prepare-actions .btn {
    margin-left: auto;
}

@media (max-width: 1100px) {
    .signature-flow-signer-slot-row,
    .signature-runtime-signer-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .signature-signer-row,
    .signature-fields-grid,
    .signature-flow-form-head,
    .signature-flow-grid-row,
    .signature-flow-row-head,
    .signature-placement-preview-panel,
    .signature-document-stage,
    .signature-flow-trigger-grid,
    .signature-log-filters,
    .document-annotation-tools,
    .document-pdf-body,
    .signature-flow-list article {
        grid-template-columns: 1fr;
    }

    .signature-sent-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .signature-sent-recipients {
        justify-content: flex-start;
    }

    .signature-prepare-summary {
        grid-template-columns: 1fr;
    }

    .signature-runtime-signer-row {
        grid-template-columns: 1fr;
        padding-right: 52px;
    }

    .signature-flow-map-field.signature-signer-source-preview {
        grid-column: span 1;
    }

    .signature-prepare-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .signature-prepare-actions .btn {
        margin-left: 0;
        width: 100%;
    }

    .document-pdf-pages {
        grid-auto-flow: column;
        grid-auto-columns: minmax(84px, 1fr);
        overflow-x: auto;
    }

    .document-pdf-pages button {
        min-height: 82px;
    }

    .signature-head,
    .signature-document-preview {
        flex-direction: column;
        align-items: flex-start;
    }

    .signature-page-preview {
        justify-self: stretch;
    }

    .signature-page-jumper {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
        max-height: none;
    }

    .signature-field-palette {
        position: static;
        max-height: none;
    }

    .signature-page-jumper button {
        min-height: 84px;
    }

    .signature-page-thumb {
        width: 34px;
        height: 44px;
    }
}

.btn-primary {
    background: #2457a6;
    border-color: #2457a6;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1e4b90;
    border-color: #1e4b90;
}

.card {
    border: 1px solid #dfe5ee;
    border-radius: 8px;
}

.empty-state {
    background: #fff;
    border: 1px dashed #b8c4d6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.workspace-hero {
    background: #ffffff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(24, 52, 94, .08);
    padding: 22px;
}

.module-card {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    color: #182434;
    display: flex;
    gap: 14px;
    min-height: 112px;
    padding: 18px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.module-card:hover {
    border-color: #86a9e6;
    box-shadow: 0 8px 24px rgba(39, 79, 130, .12);
    transform: translateY(-2px);
}

.module-card strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.module-card small {
    color: #65758b;
    display: block;
    margin-top: 2px;
}

.module-icon {
    align-items: center;
    background: #e7f0ff;
    border-radius: 8px;
    color: #2457a6;
    display: inline-flex;
    font-size: 22px;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.row > div:nth-child(4n+2) .module-icon {
    background: #e8f7ef;
    color: #16794c;
}

.row > div:nth-child(4n+3) .module-icon {
    background: #fff3df;
    color: #a15a00;
}

.row > div:nth-child(4n+4) .module-icon {
    background: #f1ebff;
    color: #6841b6;
}

.navbar.bg-primary {
    background: #12253f !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 30px rgba(18, 37, 63, .18);
}

.profile-menu-button {
    align-items: center;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    gap: 8px;
    min-height: 38px;
    padding: 5px 10px 5px 6px;
}

.profile-menu-button:hover,
.profile-menu-button:focus {
    background: rgba(255,255,255,.18);
}

.profile-avatar {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    color: #18345e;
    display: inline-flex;
    font-size: 22px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.profile-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item i,
.nav-link i {
    margin-right: 7px;
}

.dropdown:focus-within > .dropdown-menu,
.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu {
    z-index: 5000;
}

.builder-shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    min-height: calc(100vh - 112px);
}

.builder-sidebar,
.builder-panel,
.workspace-section,
.config-panel {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(24, 52, 94, .06);
}

.builder-sidebar {
    align-self: start;
    overflow: hidden;
}

.builder-sidebar-head {
    align-items: center;
    border-bottom: 1px solid #e7edf5;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 18px;
}

.module-row {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    color: #182434;
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    text-align: left;
    width: 100%;
}

.module-row:hover,
.module-row.active {
    background: #eef5ff;
}

.module-row-icon {
    align-items: center;
    background: #18345e;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.module-row-main {
    flex: 1;
    min-width: 0;
}

.module-row-main strong,
.module-row-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-row-main small {
    color: #6c7b90;
}

.module-row-status {
    background: #b8c4d6;
    border-radius: 999px;
    height: 9px;
    width: 9px;
}

.module-row-status.on {
    background: #198754;
}

.builder-panel {
    padding: 22px;
    position: relative;
}

.builder-panel.is-loading {
    opacity: .62;
}

.panel-header {
    align-items: flex-start;
    border-bottom: 1px solid #e7edf5;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: -22px -22px 22px;
    padding: 22px;
}

.eyebrow {
    color: #46617f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workspace-section,
.config-panel {
    padding: 18px;
}

.module-workspace-tabs {
    background: #f4f7fb;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    gap: 6px;
    margin-bottom: 18px;
    padding: 6px;
}

.module-workspace-tabs .nav-link {
    align-items: center;
    border-radius: 6px;
    color: #34465d;
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
}

.module-workspace-tabs .nav-link.active {
    background: #18345e;
    color: #fff;
}

.module-workspace-content {
    min-height: 420px;
}

.section-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.field-list {
    border: 1px solid #e7edf5;
    border-radius: 8px;
    overflow: hidden;
}

.field-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 13px 14px;
}

.field-row + .field-row {
    border-top: 1px solid #edf1f6;
}

.field-row.saved-highlight {
    animation: savedRowPulse 3.5s ease;
}

.field-row.is-inactive {
    background: #f7f9fc;
    box-shadow: inset 3px 0 0 #9aa8b8;
}

.field-row.is-inactive > div:first-child {
    opacity: .64;
}

@keyframes savedRowPulse {
    0%, 100% {
        background: #fff;
        box-shadow: none;
    }
    15%, 75% {
        background: #eaf7ef;
        box-shadow: inset 4px 0 0 #198754;
    }
}

.field-row small {
    color: #6c7b90;
    display: block;
    margin-top: 2px;
}

.field-badges {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
}

.icon-chip,
.icon-btn {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.icon-chip i,
.icon-btn i {
    line-height: 1;
}

.icon-chip.required {
    background: #fff2f2;
    border: 1px solid #f0b8bd;
    color: #b4232f;
}

.icon-chip.lookup {
    background: #eef8ff;
    border: 1px solid #acd8f5;
    color: #0b5d8f;
}

.icon-chip.inactive {
    background: #eef1f5;
    border: 1px solid #cbd3dd;
    color: #59697b;
}

.icon-btn {
    background: #fff;
    border: 1px solid #cfd9e7;
    color: #34465d;
}

.icon-btn.danger {
    border-color: #f0c6cc;
    color: #b4232f;
}

.icon-btn:hover,
.icon-btn:focus {
    background: #eef5ff;
    border-color: #86a9e6;
}

.icon-btn.danger:hover,
.icon-btn.danger:focus {
    background: #fff2f2;
    border-color: #e58b96;
}

.activity-workbench {
    padding: 0;
    overflow: hidden;
}

.activity-workbench-title {
    border-bottom: 1px solid #e7edf5;
    margin-bottom: 0;
    padding: 18px;
}

.activity-workbench-tabs {
    background: #f8fafc;
    border-bottom: 1px solid #e7edf5;
    gap: 4px;
    padding: 10px 14px 0;
}

.activity-workbench-tabs .nav-link {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    color: #46617f;
    font-weight: 700;
}

.activity-workbench-tabs .nav-link.active {
    color: #18345e;
}

.activity-workbench-grid {
    padding: 18px;
}

.activity-list-header {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e7edf5;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.activity-list-header strong,
.activity-list-header small {
    display: block;
}

.activity-list-header small {
    color: #6c7b90;
    margin-top: 2px;
}

.activity-list-header + .field-list {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.activity-config-row {
    align-items: flex-start;
}

.activity-list-pane {
    display: none;
}

.activity-list-pane.active {
    display: block;
}

.activity-editor-card {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 52, 94, .06);
    max-height: calc(100vh - 230px);
    overflow: auto;
    padding: 18px;
    position: sticky;
    top: 88px;
}

.activity-editor-pane {
    display: none;
}

.activity-editor-pane.active {
    display: block;
}

.builder-empty {
    color: #6c7b90;
    padding: 40px;
    text-align: center;
}

.builder-empty.compact {
    padding: 22px;
}

.ajax-alert {
    position: fixed;
    right: 24px;
    top: 74px;
    width: min(420px, calc(100vw - 40px));
    z-index: 1090;
}

.lookup-picker {
    position: relative;
}

.lookup-control {
    align-items: center;
    background: #fff;
    border: 1px solid #ced7e3;
    border-radius: 6px;
    color: #182434;
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 10px;
    text-align: left;
    width: 100%;
}

.lookup-control:hover,
.lookup-control:focus {
    border-color: #6c98d9;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
    outline: 0;
}

.lookup-caret {
    color: #6c7b90;
    font-size: 16px;
    line-height: 1;
    margin-left: 12px;
}

.lookup-menu {
    background: #fff;
    border: 1px solid #cfd9e7;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(24, 52, 94, .18);
    left: 0;
    margin-top: 6px;
    max-height: 430px;
    overflow: auto;
    position: absolute;
    right: 0;
    z-index: 1080;
}

.lookup-menu-head {
    align-items: center;
    border-bottom: 1px solid #e7edf5;
    display: flex;
    gap: 8px;
    padding: 10px;
}

.lookup-detail-card {
    background: #f8fafd;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #182434;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    text-decoration: none;
}

.lookup-detail-card:hover,
.lookup-detail-card:focus {
    border-color: #86a9e6;
    box-shadow: 0 8px 20px rgba(39, 79, 130, .12);
    color: #182434;
}

.lookup-detail-card span,
.lookup-detail-card small {
    color: #65758b;
}

.lookup-results {
    max-height: 230px;
    overflow: auto;
}

.lookup-quick-add {
    background: #f7f9fc;
    border-bottom: 1px solid #e7edf5;
    padding: 10px;
}

.lookup-quick-add-message {
    color: #6c7b90;
    font-size: 12px;
    min-height: 16px;
    padding-top: 6px;
}

.lookup-quick-grid {
    display: grid;
    gap: 2px;
}

.lookup-address-quick {
    border: 1px solid #dce4ee;
    border-radius: 6px;
    padding: 9px;
}

.lookup-address-quick legend {
    color: #34465d;
    float: none;
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 7px;
    padding: 0 4px;
    width: auto;
}

.lookup-address-quick-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lookup-address-quick-grid label {
    min-width: 0;
}

.lookup-address-quick-grid label > span:first-child {
    color: #5c6c80;
    display: block;
    font-size: 11px;
    margin-bottom: 3px;
}

.lookup-address-quick-grid .lookup-address-wide {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .lookup-address-quick-grid {
        grid-template-columns: 1fr;
    }
}

.lookup-modal {
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1200;
}

.lookup-modal-backdrop {
    background: rgba(12, 24, 43, .42);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.lookup-modal-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(12, 24, 43, .32);
    left: 50%;
    max-height: min(720px, calc(100vh - 48px));
    max-width: min(860px, calc(100vw - 32px));
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 860px;
}

.lookup-modal-header,
.lookup-modal-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px 18px;
}

.lookup-modal-header {
    border-bottom: 1px solid #e7edf5;
}

.lookup-modal-footer {
    border-top: 1px solid #e7edf5;
}

.lookup-modal-body {
    max-height: calc(min(720px, 100vh - 48px) - 134px);
    overflow: auto;
    padding: 18px;
}

.searchable-select {
    position: relative;
}

.searchable-native-select {
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 1px !important;
}

.searchable-select-control {
    align-items: center;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #182434;
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 10px;
    text-align: left;
    width: 100%;
}

.searchable-select-control:hover,
.searchable-select-control:focus {
    border-color: #6c98d9;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
    outline: 0;
}

.searchable-select-menu {
    background: #fff;
    border: 1px solid #cfd9e7;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(24, 52, 94, .18);
    left: 0;
    margin-top: 6px;
    max-height: 280px;
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    z-index: 1100;
}

.searchable-select-menu.is-floating {
    position: fixed;
    right: auto;
    z-index: 5100;
}

.searchable-select-options {
    margin-top: 8px;
}

.searchable-select-option {
    background: #fff;
    border: 0;
    border-radius: 6px;
    color: #182434;
    display: block;
    padding: 7px 8px;
    text-align: left;
    width: 100%;
}

.searchable-select-option i,
.searchable-select-control i,
.field-row strong i {
    color: #46617f;
    margin-right: 6px;
}

.searchable-select-option:hover,
.searchable-select-option.active {
    background: #eef5ff;
}

.role-tags-native {
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 1px !important;
}

.role-tags {
    position: relative;
}

.role-tags-control {
    align-items: center;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #182434;
    display: flex;
    justify-content: space-between;
    min-height: 31px;
    overflow: hidden;
    padding: 4px 8px;
    text-align: left;
    width: 100%;
}

.role-tags-control span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-tags-control [data-role-tags-summary] {
    align-items: center;
    display: flex;
    gap: 5px;
    min-width: 0;
}

.role-tags-chip,
.role-tags-chip-count {
    background: color-mix(in srgb, var(--app-primary, #176b87) 11%, #fff);
    border: 1px solid color-mix(in srgb, var(--app-primary, #176b87) 24%, #d9e3eb);
    color: var(--app-primary, #176b87);
    display: inline-block;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.2;
    max-width: 145px;
    overflow: hidden;
    padding: 3px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-tags-chip-count {
    flex: 0 0 auto;
}

.role-tags-menu {
    background: #fff;
    border: 1px solid #cfd9e7;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(24, 52, 94, .18);
    left: 0;
    margin-top: 6px;
    max-height: 220px;
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    z-index: 1300;
}

.role-tags-menu.is-floating {
    position: fixed;
    right: auto;
    z-index: 5100;
}

.role-tags-options {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.role-tags-order {
    border-bottom: 1px solid var(--app-border, #d9e3eb);
    display: grid;
    gap: 4px;
    margin: 8px -2px 2px;
    padding: 0 2px 8px;
}

.role-tags-order-title {
    color: var(--app-muted, #65778a);
    font-size: .67rem;
    font-weight: 750;
    text-transform: uppercase;
}

.role-tags-order-item {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #176b87) 6%, var(--app-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--app-primary, #176b87) 16%, var(--app-border, #d9e3eb));
    border-radius: 5px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
    padding: 4px 5px 4px 7px;
}

.role-tags-order-item > span {
    align-items: center;
    display: flex;
    font-size: .76rem;
    font-weight: 650;
    gap: 7px;
    min-width: 0;
}

.role-tags-order-item > span b {
    align-items: center;
    background: var(--app-primary, #176b87);
    border-radius: 50%;
    color: var(--app-primary-contrast, #fff);
    display: inline-flex;
    flex: 0 0 20px;
    font-size: .65rem;
    height: 20px;
    justify-content: center;
}

.role-tags-order-item > div { display: flex; gap: 2px; }
.role-tags-order-item button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--app-primary, #176b87);
    display: inline-flex;
    height: 25px;
    justify-content: center;
    padding: 0;
    width: 25px;
}
.role-tags-order-item button:hover:not(:disabled) { background: color-mix(in srgb, var(--app-primary, #176b87) 12%, transparent); }
.role-tags-order-item button:disabled { opacity: .3; }

.role-tags-option {
    align-items: center;
    border-radius: 6px;
    color: #182434;
    display: flex !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 7px !important;
    padding: 6px 7px;
}

.role-tags-option:hover {
    background: #eef5ff;
}

.lookup-table {
    margin: 0;
}

.lookup-table th {
    background: #f7f9fc;
    color: #46617f;
    font-size: 12px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.lookup-table td,
.lookup-table th {
    padding: 8px 10px;
    vertical-align: middle;
}

.lookup-row {
    cursor: pointer;
}

.lookup-row:hover {
    background: #eef5ff;
}

.lookup-empty {
    color: #6c7b90;
    padding: 18px;
    text-align: center;
}

.lookup-config-options {
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    max-height: 142px;
    overflow: auto;
    padding: 9px;
}

.lookup-config-options .form-check {
    margin-bottom: 0;
}

.view-field-config {
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    overflow: hidden;
}

.view-field-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 48px minmax(150px, 1fr) 88px 120px 130px minmax(170px, 1fr);
    padding: 10px 12px;
}

.view-field-row + .view-field-row {
    border-top: 1px solid #edf1f6;
}

.view-field-row.header {
    background: #f7f9fc;
    color: #46617f;
    font-size: 12px;
    font-weight: 700;
}

.view-field-row strong small {
    color: #6c7b90;
    display: block;
    font-weight: 500;
    margin-top: 2px;
}

.record-form-section + .record-form-section,
.record-view-section {
    border-top: 1px solid #edf1f6;
    margin-top: 18px;
    padding-top: 18px;
}

.record-section-title {
    color: #46617f;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.record-layout-side {
    align-items: flex-start;
    display: flex;
    gap: 18px;
}

.record-layout-right {
    flex-direction: row-reverse;
}

.record-side-tabs {
    border-right: 1px solid #edf1f6;
    flex: 0 0 190px;
    padding-right: 12px;
}

.record-layout-right .record-side-tabs {
    border-left: 1px solid #edf1f6;
    border-right: 0;
    padding-left: 12px;
    padding-right: 0;
}

.record-subsection + .record-subsection,
.record-view-section dl + .record-subsection-title {
    margin-top: 14px;
}

.record-subsection-title {
    color: #34465d;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.record-field-title-stacked {
    margin-bottom: 3px;
}

.record-field-value-stacked {
    margin-bottom: 12px;
}

.record-section-field-grid > .record-view-field {
    min-width: 0;
}

.record-view-field dt,
.record-view-field dd,
.record-view-field [data-record-field-value] {
    min-width: 0;
    overflow-wrap: anywhere;
}

.record-view-field .lookup-profile-card {
    height: 100%;
}

.related-records-stack {
    display: grid;
    gap: 12px;
}

.related-records-card {
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    padding: 12px;
}

.related-records-inline {
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px;
}

.record-right-panel-field {
    border-bottom: 1px solid #edf1f6;
    padding-bottom: 10px;
}

.record-right-panel-field:last-child {
    border-bottom: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.related-records-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.related-records-head strong,
.related-records-head small {
    display: block;
}

.related-records-head small {
    color: #6c7b90;
    font-size: 12px;
}

.related-record-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.related-record-actions .btn {
    align-items: center;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.related-add-modal {
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1400;
}

.related-add-backdrop {
    background: rgba(18, 37, 63, .48);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.related-add-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(18, 37, 63, .28);
    display: grid;
    grid-template-rows: auto 1fr;
    height: min(88vh, 840px);
    left: 50%;
    max-width: 1120px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 1120px);
}

.related-add-header {
    align-items: center;
    border-bottom: 1px solid #e5edf6;
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
}

.related-add-body {
    overflow: auto;
    padding: 18px;
}

.related-add-form-embedded .related-add-form-card {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.related-add-form-embedded .card-body {
    padding: 0;
}

.related-add-body > .row {
    margin: 0;
}

.related-add-body > .row > [class*="col-"] {
    width: 100%;
}

.activity-timeline-card {
    overflow: visible;
}

.activity-timeline-card > .card-body { position:relative; }

.activity-timeline-head,
.activity-item-head,
.activity-meta,
.activity-add-header,
.activity-add-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.activity-timeline-head {
    gap: 10px;
    margin-bottom: 14px;
}

.activity-timeline-head-actions { align-items:center; display:flex; gap:6px; }
.activity-filter-toggle { position:relative; display:grid; place-items:center; width:31px; height:31px; padding:0; border:1px solid var(--app-border, #dbe3ee); border-radius:6px; background:var(--app-surface, #fff); color:color-mix(in srgb, var(--app-text, #1f3447) 68%, transparent); }
.activity-filter-toggle:hover, .activity-filter-toggle[aria-expanded="true"], .activity-filter-toggle.is-active { border-color:var(--app-primary, #0f766e); background:color-mix(in srgb, var(--app-primary, #0f766e) 8%, var(--app-surface, #fff)); color:var(--app-primary, #0f766e); }
.activity-filter-toggle.is-active::after { content:attr(data-filter-count); position:absolute; top:-6px; right:-6px; display:grid; place-items:center; min-width:16px; height:16px; padding:0 4px; border:2px solid var(--app-surface, #fff); border-radius:9px; background:var(--app-primary, #0f766e); color:var(--app-primary-contrast, #fff); font-size:9px; font-weight:800; }

.activity-timeline-head small,
.activity-item small,
.activity-add-header small {
    color: #6c7b90;
    font-size: 12px;
}

.activity-timeline {
    display: grid;
    gap: 12px;
}

.activity-latest-status {
    align-items: center;
    background: #eef5ff;
    border: 1px solid #cfe0f4;
    border-radius: 7px;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 7px 9px;
}

.activity-latest-status span {
    color: #607086;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.activity-latest-status strong {
    color: #244f83;
    font-size: 13px;
}

.activity-filters {
    position: absolute;
    right: 12px;
    top: 54px;
    z-index: 30;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(360px, calc(100% - 24px));
    margin: 0;
    padding: 10px;
    border: 1px solid var(--app-border, #dbe3ee);
    border-radius: 7px;
    background: var(--app-surface, #fff);
    box-shadow: 0 14px 30px rgb(15 23 42 / 16%);
}

.activity-filters .form-control,
.activity-filters .form-select {
    font-size: 12px;
}

.activity-filter-date { display:grid; gap:3px; margin:0; }
.activity-filter-date > span { color:color-mix(in srgb, var(--app-text, #1f3447) 64%, transparent); font-size:10px; font-weight:700; text-transform:uppercase; }

.activity-filter-clear { grid-column:1 / -1; justify-self:end; padding:2px 4px; font-size:11px; text-decoration:none; }

.signature-upload-config { padding:12px; border:1px solid var(--app-border); border-radius:7px; background:color-mix(in srgb, var(--app-page) 42%, var(--app-surface)); }
.signature-flow-section-head.compact { align-items:center; margin-bottom:10px; }
.signature-flow-section-head.compact h3 { margin:0 0 2px; font-size:14px; }
.signature-flow-section-head.compact p { margin:0; font-size:12px; }
.signature-upload-requirements { display:grid; gap:8px; }
.signature-upload-requirement { display:grid; grid-template-columns:minmax(170px, 1.35fr) minmax(135px, 1fr) minmax(150px, 1fr) 100px minmax(190px, 1.5fr) auto auto; align-items:end; gap:7px; padding:8px; border:1px solid var(--app-border); border-radius:6px; background:var(--app-surface); }
.signature-upload-requirement label { display:grid; gap:3px; margin:0; }
.signature-upload-requirement label > span { font-size:10px; font-weight:700; text-transform:uppercase; color:color-mix(in srgb, var(--app-text) 62%, transparent); }
.signature-upload-required { align-self:center !important; display:flex !important; grid-template-columns:auto 1fr; margin-top:16px !important; }
.signature-upload-required > span { font-size:12px !important; text-transform:none !important; }
.signature-upload-requirement > .icon-btn { margin-bottom:3px; }
.signature-upload-inherited-summary { min-height:42px; display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px dashed var(--app-border); border-radius:6px; color:var(--app-muted); background:color-mix(in srgb, var(--app-page) 55%, transparent); }
.signature-upload-inherited-summary i { color:var(--app-primary); }
@media (max-width: 1199px) { .signature-upload-requirement { grid-template-columns:repeat(2, minmax(0, 1fr)); } .signature-upload-instructions { grid-column:1 / -1; } }
.signature-signer-uploads { margin:18px 0 12px; padding:14px; border:1px solid var(--app-border); border-radius:8px; background:color-mix(in srgb, var(--app-primary) 4%, var(--app-surface)); }
.signature-signer-upload-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.signature-signer-upload-head > i { color:var(--app-primary); font-size:22px; }
.signature-signer-upload-head span { display:grid; }
.signature-signer-upload-head small { color:color-mix(in srgb, var(--app-text) 62%, transparent); }
.signature-signer-upload-list { display:grid; gap:9px; }
.signature-signer-upload-item { display:grid; grid-template-columns:minmax(210px, .8fr) minmax(240px, 1.2fr); align-items:center; gap:14px; padding:10px; border:1px solid var(--app-border); border-radius:6px; background:var(--app-surface); }
.signature-signer-upload-item > span { display:grid; }
.signature-signer-upload-item small, .signature-signer-upload-item em { color:color-mix(in srgb, var(--app-text) 60%, transparent); font-size:11px; font-style:normal; }
@media (max-width: 700px) { .signature-signer-upload-item { grid-template-columns:1fr; } }

.activity-master-options {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-master-options .form-check {
    margin: 0;
}

.activity-item {
    display: grid;
    gap: 9px;
    grid-template-columns: 32px minmax(0, 1fr);
}

.activity-item.is-completed {
    opacity: .66;
}

.activity-icon {
    align-items: center;
    background: #edf5ff;
    border: 1px solid #cfe0f4;
    border-radius: 50%;
    color: #315f98;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.activity-type-deadline,
.activity-type-reminder {
    background: #fff6e6;
    border-color: #f1d59e;
    color: #8d6110;
}

.activity-type-note {
    background: #f3f1ff;
    border-color: #d9d2f3;
    color: #6249a5;
}

.activity-content {
    min-width: 0;
}

.activity-item-head {
    gap: 8px;
}

.activity-item-head strong {
    color: #24364b;
    font-size: 13px;
}

.activity-item p {
    color: #526277;
    font-size: 13px;
    margin: 7px 0 0;
}

.activity-meta {
    border-top: 1px solid #edf1f6;
    color: #6c7b90;
    font-size: 12px;
    margin-top: 8px;
    padding-top: 5px;
}

.activity-meta .btn-link {
    font-size: 12px;
    padding: 0;
    text-decoration: none;
}

.activity-priority {
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    text-transform: uppercase;
}

.priority-low,
.priority-normal {
    background: #edf1f6;
    color: #607086;
}

.priority-high {
    background: #fff0d8;
    color: #8d6110;
}

.priority-urgent {
    background: #fde3e1;
    color: #b42318;
}

.activity-add-modal {
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1450;
}

.activity-add-backdrop {
    background: rgba(18, 37, 63, .48);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.activity-add-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(12, 24, 43, .28);
    left: 50%;
    max-height: calc(100vh - 36px);
    max-width: calc(100vw - 28px);
    overflow: auto;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 620px;
}

.activity-add-header,
.activity-add-footer {
    gap: 12px;
    padding: 15px 18px;
}

.activity-add-header {
    border-bottom: 1px solid #e2e8f1;
}

.activity-add-footer {
    border-top: 1px solid #e2e8f1;
    justify-content: flex-end;
}

.activity-add-body {
    padding: 18px;
}

.view-designer-modal {
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1250;
}

.view-designer-backdrop {
    background: rgba(12, 24, 43, .5);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.view-designer-dialog {
    background: #f5f7fb;
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(12, 24, 43, .32);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 16px);
    left: 8px;
    margin: auto;
    max-width: calc(100vw - 16px);
    overflow: hidden;
    position: absolute;
    right: 8px;
    top: 8px;
    width: auto;
}

.view-designer-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.view-designer-header,
.view-designer-settings {
    background: #fff;
    border-bottom: 1px solid #dfe6f0;
}

.view-designer-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 13px 16px;
}

.view-designer-header .h4 {
    font-size: 18px;
}

.view-designer-settings {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(240px, 1.4fr) 130px minmax(220px, .9fr) 150px;
    padding: 10px 16px;
}

.designer-setting {
    min-width: 0;
}

.designer-setting .form-label {
    color: #5f7086;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.designer-setting .form-control-sm,
.designer-setting .form-select-sm {
    border-color: #d4deea;
    font-size: 13px;
    min-height: 34px;
}

.designer-setting-title .form-control {
    font-weight: 700;
}

.designer-alias-control {
    align-items: center;
    background: #fff;
    border: 1px solid #d4deea;
    border-radius: 6px;
    display: flex;
    min-height: 34px;
    overflow: hidden;
}

.designer-alias-control span,
.designer-alias-control small {
    color: #6c7b90;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
}

.designer-alias-control .form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 32px;
    padding-left: 0;
    padding-right: 0;
}

.designer-setting-compact .form-select {
    min-width: 64px;
}

.view-designer-checks {
    align-items: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    min-width: 0;
}

.view-designer-checks .form-check {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    display: inline-flex;
    gap: 6px;
    margin: 0;
    min-height: 34px;
    padding: 6px 10px 6px 28px;
    white-space: nowrap;
}

.view-designer-checks .form-check-input {
    margin-left: -18px;
    margin-top: 0;
}

.view-designer-checks .form-check-label {
    color: #34465d;
    font-size: 12px;
    font-weight: 700;
}

.view-designer-message {
    background: #f8d7da;
    border-bottom: 1px solid #f1aeb5;
    color: #842029;
    font-size: 14px;
    padding: 10px 18px;
}

.view-designer-message.is-success {
    background: #e8f7ee;
    border-bottom-color: #a7d9b8;
    color: #176638;
}

.view-designer-workbench {
    display: grid;
    flex: 1;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 0;
}

.view-field-palette {
    background: #fff;
    border-right: 1px solid #dfe6f0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.view-designer-inspector {
    background: #fff;
    border-left: 1px solid #dfe6f0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.view-designer-inspector .view-designer-toolhead small {
    color: #6c7b90;
    font-size: 12px;
}

.designer-inspector-body {
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 14px;
}

.designer-inspector-group {
    border: 1px solid #e2e9f2;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.designer-inspector-group h3 {
    color: #172334;
    font-size: 14px;
    margin: 0;
}

.designer-inspector-group label {
    color: #52637a;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 5px;
}

.designer-inspector-group .form-check {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0;
}

.designer-inspector-empty {
    color: #6c7b90;
    font-size: 13px;
    line-height: 1.45;
}

.designer-inspector-selected {
    outline: 2px solid #2f7df6;
    outline-offset: 2px;
}

.view-designer-toolhead {
    border-bottom: 1px solid #edf1f6;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.view-palette-list {
    display: grid;
    flex: 0 0 auto;
    gap: 8px;
    overflow: visible;
    padding: 12px;
}

.designer-field {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    color: #182434;
    cursor: grab;
    text-align: left;
}

.designer-field-palette,
.designer-component-palette {
    display: grid;
    padding: 10px;
}

.designer-component-palette span {
    align-items: center;
    display: flex;
    gap: 8px;
    font-weight: 750;
}

.designer-component-palette i,
.designer-component-icon {
    color: #0b63ce;
}

.designer-component-icon {
    align-items: center;
    background: #eaf3ff;
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
}

.designer-component-assigned {
    border-color: #9fc2ef;
    box-shadow: inset 3px 0 0 #2f7df6;
}

.designer-field small {
    color: #6c7b90;
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.view-canvas-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.view-designer-actions {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dfe6f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    padding: 10px 16px;
}

.record-title-builder {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #dfe6ef;
    border-radius: 6px;
    display: grid;
    flex: 1 0 100%;
    gap: 10px;
    grid-template-columns: auto minmax(120px, 1fr) minmax(170px, 220px) auto;
    min-width: 0;
    padding: 6px 9px;
}

.record-title-builder-label {
    align-items: center;
    color: #34465d;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
}

.record-title-parts {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 120px;
    overflow-x: auto;
    padding: 1px 0 3px;
}

.record-title-part {
    align-items: center;
    background: #fff;
    border: 1px solid #cad7e5;
    border-radius: 5px;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 7px;
    min-height: 28px;
    padding: 2px 3px 2px 8px;
}

.record-title-part > span {
    color: #2e4259;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.record-title-part > div {
    display: flex;
    gap: 1px;
}

.record-title-part button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #60758d;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    padding: 0;
    width: 22px;
}

.record-title-part button:hover:not(:disabled) {
    background: #e8eef5;
    color: #1f5f9e;
}

.record-title-part button:disabled {
    opacity: .3;
}

.record-title-add {
    display: flex;
    gap: 5px;
    min-width: 0;
}

.record-title-separator {
    align-items: center;
    color: #607188;
    display: flex;
    flex: 0 0 auto;
    font-size: 11px;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
}

.record-title-separator .form-select {
    min-width: 105px;
}

.record-title-builder > small {
    color: #708198;
    font-size: 11px;
    grid-column: 1 / -1;
    line-height: 1.25;
    padding: 0 0 0 24px;
}

.generated-identifier-settings {
    background: #f8fafc;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    margin-bottom: 16px;
    padding: 13px;
}

.is-generated-identifier [data-generated-irrelevant] {
    display: none !important;
}

.generated-identifier-heading,
.generated-identifier-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.generated-identifier-heading .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.identifier-parts {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.identifier-part {
    background: #fff;
    border: 1px solid #d8e2ed;
    border-radius: 6px;
    padding: 7px;
}

.identifier-part.is-dragging {
    border-color: #4385c7;
    box-shadow: 0 8px 22px rgba(25, 73, 120, .16);
    opacity: .75;
}

.identifier-part-main {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 26px minmax(125px, .8fr) minmax(100px, 1fr) minmax(150px, 1.35fr) minmax(130px, 1fr) minmax(105px, .75fr) auto;
}

.identifier-part-main > .d-none {
    display: none !important;
}

.identifier-part-drag,
.identifier-part-actions button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #60758d;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 26px;
}

.identifier-part-drag {
    cursor: grab;
}

.identifier-part-actions {
    display: flex;
    gap: 1px;
}

.identifier-part-actions button:hover:not(:disabled) {
    background: #e8eff7;
    color: #1e609f;
}

.identifier-part-actions button:last-child:hover {
    background: #fff0f0;
    color: #b4232f;
}

.identifier-part-actions button:disabled {
    opacity: .3;
}

.identifier-part-format {
    border-top: 1px solid #e7edf4;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 7px;
    padding: 9px 4px 2px 32px;
}

.identifier-part-format label,
.generated-identifier-footer > label {
    color: #5d7087;
    font-size: 11px;
    font-weight: 600;
    margin: 0;
}

.generated-identifier-footer {
    border-top: 1px solid #dce5ef;
    padding-top: 10px;
}

.generated-identifier-preview {
    align-items: center;
    display: flex;
    gap: 8px;
}

.generated-identifier-preview span {
    color: #718399;
    font-size: 11px;
}

.generated-identifier-preview strong {
    background: #e9f2fb;
    border: 1px solid #c9ddf0;
    border-radius: 5px;
    color: #174f82;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    padding: 6px 9px;
}

.generated-identifier-value {
    align-items: center;
    display: flex;
    gap: 8px;
}

.generated-identifier-value > i {
    color: #47739f;
    font-size: 18px;
}

.config-panel .generated-identifier-settings {
    padding: 10px;
}

.config-panel .generated-identifier-heading {
    align-items: flex-start;
}

.config-panel .identifier-part-main {
    grid-template-columns: 24px minmax(0, 1fr) auto;
}

.config-panel .identifier-part-main > [data-identifier-part-type] {
    grid-column: 2;
    grid-row: 1;
}

.config-panel .identifier-part-main > :is([data-identifier-literal], [data-identifier-field], [data-identifier-date-format], [data-identifier-lookup-output]):not(.d-none) {
    grid-column: 2 / -1;
}

.config-panel .identifier-part-actions {
    grid-column: 3;
    grid-row: 1;
}

.config-panel .identifier-part-format {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 0 2px;
}

.config-panel .generated-identifier-footer {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.config-panel .generated-identifier-preview {
    align-self: end;
}

@media (max-width: 1050px) {
    .identifier-part-main {
        grid-template-columns: 26px minmax(120px, 1fr) minmax(140px, 1.4fr) auto;
    }

    .identifier-part-main > :is([data-identifier-date-format], [data-identifier-lookup-output]) {
        grid-column: span 1;
    }

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

@media (max-width: 900px) {
    .record-title-builder {
        grid-template-columns: auto minmax(120px, 1fr) minmax(150px, 190px) auto;
        overflow-x: auto;
    }
}

.view-designer-action-buttons {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.designer-tabs-menu {
    background: #fff;
    border-bottom: 1px solid #dfe6f0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 16px 0;
}

.designer-pinned-summary {
    background: #f7fbff;
    border-bottom: 1px solid #dfe8f2;
    padding: 12px 16px;
}

.designer-pinned-summary-head {
    align-items: center;
    color: #24415f;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.designer-pinned-summary-head > div {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.designer-pinned-summary-head > button {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 5px;
}

.designer-pinned-summary-head span {
    font-size: 13px;
    font-weight: 800;
}

.designer-pinned-summary-head i {
    color: #0b63ce;
}

.designer-pinned-summary-head small {
    color: #6b7e93;
}

.designer-pinned-dropzone {
    background: rgba(255, 255, 255, .72);
    min-height: 58px;
}

.designer-pinned-dropzone:empty::before {
    color: #74869b;
    content: "Drag selected fields here for an always-visible summary";
    font-size: 12px;
    margin: auto;
}

.designer-pinned-summary.is-collapsed {
    padding-block: 7px;
}

.designer-pinned-summary.is-collapsed .designer-pinned-summary-head {
    margin-bottom: 0;
}

.designer-pinned-summary.is-collapsed .designer-pinned-summary-head small,
.designer-pinned-summary.is-collapsed .designer-pinned-dropzone {
    display: none;
}

.designer-tab-menu-button {
    background: #f7f9fc;
    border: 1px solid #cfd9e7;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    color: #34465d;
    font-weight: 700;
    min-width: 120px;
    padding: 8px 12px;
    white-space: nowrap;
}

.designer-tab-menu-button.active {
    background: #18345e;
    border-color: #18345e;
    color: #fff;
}

.view-record-preview {
    display: grid;
    flex: 1;
    gap: 14px;
    grid-template-columns: minmax(720px, 1fr) 320px;
    min-height: 0;
    min-width: 1054px;
    overflow: auto;
    padding: 16px;
}

.view-record-preview.is-main-only {
    grid-template-columns: minmax(720px, 1fr);
    min-width: 720px;
}

.view-canvas {
    min-height: 0;
    min-width: 0;
    overflow: visible;
}

.view-canvas-shell[data-view-nav="left"] .view-record-preview {
    align-items: flex-start;
}

.designer-tab {
    display: none;
    min-width: 720px;
    width: 100%;
}

.designer-tab.active {
    display: block;
    outline: 2px solid rgba(13, 110, 253, .14);
    outline-offset: 4px;
}

.designer-record-right-panel {
    background: #f8fafc;
    border: 1px dashed #b8c7da;
    border-radius: 8px;
    min-height: 240px;
    overflow: auto;
    padding: 12px;
    position: sticky;
    top: 0;
}

.designer-record-right-panel .designer-section {
    margin: 0;
}

.designer-record-right-panel .designer-section-fields {
    min-height: 120px;
}

.record-view-component {
    min-width: 0;
}

.designer-component-assigned.is-header-placement {
    display: none !important;
}

.record-component-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.record-component-actions.is-vertical {
    align-items: stretch;
    flex-direction: column;
}

.record-component-actions.is-vertical.justify-content-center {
    align-items: center;
}

.record-component-actions.is-vertical.justify-content-end {
    align-items: flex-end;
}

.designer-lookup-profile-settings {
    border-top: 1px solid #e2e9f2;
    display: grid;
    gap: 9px;
    grid-column: 1 / -1;
    padding-top: 9px;
}

.designer-lookup-actions-setting {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lookup-profile-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    color: #263b55;
    overflow: visible;
    width: 100%;
    white-space: normal;
}

[data-record-field-value]:has(> .lookup-profile-card) {
    white-space: normal;
}

.lookup-profile-head {
    align-items: center;
    background: #f7f9fc;
    border-bottom: 1px solid #e3e9f1;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 11px 12px;
}

.lookup-profile-head > div:first-child {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.lookup-profile-head strong,
.lookup-profile-head small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lookup-profile-head small {
    color: #718298;
    font-size: 11px;
}

.lookup-profile-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
}

.lookup-profile-menu-toggle {
    align-items: center;
    border: 1px solid #d9e2ec;
    color: #50647b;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.lookup-profile-actions.dropdown > .lookup-profile-menu {
    display: none;
    min-width: 190px;
}

.lookup-profile-actions.dropdown > .lookup-profile-menu.show {
    display: block;
}

.lookup-profile-menu .dropdown-item {
    align-items: center;
    display: flex;
    font-size: 13px;
    gap: 8px;
    padding: 8px 13px;
}

.lookup-profile-menu .dropdown-item i {
    margin: 0;
    text-align: center;
    width: 16px;
}

.lookup-change-shell {
    display: grid;
    gap: 14px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
}

.lookup-change-search {
    align-items: center;
    display: flex;
    position: relative;
}

.lookup-change-search > i {
    color: #73859a;
    left: 13px;
    pointer-events: none;
    position: absolute;
}

.lookup-change-search .form-control {
    padding-left: 38px;
}

.lookup-change-results {
    border: 1px solid #e0e7ef;
    border-radius: 6px;
    min-height: 260px;
    overflow: auto;
}

.lookup-change-table {
    margin: 0;
}

.lookup-change-table thead {
    background: #f5f8fb;
    position: sticky;
    top: 0;
    z-index: 1;
}

.lookup-change-table tbody tr {
    cursor: pointer;
}

.lookup-change-table tbody tr.is-current {
    box-shadow: inset 3px 0 #a5b4c4;
}

.lookup-change-table tbody tr.is-selected {
    background: #eaf3ff;
    box-shadow: inset 3px 0 #2474c7;
}

.lookup-change-footer {
    align-items: center;
    border-top: 1px solid #e5ebf2;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-top: 14px;
}

.lookup-change-footer > div {
    display: flex;
    gap: 10px;
}

.lookup-profile-values {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(var(--lookup-profile-columns, 2), minmax(0, 1fr));
    padding: 4px 12px 9px;
}

.lookup-profile-value {
    border-bottom: 1px solid #edf1f6;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 8px 7px 0;
}

.lookup-profile-value span {
    color: #75869a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.lookup-profile-value b {
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.lookup-profile-card.is-stacked .lookup-profile-values {
    grid-template-columns: 1fr;
}

.lookup-profile-card.is-compact .lookup-profile-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 9px 12px 11px;
}

.lookup-profile-card.is-compact .lookup-profile-value {
    border: 0;
    display: flex;
    gap: 5px;
    padding: 0;
}

@media (max-width: 575px) {
    .lookup-profile-values {
        grid-template-columns: 1fr;
    }
}

.designer-component-action-list {
    border-top: 1px solid #e2e9f2;
    display: grid;
    gap: 4px;
    grid-column: 1 / -1;
    padding-top: 8px;
}

.designer-component-action-list-title {
    color: #52637a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.designer-component-action-row {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e1e8f1;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    padding: 4px 5px 4px 9px;
}

.record-view-component .document-manager-shell {
    margin: 0;
}

.designer-tab-title {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.designer-block,
.designer-section {
    background: #fff;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
}

.designer-block {
    padding: 14px;
}

.designer-block + .designer-block {
    margin-top: 12px;
}

.designer-sections-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -6px;
    margin-right: -6px;
    row-gap: 12px;
}

.designer-sections-grid > .designer-section {
    margin-left: 6px;
    margin-right: 6px;
}

.designer-sections-grid > .col-md-12 {
    flex: 0 0 calc(100% - 12px);
    max-width: calc(100% - 12px);
}

.designer-sections-grid > .col-md-4 {
    flex: 0 0 calc(33.333333% - 12px);
    max-width: calc(33.333333% - 12px);
}

.designer-sections-grid > .col-md-6 {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
}

.designer-sections-grid > .col-md-9 {
    flex: 0 0 calc(75% - 12px);
    max-width: calc(75% - 12px);
}

.designer-sections-grid > .col-md-3 {
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
}

.designer-block-head,
.designer-section-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
    position: relative;
}

.designer-title-control {
    min-width: 140px;
}

.designer-title-preview {
    color: #24364b;
    font-size: 14px;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-access-control {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 150px;
}

.designer-access-control > span {
    color: #6c7b90;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.designer-access-control .role-tags {
    min-width: 120px;
}

.role-rule {
    display: grid;
    gap: 5px;
    grid-template-columns: 96px minmax(120px, 1fr);
}

.designer-field-options-grid .role-rule {
    grid-template-columns: 1fr;
}

.designer-hover-tools {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    display: inline-flex;
    gap: 3px;
    opacity: 1;
    padding: 3px;
    overflow: visible;
    pointer-events: auto;
    transform: none;
    transition: background .14s ease, border-color .14s ease;
    visibility: visible;
}

.designer-block:hover > .designer-block-head .designer-hover-tools,
.designer-block:focus-within > .designer-block-head .designer-hover-tools,
.designer-block.is-handle-dragging > .designer-block-head .designer-hover-tools,
.designer-section:hover > .designer-section-head .designer-hover-tools,
.designer-section:focus-within > .designer-section-head .designer-hover-tools,
.designer-section.is-handle-dragging > .designer-section-head .designer-hover-tools,
.designer-field-assigned:hover .designer-hover-tools,
.designer-field-assigned:focus-within .designer-hover-tools,
.designer-field-assigned.is-handle-dragging .designer-hover-tools,
.designer-settings-menu[open] {
    background: #f8fafd;
    border-color: #dfe6f0;
}

.designer-hover-tools > [data-move-designer-block],
.designer-hover-tools > [data-move-designer-section],
.designer-hover-tools > [data-move-designer-field] {
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
    visibility: hidden;
}

.designer-block:hover > .designer-block-head .designer-hover-tools > [data-move-designer-block],
.designer-block:focus-within > .designer-block-head .designer-hover-tools > [data-move-designer-block],
.designer-section:hover > .designer-section-head .designer-hover-tools > [data-move-designer-section],
.designer-section:focus-within > .designer-section-head .designer-hover-tools > [data-move-designer-section],
.designer-field-assigned:hover .designer-hover-tools > [data-move-designer-field],
.designer-field-assigned:focus-within .designer-hover-tools > [data-move-designer-field] {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.designer-tool-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #41546e;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.designer-tool-btn:hover,
.designer-tool-btn:focus {
    background: #e8f0fb;
    color: #18345e;
}

.designer-tool-btn[data-toggle-pinned-field].is-active {
    background: #dcecff;
    color: #0b63ce;
}

.designer-tool-btn:disabled,
.designer-tool-btn[aria-disabled="true"] {
    color: #a8b4c3;
    cursor: not-allowed;
    opacity: .55;
}

.designer-tool-btn:disabled:hover,
.designer-tool-btn[aria-disabled="true"]:hover {
    background: transparent;
    color: #a8b4c3;
}

.designer-tool-btn.primary {
    color: #0b63ce;
}

.designer-tool-btn.primary:hover,
.designer-tool-btn.primary:focus {
    background: #dcecff;
}

.designer-tool-btn.danger {
    color: #b42318;
}

.designer-tool-btn.danger:hover,
.designer-tool-btn.danger:focus {
    background: #fde8e6;
}

.designer-settings-menu {
    position: relative;
}

.designer-settings-menu > summary {
    cursor: pointer;
    list-style: none;
}

.designer-settings-menu > summary::-webkit-details-marker {
    display: none;
}

.designer-settings-menu[open] > summary {
    background: #e8f0fb;
    color: #18345e;
}

.designer-settings-panel {
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(34, 48, 73, .16);
    color: #46617f;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
    min-width: 260px;
    max-width: calc(100vw - 32px);
    overflow: auto;
    padding: 9px;
    position: fixed;
    z-index: 1300;
}

.designer-settings-panel label {
    display: grid;
    gap: 4px;
}

.record-actions-config-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 1450;
}

.record-actions-config-modal.d-none {
    display: none !important;
}

.record-actions-config-backdrop {
    background: rgba(17, 30, 49, .56);
    inset: 0;
    position: absolute;
}

.record-actions-config-dialog {
    background: #fff;
    border: 1px solid #d8e1ed;
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(19, 35, 58, .28);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    position: relative;
    width: min(720px, 100%);
}

.record-actions-config-header {
    align-items: flex-start;
    border-bottom: 1px solid #e4eaf2;
    display: flex;
    justify-content: space-between;
    padding: 20px 22px 16px;
}

.record-actions-config-header h3 {
    color: #172b46;
    font-size: 20px;
    margin: 2px 0 3px;
}

.record-actions-config-header p {
    color: #687b92;
    font-size: 13px;
    margin: 0;
}

.record-actions-config-body {
    overflow: auto;
    padding: 20px 22px;
}

.record-actions-config-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-actions-config-grid label {
    color: #425873;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
}

.record-actions-config-placement {
    grid-column: 1 / -1;
}

.record-actions-config-placement small {
    color: #728399;
    font-weight: 500;
}

.record-page-header {
    gap: 20px;
}

.record-page-header-actions {
    flex: 1 1 auto;
    min-width: 0;
}

.record-page-header-actions .record-component-actions {
    justify-content: flex-end;
}

.record-page-identity {
    min-width: 0;
}

.record-transfer-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.record-transfer-summary > span:first-child {
    align-items: center;
    color: var(--app-muted, #667085);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
    text-transform: uppercase;
}

.record-transfer-summary > a,
.record-transfer-menu {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #465fff) 7%, var(--app-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--app-primary, #465fff) 24%, var(--app-border, #dce4e8));
    border-radius: 5px;
    color: var(--app-text, #1d2939);
    display: inline-flex;
    gap: 7px;
    min-height: 30px;
    padding: 4px 8px;
    text-decoration: none;
}

.record-transfer-summary > a:hover,
.record-transfer-menu:hover {
    border-color: var(--app-primary, #465fff);
    color: var(--app-primary, #465fff);
}

.record-transfer-summary > a b {
    color: var(--app-primary, #465fff);
    font-size: 10px;
    text-transform: uppercase;
}

.record-transfer-summary > a strong,
.record-transfer-menu strong {
    font-size: 12px;
}

.record-transfer-summary > a small {
    color: var(--app-muted, #667085);
    font-size: 10px;
}

.record-transfer-menu {
    cursor: pointer;
}

.record-transfer-summary .dropdown-menu {
    min-width: 280px;
    padding: 5px;
}

.record-transfer-summary .dropdown-item {
    align-items: center;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    padding: 7px 9px;
}

.record-transfer-summary .dropdown-item span,
.record-transfer-summary .dropdown-item b,
.record-transfer-summary .dropdown-item small {
    display: block;
}

.record-transfer-summary .dropdown-item b {
    font-size: 11px;
}

.record-transfer-summary .dropdown-item small {
    color: var(--app-muted, #667085);
    font-size: 10px;
}

.record-transfer-unavailable {
    color: var(--app-muted, #667085);
    font-size: 11px;
}

.record-conversion-journey {
    min-width: 0;
}

.record-conversion-journey > header {
    align-items: center;
    border-bottom: 1px solid var(--app-border, #dce4e8);
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 0 9px;
}

.record-conversion-journey > header i,
.record-conversion-icon {
    color: var(--app-primary, #465fff);
}

.record-conversion-items {
    display: grid;
    gap: 7px;
}

.record-conversion-item {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #465fff) 5%, var(--app-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--app-primary, #465fff) 18%, var(--app-border, #dce4e8));
    border-radius: 6px;
    color: var(--app-text, #1d2939);
    display: flex;
    gap: 9px;
    min-width: 0;
    padding: 9px 10px;
    text-decoration: none;
}

.record-conversion-item:hover {
    border-color: var(--app-primary, #465fff);
    color: var(--app-text, #1d2939);
}

.record-conversion-item.is-unavailable {
    opacity: .66;
}

.record-conversion-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.record-conversion-copy small {
    color: var(--app-primary, #465fff);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.record-conversion-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-conversion-copy > span {
    color: var(--app-muted, #667085);
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;
    gap: 8px;
}

.record-conversion-journey.is-cards .record-conversion-items {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.record-conversion-journey.is-compact.is-header {
    margin-top: 8px;
}

.record-conversion-journey.is-compact .record-conversion-items {
    display: flex;
    flex-wrap: wrap;
}

.record-conversion-journey.is-compact .record-conversion-item {
    min-height: 30px;
    padding: 4px 8px;
}

.record-conversion-journey.is-compact .record-conversion-icon,
.record-conversion-journey.is-compact .record-conversion-copy > span time {
    display: none;
}

.record-conversion-empty {
    color: var(--app-muted, #667085);
    font-size: 12px;
    padding: 9px 0;
}

@media (max-width: 767px) {
    .record-page-header {
        align-items: stretch !important;
        flex-direction: column;
    }

    .record-page-header-actions .record-component-actions {
        justify-content: flex-start;
    }
}

.record-actions-config-list-head {
    align-items: end;
    border-bottom: 1px solid #e5ebf3;
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    padding: 0 2px 10px;
}

.record-actions-config-list-head div {
    display: grid;
    gap: 2px;
}

.record-actions-config-list-head strong {
    color: #213955;
    font-size: 14px;
}

.record-actions-config-list-head small,
.record-actions-config-list-head > span {
    color: #78899d;
    font-size: 11px;
}

.record-actions-config-row {
    align-items: center;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 7px 2px;
}

.record-actions-config-row .form-check {
    align-items: center;
    display: flex;
    gap: 9px;
    margin: 0;
}

.record-actions-config-row .form-check-input {
    margin: 0;
}

.record-actions-config-order {
    display: flex;
    gap: 3px;
}

.record-actions-config-footer {
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid #e4eaf2;
    display: flex;
    justify-content: space-between;
    padding: 14px 22px;
}

.record-actions-config-footer > div {
    display: flex;
    gap: 10px;
}

.record-actions-config-footer-start {
    align-items: center;
}

.related-columns-dialog {
    width: min(1120px, calc(100vw - 32px));
}

.related-columns-toolbar,
.related-table-footer,
.related-records-head-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.related-columns-toolbar {
    margin-bottom: 14px;
}

.related-columns-toolbar > div {
    display: grid;
    gap: 2px;
}

.related-columns-toolbar small {
    color: #64748b;
}

.related-columns-list {
    display: grid;
    gap: 10px;
}

.related-column-row {
    display: grid;
    grid-template-columns: 26px minmax(150px, .9fr) minmax(210px, 1.4fr) minmax(110px, .65fr) minmax(120px, .7fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    background: #f8fafc;
}

.related-column-row label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.related-column-grip {
    color: #94a3b8;
    text-align: center;
}

.related-column-actions {
    display: flex;
    gap: 4px;
}

.related-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.related-table-sort i {
    color: #94a3b8;
    font-size: 11px;
}

.related-table-sort.is-active,
.related-table-sort.is-active i {
    color: #0b6bcb;
}

.related-table-total td {
    border-top: 2px solid #cbd5e1;
    background: #f8fafc;
}

.related-table-footer {
    padding-top: 10px;
    color: #64748b;
}

.related-link-dialog {
    width: min(680px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
}

.related-link-toolbar {
    padding: 16px 20px 10px;
}

.related-link-results {
    min-height: 180px;
    max-height: 430px;
    overflow: auto;
    padding: 6px 20px 18px;
}

.related-link-choice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 8px;
    border-bottom: 1px solid #e5eaf0;
    cursor: pointer;
}

.related-link-choice:hover {
    background: #f7fafe;
}

.related-link-choice span {
    display: grid;
    gap: 2px;
}

.related-link-choice small {
    color: #64748b;
}

@media (max-width: 900px) {
    .related-column-row {
        grid-template-columns: 22px 1fr 1fr;
    }

    .related-column-actions {
        grid-column: 2 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .related-column-row {
        grid-template-columns: 1fr;
    }

    .related-column-grip {
        display: none;
    }

    .related-column-actions {
        grid-column: auto;
    }

    .related-records-head-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .record-actions-config-modal {
        padding: 8px;
    }

    .record-actions-config-dialog {
        max-height: calc(100vh - 16px);
    }

    .record-actions-config-grid {
        grid-template-columns: 1fr;
    }

    .record-actions-config-footer,
    .record-actions-config-footer > div {
        align-items: stretch;
        flex-direction: column;
    }
}

.designer-settings-actions {
    border-top: 1px solid #edf1f6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 10px;
}

.designer-field-settings-panel {
    min-width: min(720px, calc(100vw - 32px));
    width: min(720px, calc(100vw - 32px));
}

.designer-check-setting {
    align-items: center;
    align-self: end;
    border: 1px solid #dfe6f0;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex !important;
    font-weight: 700;
    gap: 6px;
    min-height: 31px;
    padding: 6px 8px;
}

.designer-check-setting input {
    margin: 0;
}

.designer-section-tools {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.designer-section {
    padding: 12px;
    position: relative;
}

.designer-sections-grid.drag-over {
    background: #f3f8ff;
    outline: 1px dashed #80a8dd;
    outline-offset: 3px;
}

.designer-section.active {
    border-color: #6c98d9;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .1);
}

.designer-drop-hint {
    color: #6c7b90;
    font-size: 12px;
    white-space: nowrap;
}

.designer-section-fields {
    border: 1px dashed #b8c4d6;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 74px;
    padding: 10px;
}

.designer-section-fields.drag-over {
    background: #eef5ff;
    border-color: #6c98d9;
}

.designer-field-assigned {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    position: relative;
}

.designer-section-fields > .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.designer-section-fields > .col-md-9 {
    flex: 0 0 calc(75% - 6px);
    max-width: calc(75% - 6px);
}

.designer-section-fields > .col-md-6 {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

.designer-section-fields > .col-md-4 {
    flex: 0 0 calc(33.333333% - 6px);
    max-width: calc(33.333333% - 6px);
}

.designer-section-fields > .col-md-3 {
    flex: 0 0 calc(25% - 6px);
    max-width: calc(25% - 6px);
}

.designer-field-row {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.designer-drag-handle {
    align-items: center;
    background: #f4f7fb;
    border: 1px solid #dce4ef;
    border-radius: 6px;
    color: #6c7b90;
    cursor: grab;
    display: inline-flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transition: opacity .14s ease, background .14s ease, color .14s ease;
    visibility: hidden;
    width: 24px;
}

.designer-block:hover > .designer-block-head .designer-drag-handle,
.designer-block:focus-within > .designer-block-head .designer-drag-handle,
.designer-block.is-handle-dragging > .designer-block-head .designer-drag-handle,
.designer-section:hover > .designer-section-head .designer-drag-handle,
.designer-section:focus-within > .designer-section-head .designer-drag-handle,
.designer-section.is-handle-dragging > .designer-section-head .designer-drag-handle,
.designer-field-assigned:hover .designer-drag-handle,
.designer-field-assigned:focus-within .designer-drag-handle,
.designer-field-assigned.is-handle-dragging .designer-drag-handle {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.designer-drag-handle:hover,
.designer-drag-handle:focus {
    background: #e8f0fb;
    color: #18345e;
}

.designer-drag-handle:active {
    cursor: grabbing;
}

.designer-resize-grip {
    align-items: center;
    background: #eef3f8;
    border: 1px solid #c9d5e4;
    border-radius: 8px 0 8px 0;
    bottom: -1px;
    box-shadow: 0 2px 6px rgba(34, 48, 73, .12);
    color: #607086;
    cursor: ew-resize;
    display: inline-flex;
    font-size: 11px;
    height: 24px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: -1px;
    width: 24px;
    z-index: 3;
}

.designer-resize-grip:hover,
.designer-resize-grip:focus {
    background: #dfe9f5;
    border-color: #9fb4cc;
    color: #24364b;
}

.designer-section.is-resizing,
.designer-field-assigned.is-resizing {
    outline: 2px solid rgba(13, 110, 253, .24);
    outline-offset: 2px;
}

.designer-section.is-handle-dragging,
.designer-field-assigned.is-handle-dragging {
    opacity: .72;
    outline: 2px solid rgba(24, 52, 94, .28);
    outline-offset: 3px;
}

.designer-block.is-handle-dragging {
    opacity: .72;
    outline: 2px solid rgba(24, 52, 94, .28);
    outline-offset: 3px;
}

.designer-drop-marker {
    align-items: center;
    background: rgba(13, 110, 253, .1);
    border: 2px dashed #0d6efd;
    border-radius: 8px;
    color: #0d6efd;
    display: flex;
    flex: 0 0 100%;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 36px;
    width: 100%;
}

.designer-sections-grid > .designer-drop-marker {
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
}

.designer-section-fields > .designer-drop-marker {
    flex: 0 0 calc(25% - 6px);
    max-width: calc(25% - 6px);
}

.designer-drop-marker span::before {
    content: "Drop here";
}

.designer-drop-marker[data-kind="field"] {
    min-height: 42px;
}

.designer-field-main {
    min-width: 120px;
}

.designer-field-controls {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.designer-field-controls select,
.designer-section-tools select {
    width: 92px;
}

.designer-field-actions {
    gap: 4px;
}

.designer-field-actions [data-move-designer-field] {
    background: #eef4fb;
}

.designer-mini-check {
    align-items: center;
    border-left: 1px solid #dfe6f0;
    color: #41546e;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    gap: 4px;
    height: 28px;
    margin: 0;
    padding: 0 6px;
    white-space: nowrap;
}

.designer-mini-check input {
    margin: 0;
}

.designer-field-options {
    border-top: 1px solid #edf1f6;
    padding-top: 7px;
}

.designer-field-options summary {
    color: #46617f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
}

.designer-field-options summary::-webkit-details-marker {
    display: none;
}

.designer-field-options-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    margin-top: 8px;
}

.designer-field-options-grid label {
    color: #46617f;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    min-width: 0;
}

.designer-field-type-controls {
    border-top: 1px solid #dfe7f0;
    display: grid;
    gap: 9px;
    grid-column: 1 / -1;
    margin-top: 3px;
    padding-top: 10px;
}

.designer-setting-group-title {
    align-items: center;
    color: #243b57;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    text-transform: capitalize;
}

.designer-setting-group-title:not(:first-child) {
    border-top: 1px solid #edf1f6;
    margin-top: 3px;
    padding-top: 9px;
}

.designer-field-type-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-pinned-summary {
    background: #f8fbff;
    border: 1px solid #d9e5f1;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 14px;
    padding: 5px 12px;
}

.record-pinned-field {
    min-width: 180px;
    padding: 9px 14px;
    position: relative;
}

.record-pinned-component {
    min-width: 220px;
    padding: 8px;
}

.record-pinned-summary.is-patient-summary {
    background: #d9e7e4;
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    padding: 0;
}

.record-pinned-summary.is-patient-summary .record-pinned-field {
    background: #fff;
    max-width: none;
    min-width: 0;
    padding: 13px 16px;
    width: auto;
}

.record-pinned-summary.is-patient-summary .record-pinned-field-title,
.record-pinned-summary.is-patient-summary .record-pinned-field-value {
    background: transparent !important;
    border: 0 !important;
}

.record-pinned-summary.is-patient-summary .record-pinned-field-title {
    color: #607780 !important;
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.record-pinned-summary.is-patient-summary .record-pinned-field-value {
    color: #1d343a !important;
    font-size: 15px;
}

@media (max-width: 1200px) {
    .record-pinned-summary.is-patient-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .record-pinned-summary.is-patient-summary { grid-template-columns: 1fr; }
}

.finance-config-workspace {
    display: grid;
    gap: 18px;
}

.finance-profile-card,
.finance-new-type {
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dce4e8);
    border-radius: 7px;
    padding: 18px;
}

.finance-config-head,
.finance-form-actions,
.finance-type-card > summary,
.finance-rule-title,
.record-financials > header,
.record-financials > header > div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.finance-config-head h3 {
    font-size: 18px;
    margin: 2px 0 3px;
}

.finance-config-head p,
.finance-rule-title small,
.record-financials > header small {
    color: var(--app-muted, #667085);
    display: block;
    font-size: 11px;
    margin: 0;
}

.finance-form-actions {
    border-top: 1px solid var(--app-border, #dce4e8);
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
}

.finance-types-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
}

.finance-type-list,
.finance-fee-rules {
    display: grid;
    gap: 9px;
}

.finance-type-card {
    border: 1px solid var(--app-border, #dce4e8);
    border-radius: 6px;
    overflow: hidden;
}

.finance-type-card > summary {
    cursor: pointer;
    justify-content: flex-start;
    list-style: none;
    padding: 11px 12px;
}

.finance-type-card > summary::-webkit-details-marker { display: none; }
.finance-type-card > summary > span:nth-child(2) { display: grid; flex: 1 1 auto; }
.finance-type-card > summary small { color: var(--app-muted, #667085); font-size: 10px; }
.finance-type-card[open] > summary { background: color-mix(in srgb, var(--app-primary, #465fff) 5%, var(--app-surface, #fff)); border-bottom: 1px solid var(--app-border, #dce4e8); }
.finance-type-card[open] > summary > i { transform: rotate(180deg); }

.finance-type-icon,
.record-financials-icon {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #465fff) 10%, var(--app-surface, #fff));
    border-radius: 5px;
    color: var(--app-primary, #465fff);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.finance-type-icon.outflow { background: color-mix(in srgb, #b42318 9%, var(--app-surface, #fff)); color: #b42318; }
.finance-type-state { background: #f2f4f7; border-radius: 4px; color: #667085; font-size: 10px; font-weight: 800; padding: 3px 6px; text-transform: uppercase; }
.finance-type-state.active { background: #ecfdf3; color: #027a48; }
.finance-type-body { padding: 14px; }
.finance-type-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.finance-fee-rules { border-top: 1px solid var(--app-border, #dce4e8); margin-top: 16px; padding-top: 14px; }
.finance-fee-rule,.finance-add-rule { background: color-mix(in srgb, var(--app-border, #dce4e8) 20%, var(--app-surface, #fff)); border: 1px solid var(--app-border, #dce4e8); border-radius: 5px; padding: 10px; }
.finance-add-rule > summary { color: var(--app-primary, #465fff); cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.finance-add-rule form { margin-top: 10px; }
.finance-rule-grid { align-items: end; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-rule-grid > label { color: var(--app-muted, #667085); font-size: 10px; font-weight: 700; }
.finance-rule-grid > .finance-recipient-source-control { grid-column: span 2; }
.finance-rule-active { align-self: center; margin: 0; }
.finance-recipient-picker { min-width: 0; position: relative; }
.finance-recipient-picker > label { color: var(--app-muted, #667085); display: block; font-size: 10px; font-weight: 700; margin-bottom: 4px; }
.finance-recipient-results { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #dce4e8); border-radius: 6px; box-shadow: 0 12px 28px rgba(15, 23, 42, .16); left: 0; max-height: 220px; overflow: auto; padding: 5px; position: absolute; right: 0; top: calc(100% + 5px); z-index: 1085; }
.finance-recipient-results button { align-items: center; background: transparent; border: 0; border-radius: 5px; color: inherit; display: flex; justify-content: space-between; padding: 8px 9px; text-align: left; width: 100%; }
.finance-recipient-results button:hover { background: color-mix(in srgb, var(--app-primary, #465fff) 9%, var(--app-surface, #fff)); }
.finance-recipient-results button small,.finance-recipient-empty { color: var(--app-muted, #667085); font-size: 11px; }
.finance-recipient-empty { padding: 9px; }
.finance-operations-callout { align-items:center; background:color-mix(in srgb,var(--app-primary,#465fff) 6%,var(--app-surface,#fff)); border:1px solid color-mix(in srgb,var(--app-primary,#465fff) 24%,var(--app-border,#dce4e8)); border-radius:7px; display:flex; justify-content:space-between; padding:12px 14px; }
.finance-operations-callout > div,.finance-operations-callout span { align-items:center; display:flex; gap:10px; }
.finance-operations-callout > div > i { color:var(--app-primary,#465fff); font-size:22px; }
.finance-operations-callout span { align-items:flex-start; flex-direction:column; gap:1px; }
.finance-operations-callout small { color:var(--app-muted,#667085); }

.finance-operations-page { margin:0 auto; max-width:1680px; padding:22px; }
.finance-operations-header { align-items:flex-end; display:flex; gap:24px; justify-content:space-between; margin-bottom:16px; }
.finance-operations-header h1 { font-size:28px; margin:2px 0 4px; }
.finance-operations-header p { color:var(--app-muted,#667085); margin:0; }
.finance-operations-header-actions { align-items:center; display:flex; gap:9px; }
.finance-operations-header-actions select { min-width:260px; }
.finance-control-metrics { display:grid; gap:10px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:12px; }
.finance-control-metrics > div { background:var(--app-surface,#fff); border:1px solid var(--app-border,#dce4e8); border-radius:7px; display:grid; padding:13px 14px; }
.finance-control-metrics small { color:var(--app-muted,#667085); font-size:11px; font-weight:700; text-transform:uppercase; }
.finance-control-metrics strong { font-size:21px; margin:3px 0; }
.finance-control-metrics span { color:var(--app-muted,#667085); font-size:11px; }
.finance-operations-tabs { align-items:center; background:var(--app-surface,#fff); border:1px solid var(--app-border,#dce4e8); display:flex; gap:2px; margin-bottom:12px; overflow-x:auto; padding:5px; position:sticky; top:66px; z-index:30; }
.finance-operations-tabs a { border-radius:5px; color:var(--app-muted,#667085); font-size:12px; font-weight:700; padding:8px 11px; text-decoration:none; white-space:nowrap; }
.finance-operations-tabs a.active { background:var(--app-primary,#465fff); color:var(--app-primary-contrast,#fff); }
.finance-overview-grid,.finance-report-grid { display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.finance-overview-grid > section,.finance-workspace-section { background:var(--app-surface,#fff); border:1px solid var(--app-border,#dce4e8); border-radius:7px; min-width:0; overflow:hidden; }
.finance-overview-grid > section > header,.finance-workspace-section > header { align-items:center; border-bottom:1px solid var(--app-border,#dce4e8); display:flex; justify-content:space-between; padding:13px 15px; }
.finance-overview-grid h2,.finance-workspace-section h2 { font-size:16px; margin:0; }
.finance-overview-grid header p,.finance-workspace-section header p { color:var(--app-muted,#667085); font-size:11px; margin:2px 0 0; }
.finance-attention-list { display:grid; }
.finance-attention-list a { align-items:center; border-bottom:1px solid var(--app-border,#dce4e8); color:inherit; display:grid; gap:10px; grid-template-columns:34px minmax(0,1fr) auto; padding:13px 15px; text-decoration:none; }
.finance-attention-list a:last-child { border-bottom:0; }
.finance-attention-list a > i { align-items:center; background:color-mix(in srgb,var(--app-primary,#465fff) 9%,var(--app-surface,#fff)); border-radius:6px; color:var(--app-primary,#465fff); display:flex; height:34px; justify-content:center; }
.finance-attention-list span { display:grid; }
.finance-attention-list small { color:var(--app-muted,#667085); }
.finance-process-flow { display:grid; list-style:none; margin:0; padding:8px 15px 14px; }
.finance-process-flow li { align-items:flex-start; display:grid; gap:10px; grid-template-columns:28px 1fr; padding:8px 0; }
.finance-process-flow li > span { align-items:center; background:var(--app-primary,#465fff); border-radius:50%; color:var(--app-primary-contrast,#fff); display:flex; font-size:11px; height:25px; justify-content:center; }
.finance-process-flow li div { display:grid; }
.finance-process-flow small { color:var(--app-muted,#667085); }
.finance-workspace-section table { margin:0; }
.finance-workspace-section th { background:color-mix(in srgb,var(--app-page,#f4f7fa) 75%,var(--app-surface,#fff)); color:var(--app-muted,#667085); font-size:10px; text-transform:uppercase; white-space:nowrap; }
.finance-workspace-section td { font-size:12px; }
.finance-workspace-section td > strong,.finance-workspace-section td > small { display:block; }
.finance-workspace-section td > small { color:var(--app-muted,#667085); font-size:10px; }
.finance-row-actions { align-items:center; display:flex; gap:5px; justify-content:flex-end; }
.finance-row-actions form { margin:0; }
.finance-table-empty { color:var(--app-muted,#667085); padding:28px; text-align:center; }
.finance-report-wide { grid-column:1/-1; }
.finance-modal-note { align-items:flex-start; background:color-mix(in srgb,var(--app-primary,#465fff) 5%,var(--app-surface,#fff)); border:1px solid var(--app-border,#dce4e8); border-radius:6px; display:flex; gap:8px; margin-top:15px; padding:10px; }
.finance-empty-state { align-items:center; background:var(--app-surface,#fff); border:1px solid var(--app-border,#dce4e8); display:flex; flex-direction:column; min-height:360px; justify-content:center; padding:30px; text-align:center; }
.finance-empty-state i { color:var(--app-primary,#465fff); font-size:38px; }
.finance-empty-state h2 { font-size:20px; margin:8px 0 3px; }
.finance-empty-state p { color:var(--app-muted,#667085); }
.record-finance-header-actions { align-items:center; display:flex; gap:7px; }

.finance-invoice-page { margin:0 auto; max-width:1040px; padding:22px; }
.finance-invoice-toolbar { display:flex; justify-content:space-between; margin-bottom:12px; }
.finance-invoice-sheet { background:#fff; border:1px solid #dfe4ea; border-radius:12px; color:#1f2937; min-height:900px; padding:46px; }
.finance-invoice-header { align-items:flex-start; border-bottom:3px solid var(--app-primary,#465fff); display:flex; justify-content:space-between; padding-bottom:22px; }
.finance-invoice-brand { align-items:center; display:flex; gap:14px; }
.finance-invoice-brand img,.finance-invoice-brand-mark { align-items:center; border:1px solid #dfe4ea; border-radius:10px; display:flex; height:62px; justify-content:center; object-fit:contain; padding:5px; width:66px; }
.finance-invoice-brand-mark { color:var(--app-primary,#465fff); font-size:28px; }
.finance-invoice-brand div { display:grid; }
.finance-invoice-brand strong { font-size:20px; }
.finance-invoice-brand span { color:#667085; }
.finance-invoice-title { display:grid; justify-items:end; text-align:right; }
.finance-invoice-title > span { color:#667085; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.finance-invoice-title h1 { font-size:29px; margin:2px 0 7px; }
.finance-invoice-status { background:#ecfdf3; border-radius:999px; color:#027a48; font-size:12px; font-style:normal; font-weight:700; padding:4px 10px; }
.finance-invoice-status.is-void { background:#fef3f2; color:#b42318; }
.finance-invoice-meta { display:grid; gap:30px; grid-template-columns:1fr auto; padding:28px 0; }
.finance-invoice-bill-to { display:grid; }
.finance-invoice-bill-to small { color:#667085; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.finance-invoice-bill-to strong { font-size:19px; margin-top:5px; }
.finance-invoice-bill-to span { color:#667085; }
.finance-invoice-meta dl { margin:0; min-width:280px; }
.finance-invoice-meta dl div { display:flex; gap:24px; justify-content:space-between; padding:3px 0; }
.finance-invoice-meta dt { color:#667085; font-weight:500; }
.finance-invoice-meta dd { font-weight:700; margin:0; }
.finance-invoice-lines { border:1px solid #e4e7ec; }
.finance-invoice-lines thead th { background:#f2f7f6; color:#344054; font-size:12px; letter-spacing:.04em; padding:12px; text-transform:uppercase; }
.finance-invoice-lines td { padding:13px 12px; }
.finance-invoice-summary { align-items:flex-start; display:grid; gap:34px; grid-template-columns:1fr 360px; margin-top:25px; }
.finance-invoice-note { color:#667085; display:grid; font-size:13px; padding-top:8px; }
.finance-invoice-note strong { color:#344054; }
.finance-invoice-totals { display:grid; gap:7px; margin:25px 0 0 auto; max-width:360px; }
.finance-invoice-totals div,.finance-invoice-payments div { display:flex; justify-content:space-between; }
.finance-invoice-totals .total { border-top:2px solid #1f2937; font-size:18px; padding-top:9px; }
.finance-invoice-payments { border-top:1px solid #dfe4ea; margin-top:28px; padding-top:18px; }
.finance-invoice-payments h2 { font-size:16px; }
.finance-invoice-sheet footer { border-top:1px solid #e4e7ec; color:#98a2b3; font-size:11px; margin-top:42px; padding-top:14px; text-align:center; }
@page { margin:12mm; size:A4; }
@media print { body { background:#fff!important; } .app-navbar,.finance-invoice-toolbar,.app-running-timer { display:none!important; } .finance-invoice-page { max-width:none; padding:0; } .finance-invoice-sheet { border:0; border-radius:0; min-height:0; padding:0; print-color-adjust:exact; -webkit-print-color-adjust:exact; } }

@media (max-width:991px){.finance-control-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-overview-grid,.finance-report-grid{grid-template-columns:1fr}.finance-report-wide{grid-column:auto}.finance-operations-header{align-items:stretch;flex-direction:column}.finance-operations-header-actions{justify-content:space-between}}
@media (max-width:575px){.finance-operations-page{padding:12px}.finance-control-metrics{grid-template-columns:1fr}.finance-operations-header-actions{align-items:stretch;flex-direction:column}.finance-operations-header-actions form,.finance-operations-header-actions select{width:100%}.finance-invoice-sheet{padding:22px}.finance-invoice-header{gap:20px}.finance-invoice-brand span{display:none}.finance-invoice-meta,.finance-invoice-summary{grid-template-columns:1fr}.finance-invoice-meta dl{min-width:0}.finance-invoice-totals{margin-left:0;max-width:none}.finance-operations-callout{align-items:stretch;flex-direction:column;gap:10px}}

.clinical-bill-page { margin:0 auto; max-width:960px; padding:24px; }
.clinical-bill-toolbar { display:flex; justify-content:space-between; margin-bottom:14px; }
.clinical-bill-sheet { background:#fff; border:1px solid #dce5e3; border-radius:12px; color:#233331; min-height:840px; padding:44px; }
.clinical-bill-sheet > header { align-items:flex-start; border-bottom:3px solid var(--app-primary,#25877d); display:flex; justify-content:space-between; padding-bottom:22px; }
.clinical-bill-brand { align-items:center; display:flex; gap:14px; }
.clinical-bill-brand > img,.clinical-bill-brand > span { align-items:center; border:1px solid #dce5e3; border-radius:10px; display:flex; height:62px; justify-content:center; object-fit:contain; padding:5px; width:68px; }
.clinical-bill-brand > span { color:var(--app-primary,#25877d); font-size:28px; }
.clinical-bill-brand div { display:grid; }
.clinical-bill-brand strong { font-size:21px; }
.clinical-bill-brand small { color:#6b7f7c; }
.clinical-bill-number { display:grid; justify-items:end; text-align:right; }
.clinical-bill-number small { color:#6b7f7c; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.clinical-bill-number h1 { font-size:28px; margin:2px 0 7px; }
.clinical-bill-number span { background:#eaf6f3; border-radius:999px; color:#176a61; font-size:12px; font-weight:700; padding:4px 10px; }
.clinical-bill-details { display:grid; gap:32px; grid-template-columns:1fr auto; padding:28px 0; }
.clinical-bill-details > div { display:grid; }
.clinical-bill-details small { color:#6b7f7c; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.clinical-bill-details strong { font-size:19px; margin-top:5px; }
.clinical-bill-details span { color:#6b7f7c; }
.clinical-bill-details dl { margin:0; min-width:300px; }
.clinical-bill-details dl div { display:flex; gap:24px; justify-content:space-between; padding:3px 0; }
.clinical-bill-details dt { color:#6b7f7c; font-weight:500; }
.clinical-bill-details dd { font-weight:700; margin:0; text-align:right; }
.clinical-bill-description { background:#f5faf9; border:1px solid #e0ece9; border-radius:8px; min-height:110px; padding:18px; }
.clinical-bill-description h2 { font-size:14px; letter-spacing:.05em; margin:0 0 9px; text-transform:uppercase; }
.clinical-bill-description p { margin:0; white-space:normal; }
.clinical-bill-totals { display:grid; gap:8px; margin:28px 0 0 auto; max-width:390px; }
.clinical-bill-totals div { display:flex; justify-content:space-between; }
.clinical-bill-totals .total { border-top:2px solid #233331; font-size:18px; margin-top:4px; padding-top:10px; }
.clinical-bill-totals .balance { background:#eaf6f3; border-radius:6px; color:#176a61; font-size:17px; margin-top:4px; padding:10px; }
.clinical-bill-sheet footer { border-top:1px solid #e0e8e6; color:#899996; font-size:11px; margin-top:45px; padding-top:14px; text-align:center; }
@media print { .clinical-bill-toolbar,.app-navbar,.app-running-timer { display:none!important; } .clinical-bill-page { max-width:none; padding:0; } .clinical-bill-sheet { border:0; border-radius:0; min-height:0; padding:0; print-color-adjust:exact; -webkit-print-color-adjust:exact; } }
@media (max-width:575px) { .clinical-bill-page { padding:12px; } .clinical-bill-sheet { padding:22px; } .clinical-bill-details { grid-template-columns:1fr; } .clinical-bill-details dl { min-width:0; } }

.bill-items-editor { border:1px solid #d8e5e2; border-radius:8px; padding:12px; }
.bill-items-editor thead th { background:#f4f9f8; color:#42615d; font-size:12px; text-transform:uppercase; }
.bill-items-editor .bill-item-qty { width:95px; }
.bill-items-editor .bill-item-rate { width:145px; }
.bill-items-editor .bill-item-total { width:120px; }
.aos-bill-page { margin:0 auto; max-width:1040px; padding:22px; }
.aos-bill-sheet { background:#fff; border:1px solid #222; color:#111; font-family:Arial,Helvetica,sans-serif; margin:0 auto; min-height:1120px; position:relative; width:100%; }
.aos-bill-header { align-items:center; border-bottom:2px solid #111; display:grid; gap:28px; grid-template-columns:225px 1fr; min-height:155px; padding:16px 28px 10px; }
.aos-bill-logo { align-items:center; display:flex; flex-direction:column; text-align:center; }
.aos-bill-logo img { height:auto; max-height:125px; object-fit:contain; width:220px; }
.aos-logo-mark { align-items:center; background:#9d0707; border-radius:14px; color:#fff; display:flex; font-family:Georgia,serif; font-size:29px; height:70px; justify-content:center; letter-spacing:-5px; margin-bottom:5px; width:82px; }
.aos-logo-mark span { color:#fff; font-size:37px; margin:0 3px; }
.aos-bill-logo > strong { font-family:Georgia,serif; font-size:17px; font-weight:500; }
.aos-bill-logo > small { border-top:1px solid #444; font-size:7px; letter-spacing:2px; margin-top:3px; padding-top:3px; text-transform:uppercase; }
.aos-bill-clinic h1 { font-size:18px; margin:0 0 2px; }
.aos-bill-clinic h1 span { font-size:16px; }
.aos-bill-clinic p { font-size:14px; line-height:1.35; margin:0; }
.aos-bill-clinic p:nth-of-type(2) { margin-top:16px; }
.aos-patient-details { display:grid; font-size:17px; gap:10px 24px; grid-template-columns:1fr 1fr; min-height:160px; padding:8px 32px 6px; position:relative; }
.aos-patient-details > div { display:flex; gap:8px; }
.aos-patient-details .wide { grid-column:1 / -1; }
.aos-patient-details strong { min-width:132px; }
.aos-bill-reference { bottom:8px; position:absolute; right:32px; }
.aos-bill-reference strong { min-width:auto; }
.aos-bill-items { border-collapse:collapse; table-layout:fixed; width:100%; }
.aos-bill-items thead { border-bottom:2px solid #111; border-top:2px solid #111; }
.aos-bill-items th { font-size:17px; padding:5px 8px; }
.aos-bill-items th:nth-child(1) { width:10%; }
.aos-bill-items th:nth-child(2) { width:40%; }
.aos-bill-items th:nth-child(3) { width:12%; }
.aos-bill-items th:nth-child(4),.aos-bill-items th:nth-child(5) { width:19%; }
.aos-bill-items td { font-size:15px; padding:7px 10px; text-align:center; vertical-align:top; }
.aos-bill-items td:nth-child(2) { text-align:left; }
.aos-bill-items tbody { height:auto; }
.aos-bill-items-spacer { height:250px; }
.aos-bill-items-spacer td { padding:0; }
.aos-bill-payment-summary { border-top:2px solid #111; display:grid; gap:28px; grid-template-columns:1fr 1fr; min-height:155px; padding:22px 26px; }
.aos-amount-words { display:grid; gap:10px; }
.aos-amount-words strong,.aos-amount-values strong { font-size:17px; }
.aos-amount-words span { font-size:14px; line-height:1.45; }
.aos-amount-values { display:grid; gap:10px; }
.aos-amount-values > div { display:flex; gap:18px; justify-content:space-between; }
.aos-amount-values span { font-size:15px; font-weight:700; white-space:nowrap; }
.aos-bill-payment-footer { align-items:end; display:grid; gap:24px; grid-template-columns:1fr 1fr; min-height:230px; padding:20px 26px 14px; }
.aos-bank-details { display:grid; font-size:16px; }
.aos-bank-details > strong { font-size:17px; }
.aos-authorised-signature { align-items:center; display:flex; flex-direction:column; gap:8px; }
.aos-authorised-signature span { border-bottom:1px solid #111; display:block; min-height:60px; width:180px; }
.aos-authorised-signature strong { font-size:17px; }
.aos-bill-sheet > footer { border-top:2px solid #111; font-size:12px; line-height:1.45; padding:10px 20px 14px; text-align:center; }
@media print {
    html,body { background:#fff!important; height:auto; margin:0!important; padding:0!important; width:auto; }
    .aos-bill-page { margin:0; max-width:none; padding:0; width:196mm; }
    .aos-bill-sheet { border:0; box-sizing:border-box; break-inside:avoid-page; margin:0; min-height:0; page-break-inside:avoid; width:196mm; }
    .aos-bill-header { gap:20px; grid-template-columns:205px 1fr; min-height:130px; padding:8px 20px 6px; }
    .aos-bill-logo img { max-height:110px; width:200px; }
    .aos-bill-clinic h1 { font-size:16px; }
    .aos-bill-clinic h1 span { font-size:14px; }
    .aos-bill-clinic p { font-size:12px; line-height:1.25; }
    .aos-bill-clinic p:nth-of-type(2) { margin-top:8px; }
    .aos-patient-details { font-size:14px; gap:6px 18px; min-height:120px; padding:7px 24px 5px; }
    .aos-patient-details strong { min-width:110px; }
    .aos-bill-items th { font-size:14px; padding:4px 7px; }
    .aos-bill-items td { font-size:13px; padding:4px 8px; }
    .aos-bill-items-spacer { height:125px; }
    .aos-bill-payment-summary { gap:20px; min-height:115px; padding:14px 20px; }
    .aos-amount-words strong,.aos-amount-values strong { font-size:14px; }
    .aos-amount-words span,.aos-amount-values span { font-size:12px; }
    .aos-bill-payment-footer { gap:20px; min-height:165px; padding:12px 22px 10px; }
    .aos-bank-details { font-size:13px; }
    .aos-bank-details > strong,.aos-authorised-signature strong { font-size:14px; }
    .aos-authorised-signature span { min-height:45px; width:160px; }
    .aos-bill-sheet > footer { font-size:10px; line-height:1.3; padding:7px 16px 9px; }
}
@media (max-width:700px) { .aos-bill-header { grid-template-columns:1fr; } .aos-patient-details,.aos-bill-payment-summary { grid-template-columns:1fr; } .aos-bill-payment-footer { grid-template-columns:1fr; } .aos-bill-items tbody { height:auto; } }

.finance-disbursement-filters{align-items:end;background:color-mix(in srgb,var(--app-page,#f4f7fa) 70%,var(--app-surface,#fff));border-bottom:1px solid var(--app-border,#dce4e8);display:grid;gap:8px;grid-template-columns:135px 135px minmax(180px,1fr) 145px 145px minmax(220px,1.4fr);padding:11px 14px}.finance-method-icon{align-items:center;display:inline-flex;gap:6px;font-weight:700}.finance-method-icon i{align-items:center;background:color-mix(in srgb,var(--app-primary,#465fff) 9%,var(--app-surface,#fff));border-radius:5px;color:var(--app-primary,#465fff);display:flex;height:25px;justify-content:center;width:25px}.finance-status-badge.is-issued{background:#fff6db;color:#885b00}.finance-status-badge.is-cleared{background:#e8f7ee;color:#14723d}.finance-status-badge.is-void{background:#fdeceb;color:#a82e2a}.finance-account-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.finance-account-list,.finance-template-list{display:grid}.finance-account-list article,.finance-template-list article{align-items:center;border-bottom:1px solid var(--app-border,#dce4e8);display:grid;gap:11px;grid-template-columns:auto minmax(0,1fr) auto;padding:13px 15px}.finance-account-list article:last-child,.finance-template-list article:last-child{border-bottom:0}.finance-account-list article>div:nth-child(2),.finance-template-list article>div{display:grid}.finance-account-list span,.finance-account-list small,.finance-template-list span,.finance-template-list small{color:var(--app-muted,#667085);font-size:11px}.finance-account-icon,.finance-template-list>article>i{align-items:center;background:color-mix(in srgb,var(--app-primary,#465fff) 9%,var(--app-surface,#fff));border-radius:6px;color:var(--app-primary,#465fff);display:flex;height:36px;justify-content:center;width:36px}.finance-method-picker{display:grid;gap:8px;grid-template-columns:repeat(3,1fr)}.finance-method-picker label{cursor:pointer}.finance-method-picker input{height:1px;opacity:0;position:absolute;width:1px}.finance-method-picker span{align-items:center;border:1px solid var(--app-border,#dce4e8);border-radius:7px;display:flex;gap:9px;padding:11px 13px}.finance-method-picker i{color:var(--app-primary,#465fff);font-size:17px}.finance-method-picker input:checked+span{background:color-mix(in srgb,var(--app-primary,#465fff) 7%,var(--app-surface,#fff));border-color:var(--app-primary,#465fff);box-shadow:inset 0 0 0 1px var(--app-primary,#465fff)}

.finance-print-toolbar{display:flex;gap:8px;justify-content:flex-end;margin:16px auto 10px;max-width:8.5in}.finance-cheque-page{background:#fff;box-shadow:0 8px 28px rgba(18,29,45,.12);color:#172033;margin:0 auto 30px;min-height:11in;padding:.42in;width:8.5in}.printed-cheque{border:1px solid #9da7b3;display:grid;gap:.08in;grid-template-columns:1fr 1.2in 1.55in;grid-template-rows:.48in .57in .38in .54in .44in;min-height:3.25in;padding:.25in;position:relative}.printed-cheque-bank{display:grid;grid-column:1/3}.printed-cheque-bank strong{font-size:16px}.printed-cheque-bank span{color:#667085;font-size:10px}.printed-cheque-number{text-align:right}.printed-cheque-date{display:grid;text-align:right}.printed-cheque-date small,.printed-cheque-memo small{color:#667085;font-size:9px;text-transform:uppercase}.printed-cheque-payee{align-items:end;border-bottom:1px solid #344054;display:grid;grid-column:1/3;grid-template-columns:1.35in 1fr}.printed-cheque-payee small{font-size:9px;text-transform:uppercase}.printed-cheque-payee strong{font-size:15px}.printed-cheque-amount{align-self:end;border:1px solid #344054;font-size:15px;font-weight:800;padding:.08in;text-align:right}.printed-cheque-words{border-bottom:1px solid #344054;grid-column:1/4;text-transform:capitalize}.printed-cheque-memo{align-items:end;border-bottom:1px solid #344054;display:grid;grid-column:1/2;grid-template-columns:.48in 1fr}.printed-cheque-signature{align-items:end;display:grid;grid-column:2/4;margin-left:.2in;text-align:center}.printed-cheque-signature span{border-bottom:1px solid #344054}.printed-cheque-signature small{font-size:9px}.printed-cheque-micr{bottom:.13in;font-family:monospace;font-size:16px;left:0;letter-spacing:2px;position:absolute;text-align:center;width:100%}.printed-cheque-stub{border:1px dashed #98a2b3;margin-top:.2in;min-height:2.25in;padding:.18in}.printed-cheque-stub>header{border-bottom:1px solid #d0d5dd;display:flex;justify-content:space-between;padding-bottom:.08in}.printed-cheque-stub header>div{display:grid}.printed-cheque-stub header>div:last-child{text-align:right}.printed-cheque-stub small{color:#667085;font-size:9px}.printed-cheque-stub dl{display:grid;gap:.06in;grid-template-columns:repeat(4,1fr);margin:.12in 0}.printed-cheque-stub dl div{display:grid}.printed-cheque-stub dt{color:#667085;font-size:8px;text-transform:uppercase}.printed-cheque-stub dd{font-size:10px;margin:0}.printed-cheque-stub table{font-size:10px;width:100%}.printed-cheque-stub th,.printed-cheque-stub td{border-bottom:1px solid #eaecf0;padding:.05in;text-align:left}.printed-cheque-stub th:last-child,.printed-cheque-stub td:last-child{text-align:right}.finance-payment-confirmation{border:1px solid #d0d5dd;margin:1in auto;max-width:6.5in;padding:.5in}.finance-payment-confirmation>i{color:var(--app-primary,#465fff);font-size:32px}.finance-payment-confirmation h1{font-size:24px;margin:8px 0 0}.finance-payment-confirmation>p{color:#667085}.finance-payment-confirmation dl{display:grid;grid-template-columns:repeat(2,1fr)}.finance-payment-confirmation dl div{border-top:1px solid #eaecf0;display:grid;padding:12px 0}.finance-payment-confirmation dt{color:#667085;font-size:10px;text-transform:uppercase}.finance-payment-confirmation dd{font-weight:700;margin:0}
@media(max-width:1200px){.finance-disbursement-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:800px){.finance-account-grid{grid-template-columns:1fr}.finance-disbursement-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-method-picker{grid-template-columns:1fr}.finance-cheque-page{max-width:100%;overflow:auto;width:8.5in}}@media(max-width:575px){.finance-disbursement-filters{grid-template-columns:1fr}}@media print{.finance-print-toolbar,.app-navbar,.app-running-timer{display:none!important}.finance-cheque-page{box-shadow:none;margin:0;min-height:0;padding:.25in;width:8.5in}.printed-cheque-stub{break-inside:avoid}.printed-cheque{break-inside:avoid}}
.finance-account-list article,.finance-template-list article{grid-template-columns:auto minmax(0,1fr) auto auto}
.finance-escrow-summary{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:12px}.finance-escrow-summary article{align-items:center;background:var(--app-surface,#fff);border:1px solid var(--app-border,#dce4e8);border-radius:7px;display:flex;gap:11px;padding:13px 14px}.finance-escrow-summary article>i{align-items:center;background:color-mix(in srgb,var(--app-primary,#465fff) 9%,var(--app-surface,#fff));border-radius:6px;color:var(--app-primary,#465fff);display:flex;font-size:17px;height:38px;justify-content:center;width:38px}.finance-escrow-summary article div{display:grid}.finance-escrow-summary small{color:var(--app-muted,#667085);font-size:9px;font-weight:800;text-transform:uppercase}.finance-escrow-summary strong{font-size:18px}.finance-status-badge.is-received{background:#edf3ff;color:#335c9e}.finance-status-badge.is-deposited{background:#fff6db;color:#885b00}.finance-status-badge.is-approved,.finance-status-badge.is-ready{background:#e8f3ff;color:#17639a}.finance-status-badge.is-partially_issued{background:#fff2d8;color:#865000}.finance-status-badge.is-held{background:#f0edff;color:#5b45a7}.finance-entity-results{background:var(--app-surface,#fff);border:1px solid var(--app-border,#dce4e8);border-radius:6px;box-shadow:0 12px 30px rgba(18,29,45,.16);display:grid;left:0;max-height:220px;overflow:auto;position:absolute;right:0;top:calc(100% + 4px);z-index:1065}.finance-entity-results button{background:none;border:0;border-bottom:1px solid var(--app-border,#edf1f4);color:var(--app-text,#172033);font-size:12px;padding:9px 11px;text-align:left}.finance-entity-results button:hover{background:color-mix(in srgb,var(--app-primary,#465fff) 7%,var(--app-surface,#fff))}
.finance-settlement-page{display:grid;gap:12px;margin:0 auto;max-width:1680px;padding:22px}.finance-settlement-header{align-items:flex-end;display:flex;justify-content:space-between;gap:20px}.finance-settlement-header>div:first-child{display:grid}.finance-settlement-header a{font-size:12px;margin-bottom:12px;text-decoration:none}.finance-settlement-header h1{font-size:27px;margin:2px 0}.finance-settlement-header p{color:var(--app-muted,#667085);margin:0}.finance-settlement-header-actions{align-items:center;display:flex;gap:8px}.finance-settlement-metrics{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr))}.finance-settlement-metrics article{background:var(--app-surface,#fff);border:1px solid var(--app-border,#dce4e8);border-radius:7px;display:grid;padding:13px 14px}.finance-settlement-metrics small{color:var(--app-muted,#667085);font-size:9px;font-weight:800;text-transform:uppercase}.finance-settlement-metrics strong{font-size:20px;margin:3px 0}.finance-settlement-metrics span{color:var(--app-muted,#667085);font-size:10px}.finance-settlement-metrics .is-attention{border-color:#e5a53d;background:#fffaf0}.finance-settlement-metrics .is-attention strong{color:#9b6100}.finance-settlement-metrics .is-balanced{border-color:#6fb68c;background:#f4fbf7}.finance-settlement-metrics .is-balanced strong{color:#187544}.finance-settlement-source{align-items:center;background:var(--app-surface,#fff);border:1px solid var(--app-border,#dce4e8);border-left:4px solid var(--app-primary,#465fff);border-radius:7px;display:grid;gap:14px;grid-template-columns:1.4fr repeat(3,1fr);padding:12px 14px}.finance-settlement-source>div{display:grid}.finance-settlement-source>div:first-child{align-items:center;display:flex;gap:10px}.finance-settlement-source>div:first-child>i{align-items:center;background:color-mix(in srgb,var(--app-primary,#465fff) 9%,var(--app-surface,#fff));border-radius:6px;color:var(--app-primary,#465fff);display:flex;height:34px;justify-content:center;width:34px}.finance-settlement-source small{color:var(--app-muted,#667085);font-size:9px;text-transform:uppercase}.finance-settlement-source span{color:var(--app-muted,#667085);font-size:10px}.finance-settlement-lines tfoot th{background:color-mix(in srgb,var(--app-primary,#465fff) 5%,var(--app-surface,#fff));font-size:11px}.finance-settlement-ledger>header>strong{font-size:13px}
@media(max-width:1000px){.finance-escrow-summary,.finance-settlement-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-settlement-source{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-settlement-header{align-items:flex-start;flex-direction:column}.finance-settlement-header-actions{flex-wrap:wrap}}@media(max-width:575px){.finance-escrow-summary,.finance-settlement-metrics,.finance-settlement-source{grid-template-columns:1fr}.finance-settlement-page{padding:12px}}
@media print{.finance-settlement-header a,.finance-settlement-header-actions,.finance-settlement-lines .finance-row-actions,.finance-settlement-lines>header form,.app-navbar,.app-running-timer{display:none!important}.finance-settlement-page{max-width:none;padding:0}.finance-settlement-ledger{break-before:page}}

.record-financials {
    border: 1px solid var(--app-border, #dce4e8);
    border-radius: 7px;
    overflow: hidden;
}

.record-financials > header { background: color-mix(in srgb, var(--app-primary, #465fff) 4%, var(--app-surface, #fff)); padding: 11px 13px; }
.record-financials > header > div { justify-content: flex-start; }
.record-financials > header > div > div { display: grid; }
.record-finance-summary { border-top: 1px solid var(--app-border, #dce4e8); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.record-finance-summary > div { border-right: 1px solid var(--app-border, #dce4e8); display: grid; padding: 12px 14px; }
.record-finance-summary > div:last-child { border-right: 0; }
.record-finance-summary small { color: var(--app-muted, #667085); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.record-finance-summary strong { font-size: 17px; }
.record-finance-table { border-top: 1px solid var(--app-border, #dce4e8); }
.record-finance-table th { background: color-mix(in srgb, var(--app-border, #dce4e8) 18%, var(--app-surface, #fff)); white-space: nowrap; }
.record-finance-table td:first-child strong,.record-finance-table td:first-child small,.finance-status-badge + small { display: block; }
.record-finance-table td:first-child small,.finance-status-badge + small { color: var(--app-muted, #667085); font-size: 10px; }
.finance-category-badge,.finance-status-badge { background: #f2f4f7; border-radius: 4px; display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 6px; }
.finance-status-badge.is-posted { background: #ecfdf3; color: #027a48; }
.finance-status-badge.is-draft { background: #fffaeb; color: #b54708; }
.finance-status-badge.is-reversed { background: #fef3f2; color: #b42318; }
.finance-amount { font-weight: 800; white-space: nowrap; }
.finance-amount.is-outflow { color: #b42318; }
.finance-amount.is-inflow { color: #027a48; }
.record-finance-empty { align-items: center; color: var(--app-muted, #667085); display: flex; flex-direction: column; gap: 3px; justify-content: center; min-height: 100px; }
.record-finance-empty i { color: var(--app-primary, #465fff); font-size: 24px; }

.operations-finance-config { display: grid; gap: 10px; grid-template-columns: 180px minmax(0,1fr); }
.operations-finance-config label,.operations-finance-date { display: grid; gap: 5px; }
.operations-finance-expression,.operations-finance-date { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; margin-top: 10px; padding: 11px; }
.operations-finance-expression > header,.operations-finance-date > header { display: grid; margin-bottom: 8px; }
.operations-finance-expression > header small { color: #667085; }
.operations-finance-date { align-items: end; grid-template-columns: 150px minmax(160px,1fr) minmax(220px,1fr); }
.operations-finance-date > header { grid-column: 1/-1; }

@media (max-width: 991px) {
    .finance-types-layout { grid-template-columns: 1fr; }
    .finance-rule-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .record-finance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .operations-finance-date { grid-template-columns: 1fr; }
    .operations-finance-date > header { grid-column: auto; }
}

@media (max-width: 575px) {
    .finance-rule-grid,.operations-finance-config,.record-finance-summary { grid-template-columns: 1fr; }
    .finance-rule-grid > .finance-recipient-source-control { grid-column: span 1; }
    .record-financials > header { align-items: flex-start; flex-direction: column; }
}

.record-pinned-field-title,
.record-pinned-field-value {
    border: 1px solid transparent;
}

.record-pinned-field-title {
    color: #667085;
    padding: 0;
}

.record-pinned-field-value {
    min-height: 1.4em;
    padding: 0;
}

.record-pinned-field + .record-pinned-field {
    border-left: 0;
}

.record-field-shell {
    position: relative;
}

[data-record-field-value] {
    white-space: pre-line;
}

.record-field-edit-action {
    opacity: 0;
    position: absolute;
    right: 4px;
    top: 2px;
    transition: opacity .14s ease;
    z-index: 2;
}

.record-field-shell:hover .record-field-edit-action,
.record-field-shell:focus-within .record-field-edit-action {
    opacity: 1;
}

.record-inline-editor {
    background: #fff;
    border: 1px solid #ccd8e6;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(27, 45, 70, .16);
    display: none;
    margin-top: 7px;
    padding: 12px;
    position: relative;
    z-index: 5;
}

.record-inline-editor.is-open {
    display: block;
}

.record-inline-editor-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 10px;
}

.record-block-head-runtime {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

@media (max-width: 767px) {
    .designer-field-type-grid { grid-template-columns: 1fr; }
    .record-pinned-field { min-width: 50%; }
}

.designer-settings-panel .form-select,
.designer-settings-panel .form-control,
.designer-settings-panel .role-tags {
    min-width: 0;
    width: 100%;
}

.designer-nested-settings {
    border: 1px solid #edf1f6;
    border-radius: 7px;
    padding: 8px;
}

.designer-nested-settings > summary {
    color: #34465d;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.designer-nested-settings > summary::-webkit-details-marker {
    display: none;
}

.designer-style-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 5px;
}

.designer-style-grid label {
    color: #46617f;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    min-width: 0;
}

.designer-style-grid input[type="color"] {
    height: 28px;
    min-width: 0;
    padding: 2px;
    width: 100%;
}

.designer-merge-fields {
    grid-column: 1 / -1;
}

.record-block-head-runtime:empty,
.record-subsection-title:empty {
    min-height: 8px;
}

.designer-style-wide {
    grid-column: 1 / -1;
}

@media (max-width: 1100px) {
    .view-designer-settings {
        grid-template-columns: minmax(220px, 1fr) 132px minmax(190px, 1fr) 72px 142px 154px;
    }

    .view-designer-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .view-designer-action-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    .builder-shell {
        grid-template-columns: 1fr;
    }

    .panel-header {
        display: block;
    }

    .panel-header .d-flex {
        margin-top: 16px;
    }

    .view-field-row {
        grid-template-columns: 38px 1fr;
    }

    .view-field-row.header {
        display: none;
    }

    .view-designer-settings,
    .view-designer-workbench {
        grid-template-columns: 1fr;
    }

    .view-designer-workbench {
        display: flex;
        flex-direction: column;
    }

    .view-field-palette {
        border-bottom: 1px solid #dfe6f0;
        border-right: 0;
        flex: 0 0 auto;
    }

    .view-field-palette {
        max-height: 230px;
    }

    .view-designer-inspector {
        border-left: 0;
        border-top: 1px solid #dfe6f0;
        max-height: 320px;
    }

    .view-designer-dialog {
        height: calc(100vh - 18px);
        max-width: calc(100vw - 18px);
    }

    .view-record-preview {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .designer-record-right-panel {
        max-width: none;
        position: static;
    }

    .designer-sections-grid > .designer-section {
        flex-basis: calc(100% - 12px);
        max-width: calc(100% - 12px);
    }

    .designer-section-fields > .designer-field-assigned {
        flex-basis: 100%;
        max-width: 100%;
    }

    .designer-field-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .designer-field-controls {
        justify-content: space-between;
        width: 100%;
    }

    .designer-field-options-grid {
        grid-template-columns: 1fr;
    }

    .designer-settings-panel,
    .designer-field-settings-panel {
        min-width: min(82vw, 360px);
    }
}

@media (hover: none) {
    .designer-hover-tools {
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .designer-drag-handle {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
}

.logic-builder {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.activity-inline-section-title {
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-top: 4px;
    padding-top: 10px;
    text-transform: uppercase;
}

.logic-builder-rows {
    display: grid;
    gap: 8px;
}

.logic-builder-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(120px, 1.2fr) minmax(120px, 1fr) minmax(105px, .8fr) minmax(120px, 1fr) auto auto;
}

.logic-builder-row .form-check.compact {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    margin: 0;
    white-space: nowrap;
}

[data-field-update-row].logic-builder-row {
    align-items: start;
    grid-template-columns: minmax(150px, 1.1fr) minmax(120px, .85fr) minmax(130px, .95fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
}

.workflow-action-row.logic-builder-row {
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.5fr) minmax(150px, 1.2fr) minmax(110px, .8fr) minmax(130px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1.2fr) minmax(220px, 1.7fr) auto;
}

.field-update-calculation,
.field-update-date-offset,
.rule-condition-date-offset,
.notify-merge-picker {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 8px;
}

.field-update-date-offset {
    grid-template-columns: 1.4fr 1.4fr .7fr .9fr;
}

.rule-condition-date-offset {
    grid-template-columns: .8fr 1fr;
}

.notify-merge-picker {
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    padding: 8px;
}

.field-update-calculation.d-none,
.field-update-date-offset.d-none,
.rule-condition-date-offset.d-none,
.notify-merge-picker.d-none {
    display: none !important;
}

@media (max-width: 900px) {
    .logic-builder-row,
    [data-field-update-row].logic-builder-row,
    .workflow-action-row.logic-builder-row,
    .field-update-calculation,
    .field-update-date-offset,
    .rule-condition-date-offset,
    .notify-merge-picker {
        grid-template-columns: 1fr;
    }
}

.notification-button {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    position: relative;
    width: 38px;
}

.notification-button:hover,
.notification-button:focus {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.notification-badge {
    align-items: center;
    background: #ffcc33;
    border: 2px solid #0d6efd;
    border-radius: 999px;
    color: #1f2937;
    display: inline-flex;
    font-size: .66rem;
    font-weight: 800;
    height: 19px;
    justify-content: center;
    min-width: 19px;
    padding: 0 4px;
    position: absolute;
    right: -5px;
    top: -6px;
}

.notification-dropdown {
    border: 0;
    left: auto !important;
    right: 0 !important;
    max-width: calc(100vw - 32px);
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: 380px;
}

.notification-dropdown-header,
.notification-dropdown-footer {
    align-items: center;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
}

.notification-dropdown-footer {
    border-top: 1px solid #e2e8f0;
    justify-content: center;
}

.notification-dropdown-item a {
    color: #111827;
    display: grid;
    gap: 8px;
    grid-template-columns: 8px 1fr;
    padding: 10px 12px;
    text-decoration: none;
}

.notification-dropdown-item a:hover {
    background: #f1f5f9;
}

.notification-dropdown-item small {
    color: #64748b;
    display: block;
    line-height: 1.25;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.notification-dropdown-item a > span:last-child {
    min-width: 0;
}

.notification-dropdown-item strong {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .notification-dropdown {
        left: 0 !important;
        right: auto !important;
        width: min(380px, calc(100vw - 32px));
    }
}

.notification-dot {
    background: #cbd5e1;
    border-radius: 999px;
    height: 8px;
    margin-top: 6px;
    width: 8px;
}

.notification-dropdown-item.unread .notification-dot {
    background: #0d6efd;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px 1fr;
    padding: 14px;
}

.notification-card.unread {
    border-color: #9ec5fe;
    box-shadow: 0 10px 24px rgba(13, 110, 253, .08);
}

.notification-card-icon {
    align-items: center;
    background: #eef6ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.dashboard-section-head,
.dashboard-widget-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.dashboard-command-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 8px 0 14px;
}

.dashboard-command-title h1 {
    font-size: 1.65rem;
    letter-spacing: 0;
    margin: 2px 0 4px;
}

.dashboard-command-title p {
    color: #64748b;
    margin: 0;
}

.dashboard-context-bar {
    align-items: center;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dbe3ee);
    border-radius: 7px;
    display: flex;
    gap: 9px;
    padding: 5px 8px;
}

.dashboard-context-bar > span { align-items: center; display: flex; gap: 7px; white-space: nowrap; }
.dashboard-context-bar > span i { color: var(--app-primary, #0f766e); }
.dashboard-context-bar label { align-items: center; display: flex; gap: 6px; margin: 0; }
.dashboard-context-bar label small { color: color-mix(in srgb, var(--app-text) 62%, transparent); font-weight: 700; }
.dashboard-context-bar select { min-width: 132px; min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.dashboard-context-note { color: color-mix(in srgb, var(--app-text) 58%, transparent); margin-left: auto; }
.dashboard-focus-context { width:max-content; max-width:100%; }
.dashboard-focus-context > span { padding-right:2px; font-size:12px; }
.dashboard-focus-context label small { font-size:10px; text-transform:uppercase; }
.dashboard-context-help { display:grid; place-items:center; width:28px; height:28px; padding:0; border:0; border-radius:5px; background:transparent; color:color-mix(in srgb, var(--app-text) 58%, transparent); }
.dashboard-context-help:hover, .dashboard-context-help:focus-visible { background:color-mix(in srgb, var(--app-primary) 8%, transparent); color:var(--app-primary); }

.dashboard-adaptive-strip {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(190px, .8fr) repeat(3, minmax(220px, 1fr));
}

.dashboard-adaptive-intro,
.dashboard-adaptive-strip article {
    align-items: center;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dbe3ee);
    border-radius: 7px;
    display: flex;
    gap: 9px;
    min-width: 0;
    padding: 9px 10px;
}

.dashboard-adaptive-intro > i { color: var(--app-accent, #d77a35); font-size: 1.1rem; }
.dashboard-adaptive-intro span,
.dashboard-adaptive-strip article > span { min-width: 0; }
.dashboard-adaptive-strip small { color: color-mix(in srgb, var(--app-text) 60%, transparent); display: block; font-size: .68rem; }
.dashboard-adaptive-strip article .btn { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

.dashboard-signal-state {
    align-items: center;
    background: color-mix(in srgb, var(--app-page) 70%, var(--app-surface));
    border: 1px solid var(--app-border);
    border-radius: 6px;
    display: flex;
    gap: 9px;
    padding: 8px 9px;
}
.dashboard-signal-state i { color: #64748b; }
.dashboard-signal-state small { display: block; }
.dashboard-signal-state.is-matched.signal-critical { background: #fff1f2; border-color: #fda4af; color: #9f1239; }
.dashboard-signal-state.is-matched.signal-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.dashboard-signal-state.is-matched.signal-info { background: #ecfeff; border-color: #67e8f9; color: #155e75; }
.dashboard-signal-state.is-matched.signal-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.dashboard-decision-widget.is-signal.is-matched { border-left: 4px solid #f59e0b; }
.dashboard-decision-widget.is-signal.signal-critical.is-matched { border-left-color: #e11d48; }

.dashboard-space-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.dashboard-space-tabs a {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #475569;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 7px;
    padding: 8px 11px;
    text-decoration: none;
}

.dashboard-space-tabs a.active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    font-weight: 700;
}

.dashboard-space-tabs small {
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    font-size: .65rem;
    padding: 2px 5px;
}

.dashboard-ai-brief {
    align-items: center;
    background: #102a43;
    border: 1px solid #243b53;
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 180px;
    padding: 18px 20px;
}

.dashboard-ai-brief-copy {
    align-items: flex-start;
    display: flex;
    gap: 14px;
}

.dashboard-ai-mark {
    align-items: center;
    background: #2dd4bf;
    border-radius: 7px;
    color: #083344;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
}

.dashboard-ai-brief .eyebrow {
    color: #5eead4;
}

.dashboard-ai-brief h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.5;
    margin: 2px 0 4px;
}

.dashboard-ai-brief small {
    color: #bcccdc;
}

.dashboard-ai-risk {
    display: grid;
    gap: 3px;
    text-align: right;
}

.dashboard-ai-risk span {
    color: #bcccdc;
    font-size: .72rem;
}

.dashboard-ai-risk strong {
    font-size: 1.65rem;
}

.dashboard-ai-risk div {
    background: #334e68;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.dashboard-ai-risk i {
    background: #f59e0b;
    display: block;
    height: 100%;
}

.dashboard-ai-command {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px 9px 8px 13px;
}

.dashboard-ai-command > i {
    color: #0f766e;
    font-size: 1.1rem;
}

.dashboard-ai-command input {
    border: 0;
    min-width: 0;
    outline: 0;
}

.dashboard-ai-response {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    padding: 12px;
}

.dashboard-ai-thinking {
    color: #115e59;
}

.dashboard-ai-answer {
    display: grid;
    gap: 10px;
}

.dashboard-ai-answer p {
    color: #475569;
    margin: 3px 0 0;
}

.dashboard-ai-report-suggestions {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-ai-report-suggestions button {
    align-items: center;
    background: #fff;
    border: 1px solid #99f6e4;
    border-radius: 7px;
    color: #134e4a;
    display: flex;
    justify-content: space-between;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.dashboard-ai-report-suggestions small {
    color: #64748b;
    display: block;
    font-size: .72rem;
}

.dashboard-intelligence-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(300px, .7fr) minmax(460px, 1.3fr);
}

.dashboard-metrics-strip {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-metrics-strip > div {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-left: 4px solid #94a3b8;
    border-radius: 7px;
    display: grid;
    padding: 11px 12px;
}

.dashboard-metrics-strip .tone-danger { border-left-color: #dc2626; }
.dashboard-metrics-strip .tone-warning { border-left-color: #f59e0b; }
.dashboard-metrics-strip .tone-success { border-left-color: #16a34a; }
.dashboard-metrics-strip .tone-info { border-left-color: #0891b2; }

.dashboard-metrics-strip small {
    color: #64748b;
    font-size: .7rem;
}

.dashboard-metrics-strip strong {
    font-size: 1.45rem;
}

.dashboard-next-actions {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 12px;
}

.dashboard-next-actions h2,
.dashboard-canvas-heading h2 {
    font-size: .95rem;
    letter-spacing: 0;
    margin: 0;
}

.dashboard-next-actions p {
    color: #64748b;
    font-size: .75rem;
    margin: 2px 0 0;
}

.dashboard-action-list {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.dashboard-action-list a {
    align-items: center;
    border-top: 1px solid #edf2f7;
    color: #1e293b;
    display: grid;
    gap: 9px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    padding: 8px 3px;
    text-decoration: none;
}

.dashboard-action-list a > i:first-child {
    align-items: center;
    background: #ecfeff;
    border-radius: 6px;
    color: #0e7490;
    display: inline-flex;
    height: 30px;
    justify-content: center;
}

.dashboard-action-list small,
.dashboard-action-list em {
    color: #64748b;
    display: block;
    font-size: .68rem;
    font-style: normal;
}

.dashboard-canvas-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 12px 0;
}

.dashboard-canvas-heading > span {
    color: #64748b;
    font-size: .75rem;
}

.dashboard-widget-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-widget-shell,
.dashboard-widget-drop-placeholder {
    grid-column: span var(--widget-span, 6);
    min-width: 0;
    position: relative;
}

.dashboard-widget-shell {
    height: var(--widget-height, auto);
    transition: opacity .16s ease, box-shadow .16s ease;
}

.dashboard-widget-shell.is-dragging {
    opacity: .45;
}

.dashboard-widget-shell.is-resizing {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-primary) 20%, transparent);
    transition: none;
}

.dashboard-widget-shell.is-saving-layout {
    opacity: .72;
}

.dashboard-widget-drop-placeholder {
    animation: dashboard-drop-pulse 1s ease-in-out infinite alternate;
    background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface));
    border: 2px dashed color-mix(in srgb, var(--app-primary) 65%, var(--app-border));
    border-radius: 8px;
    min-height: 96px;
}

@keyframes dashboard-drop-pulse {
    from { background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface)); }
    to { background: color-mix(in srgb, var(--app-primary) 12%, var(--app-surface)); }
}

.dashboard-layout-notice {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface));
    border: 1px solid color-mix(in srgb, var(--app-primary) 28%, var(--app-border));
    border-radius: 7px;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
}

.dashboard-layout-notice span {
    align-items: center;
    color: var(--app-text);
    display: flex;
    font-size: .76rem;
    gap: 7px;
}

.dashboard-layout-notice i {
    color: var(--app-primary);
}

[data-dashboard-arrange].active {
    background: var(--app-primary);
    color: var(--app-primary-contrast);
}

.dashboard-widget-layout-control,
.dashboard-widget-resize,
.dashboard-widget-size-badge {
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.dashboard-widget-shell:hover .dashboard-widget-layout-control,
.dashboard-widget-shell:hover .dashboard-widget-resize,
.dashboard-layout-mode .dashboard-widget-layout-control,
.dashboard-layout-mode .dashboard-widget-resize {
    opacity: 1;
    pointer-events: auto;
}

[data-widget-drag-handle] {
    cursor: grab;
}

[data-widget-drag-handle]:active {
    cursor: grabbing;
}

.dashboard-widget-resize {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary) 11%, var(--app-surface));
    border: 1px solid color-mix(in srgb, var(--app-primary) 34%, var(--app-border));
    border-radius: 5px 0 7px 0;
    bottom: 0;
    color: var(--app-primary);
    cursor: nwse-resize;
    display: inline-flex;
    height: 25px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0;
    width: 25px;
    z-index: 5;
}

.dashboard-widget-size-badge {
    background: #0f172a;
    border-radius: 4px;
    bottom: 30px;
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: 4px 6px;
    position: absolute;
    right: 0;
    z-index: 6;
}

.dashboard-widget-size-badge.visible {
    opacity: 1;
}

.dashboard-lens-switcher button.is-widget-drop-target {
    box-shadow: inset 0 0 0 2px var(--app-primary);
    transform: translateY(-2px);
}

.dashboard-focus,
.dashboard-widget {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    padding: 16px;
}

.focus-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.focus-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #111827;
    display: grid;
    gap: 12px;
    grid-template-columns: 44px 1fr;
    padding: 10px;
    text-decoration: none;
}

.focus-item:hover,
.dashboard-list-row:hover {
    background: #eef6ff;
    color: #0d6efd;
}

.focus-score {
    align-items: center;
    background: #0d6efd;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.focus-item small,
.dashboard-list-row small,
.dashboard-widget-head small {
    color: #64748b;
    display: block;
    font-size: .8rem;
}

.dashboard-widget {
    height: 100%;
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body.is-report-chart {
    grid-template-rows: minmax(190px, 1fr) auto auto;
    overflow: hidden;
}

.dashboard-widget-body.is-report-chart > .table-responsive {
    max-height: 160px;
    overflow: auto;
}

.dashboard-widget.is-published-highlight {
    animation: dashboard-widget-published 2.2s ease;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .14), 0 14px 32px rgba(15, 23, 42, .1);
}

@keyframes dashboard-widget-published {
    0%,
    45% {
        background: #f0fdf4;
        transform: translateY(-3px);
    }
    100% {
        background: #fff;
        transform: translateY(0);
    }
}

.dashboard-widget-actions {
    align-items: center;
    display: flex;
    gap: 4px;
}

.dashboard-widget-actions form {
    margin: 0;
}

.dashboard-widget-body {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.dashboard-decision-widgets { gap: .65rem; }
.dashboard-decision-widget { display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: 100%; min-height: 104px; padding: .85rem 1rem; border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-surface); box-shadow: 0 5px 18px rgb(15 23 42 / 4%); }
.dashboard-decision-widget small, .dashboard-decision-widget strong, .dashboard-decision-widget span { display: block; }
.dashboard-decision-widget small { color: color-mix(in srgb, var(--app-text) 62%, transparent); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.dashboard-decision-widget strong { margin: .15rem 0; color: var(--app-primary); font-size: 1.65rem; line-height: 1; }
.dashboard-decision-widget span { color: color-mix(in srgb, var(--app-text) 58%, transparent); font-size: .7rem; }
.dashboard-decision-actions { display: flex; gap: .3rem; }
.dashboard-work-widget-options { padding: .8rem; border: 1px solid var(--app-border); border-radius: 5px; background: color-mix(in srgb, var(--app-page) 48%, var(--app-surface)); }
@media (max-width: 900px) {
    .dashboard-widget-shell,
    .dashboard-widget-drop-placeholder { grid-column: 1 / -1; height: auto; }
    .dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget { max-height: 520px; }
    .dashboard-context-bar { align-items:center; flex-wrap:wrap; }
    .dashboard-focus-context { width:100%; }
    .dashboard-focus-context label { flex:1 1 150px; }
    .dashboard-focus-context select { width:100%; }
    .dashboard-context-note { margin-left: 0; width: 100%; }
    .dashboard-adaptive-strip { grid-template-columns: 1fr; }
}

.dashboard-report-chart-pie-wrap {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
}

.dashboard-report-chart-pie {
    aspect-ratio: 1;
    background: conic-gradient(var(--dashboard-chart));
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .1);
    position: relative;
    width: 100%;
}

.dashboard-report-chart-pie.is-doughnut::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    inset: 27%;
    position: absolute;
}

.dashboard-report-chart-legend {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.dashboard-report-chart-legend > div,
.dashboard-report-chart-link > div {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 10px minmax(0, 1fr) auto;
}

.dashboard-report-chart-link,
.dashboard-report-bar-link {
    color: inherit;
    text-decoration: none;
}

.dashboard-report-chart-link:hover > div {
    background: #eef6ff;
    border-radius: 6px;
}

.dashboard-report-chart-link > div {
    padding: 3px 5px;
}

.dashboard-report-chart-link small {
    justify-self: end;
    min-width: 2ch;
    padding-left: 4px;
    text-align: right;
}

.dashboard-report-bar-link {
    display: contents;
}

.dashboard-report-bar-link:hover span {
    filter: brightness(.88);
    transform: translateY(-2px);
}

.dashboard-report-chart-legend span {
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

.dashboard-report-chart-legend strong,
.dashboard-report-chart-legend small {
    font-size: .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-report-chart-bars {
    align-items: end;
    display: flex;
    gap: 8px;
    height: 170px;
    overflow-x: auto;
    padding: 8px 2px 0;
}

.dashboard-report-chart-bars > div {
    display: grid;
    flex: 0 0 56px;
    gap: 5px;
    grid-template-rows: 1fr auto;
    height: 100%;
    text-align: center;
}

.dashboard-report-chart-bars > .dashboard-report-bar-link > div {
    display: grid;
    gap: 5px;
    grid-template-rows: 1fr auto;
    height: 100%;
    text-align: center;
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body.is-report-chart .dashboard-report-chart-bars,
.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body.is-report-chart .dashboard-report-chart-pie-wrap {
    height: 100%;
    min-height: 190px;
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body.is-report-chart .dashboard-report-chart-pie-wrap {
    grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
}

.dashboard-widget-shell[data-widget-height]:not([data-widget-height="0"]) .dashboard-widget-body.is-report-chart .dashboard-report-chart-pie {
    height: min(100%, 320px);
    justify-self: center;
    width: auto;
}

.dashboard-report-chart-bars span {
    align-self: end;
    background: #2563eb;
    border-radius: 5px 5px 0 0;
    display: block;
    justify-self: center;
    min-height: 6px;
    width: 30px;
    transition: filter .15s ease, transform .15s ease;
}

.dashboard-report-chart-bars.is-line span {
    border-radius: 999px;
    width: 10px;
}

.dashboard-report-chart-bars.is-area span {
    background: rgba(37, 99, 235, .45);
    width: 44px;
}

.dashboard-report-chart-bars small {
    font-size: .68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-report-table {
    font-size: .75rem;
    min-width: 520px;
}

.dashboard-report-table th {
    color: #475569;
    white-space: nowrap;
}

.dashboard-report-table .report-drill-link {
    border-radius: 5px;
    flex-wrap: nowrap;
    font-size: .72rem;
    gap: 5px;
    line-height: 1.25;
    padding: 4px 6px;
    white-space: nowrap;
}

.dashboard-report-table .report-drill-link i {
    flex: 0 0 auto;
}

.dashboard-report-open {
    justify-self: end;
}

.dashboard-kpi {
    color: #0f172a;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-list-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #111827;
    display: block;
    padding: 10px;
    text-decoration: none;
}

.dashboard-table {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-table td {
    background: #f8fafc;
    border-color: #e2e8f0;
    padding: 10px;
    vertical-align: middle;
}

.dashboard-table a {
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-table tr:hover td {
    background: #eef6ff;
}

.dashboard-toolbar {
    align-items: center;
    display: flex;
    gap: 8px;
}

.dashboard-toolbar form {
    margin: 0;
}

.dashboard-tool {
    background: #fff;
    border-color: #dbe3ee;
    color: #334155;
    height: 38px;
    width: 38px;
}

.dashboard-tool.primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dashboard-lens-switcher {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 4px;
}

.dashboard-lens-switcher button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #64748b;
    display: grid;
    gap: 1px 8px;
    grid-template-columns: 25px minmax(0, 1fr);
    padding: 8px 10px;
    text-align: left;
}

.dashboard-lens-switcher button > i {
    font-size: 1rem;
    grid-row: 1 / 3;
}

.dashboard-lens-switcher button span {
    color: #334155;
    font-size: .8rem;
    font-weight: 800;
}

.dashboard-lens-switcher button small {
    font-size: .65rem;
}

.dashboard-lens-switcher button:hover {
    background: #fff;
    border-color: #dbe3ee;
}

.dashboard-lens-switcher button.active {
    background: #fff;
    border-color: #99f6e4;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
    color: #0f766e;
}

.dashboard-lens-switcher button.active span {
    color: #115e59;
}

.dashboard-lens-panel {
    display: none;
}

.dashboard-lens-panel.active {
    display: block;
}

.dashboard-calendar {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-calendar-toolbar {
    align-items: end;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
}

.dashboard-calendar-navigation {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 52px;
    white-space: nowrap;
}

.dashboard-calendar-toolbar strong {
    font-size: 1.05rem;
    margin-left: 6px;
}

.dashboard-calendar-controls {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(120px, 1fr)) auto auto auto;
}

.dashboard-calendar-controls > .calendar-filter {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-calendar-controls > .calendar-filter > span {
    color: #64748b;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-calendar-controls .form-select {
    min-width: 0;
    width: 100%;
}

.calendar-icon-switch {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    display: inline-grid;
    grid-template-columns: repeat(3, 34px);
    height: 32px;
    padding: 2px;
}

.calendar-icon-switch button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #64748b;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    padding: 0;
}

.calendar-icon-switch button:hover,
.calendar-icon-switch button.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
    color: var(--fc-primary, #2563eb);
}

.calendar-intelligence {
    align-items: center;
    background: linear-gradient(90deg, color-mix(in srgb, var(--fc-primary, #2563eb) 9%, #fff), #fff 48%, color-mix(in srgb, var(--fc-accent, #14b8a6) 8%, #fff));
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    padding: 11px 14px;
}

.calendar-intelligence-mark {
    align-items: center;
    background: var(--fc-primary, #2563eb);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 1.05rem;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.calendar-intelligence-copy {
    display: grid;
    gap: 1px;
}

.calendar-intelligence-copy small {
    color: var(--fc-primary, #2563eb);
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.calendar-intelligence-copy strong {
    color: var(--fc-text, #0f172a);
    font-size: .88rem;
}

.calendar-intelligence-copy span {
    color: var(--fc-muted, #64748b);
    font-size: .72rem;
}

.calendar-intelligence-metrics {
    display: flex;
    gap: 5px;
}

.calendar-intelligence-metrics > div {
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    color: #475569;
    display: grid;
    gap: 1px 5px;
    grid-template-columns: auto auto;
    padding: 5px 8px;
}

.calendar-intelligence-metrics > div i {
    color: var(--fc-primary, #2563eb);
    grid-row: 1 / 3;
}

.calendar-intelligence-metrics > div strong {
    color: #0f172a;
    font-size: .78rem;
    line-height: 1;
}

.calendar-intelligence-metrics > div span {
    font-size: .55rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-calendar-weekdays,
.dashboard-calendar-grid.is-month,
.dashboard-calendar-grid.is-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-weekdays {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-calendar-weekdays span {
    color: #64748b;
    font-size: .7rem;
    font-weight: 800;
    padding: 7px 10px;
    text-align: center;
    text-transform: uppercase;
}

.dashboard-calendar-day {
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    min-height: 132px;
    padding: 7px;
}

.dashboard-calendar-grid.is-week .dashboard-calendar-day {
    min-height: 430px;
}

.dashboard-calendar-day.is-outside {
    background: #f8fafc;
    color: #94a3b8;
}

.dashboard-calendar-day.is-today {
    box-shadow: inset 0 0 0 2px #14b8a6;
}

.dashboard-calendar-day > header button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: inherit;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.dashboard-calendar-day > header button:hover {
    background: #e0f2fe;
    color: #075985;
}

.dashboard-calendar-day > div {
    display: grid;
    gap: 4px;
    margin-top: 5px;
}

.calendar-event {
    align-items: center;
    background: #eef6ff;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    color: #1e3a8a;
    display: grid;
    font-size: .68rem;
    gap: 5px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 4px 5px;
    text-decoration: none;
}

.calendar-event.tone-calendar { background: #ecfdf5; border-left-color: #10b981; color: #065f46; }
.calendar-event.tone-assignment { background: #fff7ed; border-left-color: #f59e0b; color: #92400e; }
.calendar-event.tone-event { background: #ecfdf5; border-left-color: #10b981; color: #065f46; }
.calendar-event.tone-due { background: #fff7ed; border-left-color: #f59e0b; color: #92400e; }
.calendar-event.tone-email { background: #f5f3ff; border-left-color: #8b5cf6; color: #5b21b6; }
.calendar-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.calendar-day-count {
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #0755c7;
    font-size: .75rem;
    font-weight: 800;
    padding: 8px;
}

.calendar-day-heat {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    display: grid;
    min-height: 72px;
    padding: 8px;
    text-align: left;
    width: 100%;
}

.calendar-day-heat strong { font-size: 1.2rem; }
.calendar-day-heat span { font-size: .64rem; font-weight: 700; text-transform: uppercase; }
.calendar-day-heat.heat-0 { background: #f8fafc; color: #94a3b8; }
.calendar-day-heat.heat-1 { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.calendar-day-heat.heat-2 { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.calendar-day-heat.heat-3 { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.calendar-day-heat.heat-4 { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.dashboard-calendar-grid.is-year {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 14px;
}

.dashboard-calendar-grid.is-year > button {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 16px;
    text-align: left;
}

.dashboard-calendar-grid.is-year > button strong { font-size: 1.7rem; }
.dashboard-calendar-grid.is-year > button small { color: #64748b; }

.dashboard-calendar-day-detail {
    border-top: 1px solid #dbe3ee;
    padding: 14px;
}

.dashboard-calendar-day-detail > header,
.dashboard-calendar-day-detail > div > a,
.dashboard-calendar-day-detail > div > button {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.dashboard-calendar-day-detail > header small,
.dashboard-calendar-day-detail > header strong { display: block; }
.dashboard-calendar-day-detail > div { display: grid; gap: 6px; margin-top: 10px; }
.dashboard-calendar-day-detail > div > a,
.dashboard-calendar-day-detail > div > button { width: 100%; border: 1px solid #e2e8f0; border-radius: 6px; color: #334155; background: var(--app-surface, #fff); padding: 9px; font: inherit; text-align: left; text-decoration: none; }
.dashboard-calendar-day-detail > div > a span,
.dashboard-calendar-day-detail > div > button span { flex: 1; }
.dashboard-calendar-day-detail > div > a strong,
.dashboard-calendar-day-detail > div > a small,
.dashboard-calendar-day-detail > div > button strong,
.dashboard-calendar-day-detail > div > button small { display: block; }
.dashboard-calendar-day-detail > div > a small,
.dashboard-calendar-day-detail > div > button small { color: #64748b; }
.calendar-event[type="button"] {
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.calendar-activity-context {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    padding: 12px;
}

.calendar-activity-step {
    align-items: center;
    display: flex;
    gap: 9px;
    margin-bottom: 10px;
}

.calendar-activity-step > span {
    align-items: center;
    background: var(--fc-primary, #2563eb);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 25px;
    font-size: .7rem;
    font-weight: 800;
    height: 25px;
    justify-content: center;
}

.calendar-activity-step strong,
.calendar-activity-step small {
    display: block;
}

.calendar-activity-step small {
    color: #64748b;
    font-size: .7rem;
}

.calendar-record-search {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-record-search .form-control {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    min-width: 0;
}

.calendar-record-search .btn {
    align-items: center;
    border-bottom-left-radius: 0;
    border-left: 0;
    border-top-left-radius: 0;
    display: inline-flex;
    gap: .35rem;
    justify-content: center;
    min-width: 88px;
    white-space: nowrap;
}

.calendar-activity-dialog {
    width: min(1120px, calc(100vw - 24px));
}

#calendarActivityModal .modal-content,
#calendarActivityModal form {
    max-height: min(880px, calc(100vh - 32px));
}

#calendarActivityModal form {
    display: flex;
    min-height: 0;
    flex-direction: column;
}

#calendarActivityModal .modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#calendarActivityModal .modal-footer {
    flex: 0 0 auto;
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
}

.calendar-invite-panel {
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 20%, var(--app-border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--app-primary) 4%, var(--app-surface));
}

.calendar-invite-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.calendar-invite-head strong,
.calendar-invite-head small {
    display: block;
}

.calendar-invite-head small {
    color: var(--app-muted);
    font-size: .7rem;
}

.calendar-record-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.calendar-contact-chip {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    max-width: 100%;
    padding: .5rem .6rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
    cursor: pointer;
}

.calendar-contact-chip strong,
.calendar-contact-chip small {
    display: block;
}

.calendar-contact-chip small {
    color: var(--app-muted);
    font-size: .66rem;
    overflow-wrap: anywhere;
}

.calendar-more-criteria {
    background: transparent;
    border: 0;
    color: var(--fc-primary, #2563eb);
    font-size: .72rem;
    font-weight: 700;
    padding: 0;
}

.calendar-criteria-head {
    align-items: baseline;
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.calendar-criteria-head span {
    color: #64748b;
    font-size: .68rem;
}

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

.calendar-criteria-grid label {
    display: grid;
    gap: 3px;
}

.calendar-criteria-grid label > span {
    color: #475569;
    font-size: .68rem;
    font-weight: 700;
}

.calendar-record-loading,
.calendar-record-result-list {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
}

.calendar-record-loading {
    color: #64748b;
    padding: 10px;
}

.calendar-record-result-list {
    max-height: 220px;
    overflow-y: auto;
}

.calendar-record-result-list > button {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 11px;
    text-align: left;
    width: 100%;
}

.calendar-record-result-list > button:hover { background: #eff6ff; }
.calendar-record-result-list > button:last-child { border-bottom: 0; }
.calendar-record-result-list strong,
.calendar-record-result-list small { display: block; }
.calendar-record-result-list small { color: #64748b; font-size: .68rem; }

.calendar-selected-record {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    color: #065f46;
    display: grid;
    gap: 9px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px 10px;
}

.calendar-selected-record small,
.calendar-selected-record strong { display: block; }
.calendar-selected-record small { font-size: .6rem; font-weight: 800; text-transform: uppercase; }

.calendar-reminder-panel {
    background: color-mix(in srgb, var(--fc-primary, #2563eb) 5%, #fff);
    border: 1px solid color-mix(in srgb, var(--fc-primary, #2563eb) 22%, #dbe3ee);
    border-radius: 7px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.3fr);
    padding: 11px;
}

.calendar-reminder-panel > div > strong,
.calendar-reminder-panel > div > small { display: block; }
.calendar-reminder-panel > div > small { color: #64748b; font-size: .68rem; }
.calendar-reminder-panel > .form-check { grid-column: 1 / -1; margin: 0; }

.calendar-reminder-controls {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(120px, .8fr) minmax(150px, 1fr);
}

.calendar-reminder-before {
    display: grid;
    gap: 5px;
    grid-template-columns: 72px minmax(90px, 1fr);
}

@media (max-width: 680px) {
    .dashboard-calendar-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-calendar-controls > .calendar-filter:first-child {
        grid-column: 1 / -1;
    }

    .calendar-icon-switch,
    .calendar-range-switch {
        justify-self: stretch;
    }

    .calendar-range-switch .btn {
        flex: 1;
    }

    .calendar-intelligence {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .calendar-intelligence-metrics {
        grid-column: 1 / -1;
    }

    .calendar-intelligence-metrics > div {
        min-width: 82px;
    }

    .calendar-criteria-grid,
    .calendar-reminder-panel,
    .calendar-reminder-controls {
        grid-template-columns: 1fr;
    }

    .calendar-reminder-panel > .form-check {
        grid-column: auto;
    }
}

.dashboard-attention-board {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(230px, .65fr) minmax(0, 1.35fr);
}

.dashboard-attention-budget,
.dashboard-attention-list {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 14px;
}

.dashboard-attention-budget > div:first-child {
    display: grid;
}

.dashboard-attention-budget > div:first-child span {
    color: #475569;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-attention-budget > div:first-child strong {
    color: #b42318;
    font-size: 2.5rem;
    line-height: 1.1;
}

.dashboard-attention-budget small,
.dashboard-attention-balance {
    color: #64748b;
    font-size: .72rem;
}

.dashboard-attention-balance {
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
}

.dashboard-attention-list {
    display: grid;
    gap: 4px;
}

.dashboard-attention-list a {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    color: #1e293b;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 8px 4px;
    text-decoration: none;
}

.dashboard-attention-list a:last-child {
    border-bottom: 0;
}

.dashboard-attention-list a:hover strong {
    color: #0f766e;
}

.dashboard-attention-list small {
    color: #64748b;
    display: block;
    font-size: .7rem;
}

.dashboard-attention-score {
    align-items: center;
    background: #fff1f2;
    border-radius: 6px;
    color: #be123c;
    display: flex;
    font-size: .72rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
}

.dashboard-why {
    color: #475569;
    font-size: .72rem;
    margin-top: 10px;
}

.dashboard-why summary,
.dashboard-flow-card summary {
    color: #0f766e;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.dashboard-why summary::-webkit-details-marker,
.dashboard-flow-card summary::-webkit-details-marker {
    display: none;
}

.dashboard-why p,
.dashboard-flow-card details p {
    color: #64748b;
    margin: 6px 0 0;
}

.dashboard-lens-heading {
    align-items: end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 10px 12px 0;
}

.dashboard-lens-heading h2 {
    font-size: 1.15rem;
    letter-spacing: 0;
    margin: 2px 0 4px;
}

.dashboard-lens-heading p {
    color: #64748b;
    font-size: .78rem;
    margin: 0;
}

.dashboard-lens-stat {
    color: #64748b;
    font-size: .72rem;
    text-align: right;
}

.dashboard-lens-stat strong {
    color: #0f172a;
    display: block;
    font-size: 1.5rem;
}

.dashboard-flow-board {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
}

.dashboard-flow-lane {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-top: 3px solid #94a3b8;
    border-radius: 7px;
    min-height: 360px;
    padding: 10px;
}

.dashboard-flow-lane.tone-danger { border-top-color: #dc2626; }
.dashboard-flow-lane.tone-warning { border-top-color: #f59e0b; }
.dashboard-flow-lane.tone-info { border-top-color: #0891b2; }

.dashboard-flow-lane > header {
    align-items: center;
    display: flex;
    font-size: .78rem;
    font-weight: 800;
    justify-content: space-between;
    margin-bottom: 9px;
}

.dashboard-flow-lane > header strong {
    align-items: center;
    background: #e2e8f0;
    border-radius: 999px;
    display: flex;
    font-size: .7rem;
    height: 23px;
    justify-content: center;
    min-width: 23px;
}

.dashboard-flow-header-actions {
    align-items: center;
    display: flex;
    gap: 5px;
}

.dashboard-flow-filter-toggle {
    border: 0;
    color: #64748b;
    height: 25px;
    min-height: 25px;
    width: 25px;
}

.dashboard-flow-filter-toggle:hover,
.dashboard-flow-filter-toggle.active {
    background: #cffafe;
    color: #0e7490;
}

.dashboard-flow-filters {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    margin-bottom: 9px;
    padding: 9px;
}

.dashboard-flow-filters[hidden] {
    display: none;
}

.dashboard-flow-filters label {
    display: block;
    margin-bottom: 7px;
}

.dashboard-flow-days-filter .input-group {
    max-width: 180px;
}

.dashboard-flow-days-filter input {
    min-width: 58px;
    text-align: center;
}

.dashboard-flow-filters label > span {
    color: #64748b;
    display: block;
    font-size: .62rem;
    font-weight: 700;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.dashboard-flow-filters .form-control,
.dashboard-flow-filters .form-select,
.dashboard-flow-filters .input-group-text {
    font-size: .7rem;
    min-height: 30px;
}

.dashboard-flow-filter-clear {
    color: #64748b;
    font-size: .68rem;
    padding: 1px 0;
    text-decoration: none;
}

.dashboard-flow-items {
    display: grid;
    gap: 8px;
}

.dashboard-flow-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .04);
    padding: 10px;
}

.dashboard-flow-card > a {
    color: #1e293b;
    text-decoration: none;
}

.dashboard-flow-card > small {
    color: #64748b;
    display: block;
    font-size: .68rem;
    margin: 3px 0 8px;
}

.dashboard-flow-card > div {
    color: #64748b;
    display: flex;
    font-size: .65rem;
    gap: 8px;
    justify-content: space-between;
}

.dashboard-flow-card details {
    border-top: 1px solid #edf2f7;
    font-size: .68rem;
    margin-top: 8px;
    padding-top: 6px;
}

.dashboard-lane-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    font-size: .72rem;
    gap: 7px;
    justify-content: center;
    min-height: 72px;
    padding: 12px;
}

.dashboard-lane-empty i {
    color: #16a34a;
}

.dashboard-timeline {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 8px 16px 16px;
}

.dashboard-timeline-date {
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    padding: 13px 0 6px;
    text-transform: uppercase;
}

.dashboard-timeline-event {
    align-items: center;
    color: #1e293b;
    display: grid;
    gap: 12px;
    grid-template-columns: 80px 10px minmax(0, 1fr) auto;
    padding: 10px 4px;
    text-decoration: none;
}

.dashboard-timeline-event time {
    color: #64748b;
    font-size: .7rem;
    text-align: right;
}

.dashboard-timeline-event > i:nth-child(2) {
    color: #0f766e;
    font-size: .48rem;
}

.dashboard-timeline-event.is-overdue > i:nth-child(2) {
    color: #dc2626;
}

.dashboard-timeline-event small {
    color: #64748b;
    display: block;
    font-size: .7rem;
}

.dashboard-map-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
}

.dashboard-map-nodes {
    align-content: start;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 16px;
}

.dashboard-map-nodes a {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #1e293b;
    display: flex;
    gap: 10px;
    min-height: 64px;
    padding: 10px;
    text-decoration: none;
}

.dashboard-map-nodes a.is-hub {
    border-color: #5eead4;
    box-shadow: inset 3px 0 #0f766e;
}

.dashboard-map-nodes a > i {
    align-items: center;
    background: #ecfeff;
    border-radius: 6px;
    color: #0e7490;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-map-nodes small {
    color: #64748b;
    display: block;
    font-size: .68rem;
}

.dashboard-map-edges {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 12px;
}

.dashboard-map-edges > header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    font-size: .8rem;
    font-weight: 800;
    justify-content: space-between;
    padding-bottom: 9px;
}

.dashboard-map-edges > header small {
    color: #64748b;
    font-size: .65rem;
    font-weight: 400;
}

.dashboard-map-edges > div:not(.builder-empty) {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    font-size: .72rem;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    padding: 9px 2px;
}

.dashboard-map-edges > div > span {
    color: #64748b;
    display: grid;
    font-size: .62rem;
    justify-items: center;
    min-width: 0;
}

.dashboard-map-edges > div > span small {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-config-modal .modal-header {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}

#widgetPublishModal .modal-content {
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

#widgetPublishModal .modal-content > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    max-height: inherit;
    min-height: 0;
    overflow: hidden;
}

#widgetPublishModal .modal-header,
#widgetPublishModal .modal-footer {
    flex: 0 0 auto;
}

#widgetPublishModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

@media (max-width: 575.98px) {
    #widgetPublishModal .modal-dialog {
        margin: .5rem;
    }

    #widgetPublishModal .modal-content {
        max-height: calc(100dvh - 1rem);
    }
}

.widget-source-catalog {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .widget-source-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.widget-source-catalog > button {
    align-items: flex-start;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dbe3ee);
    border-radius: 8px;
    color: var(--app-text, #172033);
    display: grid;
    gap: 8px;
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 88px;
    padding: 12px;
    text-align: left;
}

.widget-source-catalog > button > i {
    color: var(--app-primary, #2457a7);
    font-size: 1.05rem;
}

.widget-source-catalog > button span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.widget-source-catalog > button small {
    color: var(--app-muted, #64748b);
    font-size: .7rem;
    line-height: 1.35;
}

.widget-source-catalog > button.active {
    background: color-mix(in srgb, var(--app-primary, #2457a7) 8%, var(--app-surface, #fff));
    border-color: var(--app-primary, #2457a7);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-primary, #2457a7) 13%, transparent);
}

.widget-source-panel,
.widget-presentation-settings {
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #dbe3ee);
    border-radius: 8px;
    padding: 14px;
}

.widget-source-note {
    align-items: flex-start;
    color: var(--app-muted, #64748b);
    display: flex;
    font-size: .75rem;
    gap: 7px;
    margin-top: 10px;
}

.widget-presentation-settings {
    margin-top: 14px;
}

.widget-ai-prompt {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
}

.widget-ai-prompt > i {
    color: var(--app-primary, #2457a7);
    padding-top: 9px;
}

.widget-ai-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0 32px;
}

.widget-ai-capabilities span {
    background: var(--app-soft, #f1f5f9);
    border-radius: 4px;
    color: var(--app-muted, #64748b);
    font-size: .68rem;
    padding: 4px 7px;
}

@media (max-width: 760px) {
    .widget-source-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .widget-ai-prompt { grid-template-columns: 22px minmax(0, 1fr); }
    .widget-ai-prompt .btn { grid-column: 2; justify-self: start; }
}

.report-builder-grid,
.report-builder-page {
    display: grid;
    gap: 16px;
}

.report-builder-grid section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
}

.report-card,
.report-stat {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    padding: 16px;
}

.report-card {
    display: grid;
    gap: 12px;
    height: 100%;
}

.report-card-head {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px 1fr;
}

.report-card-head small,
.report-stat small {
    color: #64748b;
    display: block;
    font-size: .8rem;
}

.report-icon {
    align-items: center;
    background: #eef6ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.report-badges,
.report-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-actions {
    margin-top: auto;
}

.report-stat strong {
    color: #0f172a;
    display: block;
}

.report-preview-table th {
    background: #f8fafc;
    color: #334155;
    font-size: .78rem;
    text-transform: uppercase;
}

.report-drill-link {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #0755c7;
    display: inline-flex;
    font-weight: 800;
    gap: 6px;
    padding: 3px 9px;
    text-decoration: none;
}

.report-drill-link:hover {
    background: #dbeafe;
    color: #063f9e;
}

.report-drill-modal {
    inset: 0;
    position: fixed;
    z-index: 1080;
}

.report-drill-backdrop {
    background: rgba(15, 23, 42, .56);
    inset: 0;
    position: absolute;
}

.report-drill-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .35);
    display: grid;
    grid-template-rows: auto 1fr;
    height: min(82vh, 860px);
    left: 50%;
    max-width: 1180px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 1180px);
}

.report-drill-header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.report-drill-dialog iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.report-embedded-body {
    background: #f8fafc;
}

.report-embedded-shell {
    padding: 14px;
}

.report-embedded-head {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px;
}

.report-embedded-shell .config-panel {
    margin-bottom: 12px !important;
}

.report-output-chart {
    align-items: end;
    display: flex;
    gap: 12px;
    height: 220px;
    overflow-x: auto;
    padding: 12px 4px 0;
}

.report-output-bar {
    align-items: center;
    display: grid;
    flex: 0 0 82px;
    gap: 6px;
    grid-template-rows: 1fr auto;
    height: 100%;
    text-align: center;
}

.report-output-bar-link {
    color: inherit;
    flex: 0 0 82px;
    height: 100%;
    text-decoration: none;
}

.report-output-bar-link .report-output-bar {
    flex: none;
}

.report-output-bar-link:hover .report-output-bar span,
.report-output-bar:hover span {
    filter: brightness(.92);
    transform: translateY(-2px);
}

.report-output-bar span {
    align-self: end;
    background: #0d6efd;
    border-radius: 6px 6px 0 0;
    display: block;
    justify-self: center;
    min-height: 8px;
    width: 42px;
}

.report-output-bar small {
    color: #64748b;
    display: block;
    font-size: .72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.report-output-pie-svg {
    aspect-ratio: 1;
    display: block;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, .16));
    max-width: 300px;
    min-width: 220px;
    width: 100%;
}

.report-output-pie-svg path {
    cursor: default;
    stroke: #fff;
    stroke-width: .8;
    transform-box: fill-box;
    transform-origin: center;
    transition: filter .15s ease, transform .15s ease;
}

.report-output-pie-svg a path {
    cursor: pointer;
}

.report-output-pie-svg a:hover path,
.report-output-pie-svg path:hover {
    filter: brightness(.92);
    transform: scale(1.015);
}

.report-output-pie-svg text {
    fill: #0f172a;
    font-size: .52rem;
    font-weight: 800;
}

.report-output-chart.is-line .report-output-bar span {
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    border-radius: 999px;
    width: 14px;
}

.report-output-chart.is-area .report-output-bar span {
    background: linear-gradient(180deg, rgba(37, 99, 235, .85), rgba(37, 99, 235, .18));
    border-radius: 8px 8px 0 0;
    width: 58px;
}

.report-output-pie-wrap {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(220px, 300px) 1fr;
}

.report-output-pie {
    align-items: center;
    aspect-ratio: 1;
    background: conic-gradient(var(--chart-gradient));
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 18px 35px rgba(15, 23, 42, .12);
    display: flex;
    justify-content: center;
    max-width: 300px;
    min-width: 220px;
    width: 100%;
}

.report-output-pie.is-doughnut::before {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 54%;
    position: absolute;
    width: 54%;
}

.report-output-pie.is-doughnut {
    position: relative;
}

.report-output-pie.is-doughnut span {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.report-output-legend {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.report-output-legend a {
    color: inherit;
    text-decoration: none;
}

.report-output-legend div {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    padding: 8px 10px;
}

.report-output-legend a:hover div {
    background: #eef6ff;
    border-color: #bfdbfe;
}

.report-output-legend span {
    border-radius: 999px;
    height: 12px;
    width: 12px;
}

.report-output-legend strong {
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-output-legend small {
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.report-level-output {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-level-output-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px 1fr;
    padding: 10px;
}

.report-level-output-item > span {
    align-items: center;
    background: #0d6efd;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.report-level-output-item small {
    color: #64748b;
    display: block;
}

.sticky-action-bar {
    align-items: center;
    background: rgba(248, 250, 252, .92);
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    bottom: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding: 10px;
    position: sticky;
    z-index: 20;
}

.report-workbench {
    background: #edf2f8;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    min-height: calc(100vh - 130px);
    overflow: visible;
}

.report-ask-bar {
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 12px 16px;
}

.report-ask-input {
    align-items: center;
    border: 1px solid #cfe1ff;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 9px 12px;
}

.report-ask-input i {
    color: #0d6efd;
}

.report-ask-input input {
    border: 0;
    flex: 1 1 auto;
    min-width: 0;
    outline: 0;
    width: auto;
}

.report-ask-input .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.report-ai-conversation {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    max-height: 260px;
    overflow: auto;
    padding: 10px;
}

.report-ai-message {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 82%;
    padding: 9px 11px;
}

.report-ai-message.is-user {
    background: #eef6ff;
    border-color: #bfdbfe;
    justify-self: end;
}

.report-ai-message p,
.report-ai-message ul {
    margin: 4px 0 0;
}

.report-ai-message .report-ai-apply {
    margin-top: 9px;
}

.report-ask-suggestions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.report-question-pill {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: .82rem;
    gap: 6px;
    padding: 7px 10px;
}

.report-question-pill.active,
.report-question-pill:hover {
    background: #eef6ff;
    border-color: #9ec5fe;
    color: #0755c7;
}

.report-command-bar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 16px;
}

.report-command-main {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1.5fr) minmax(150px, .85fr) minmax(180px, 1fr);
    min-width: 0;
}

.report-title-control {
    min-width: 0;
    width: 100%;
}

.report-name-input {
    border: 0;
    border-bottom: 1px solid #cbd5e1;
    color: #111827;
    font-size: 1.12rem;
    font-weight: 800;
    outline: 0;
    padding: 6px 0;
    width: 100%;
}

.report-command-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.report-module-control {
    min-width: 0;
    width: 100%;
}

.report-module-select {
    min-width: 0;
    width: 100%;
}

.report-module-select + .searchable-select {
    min-width: 0;
    width: 100%;
}

.report-type-control {
    min-width: 0;
    position: relative;
    width: 100%;
}

.report-type-row {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 28px;
}

.report-type-help {
    align-items: center;
    background: #e9f6f8;
    border: 1px solid #b8dfe5;
    border-radius: 6px;
    color: #14748a;
    display: inline-flex;
    font-size: .76rem;
    height: 26px;
    justify-content: center;
    padding: 0;
    width: 26px;
}

.report-type-help:hover,
.report-type-help:focus,
.report-type-control.is-help-open .report-type-help {
    background: #d7eef3;
    border-color: #67b5c4;
    color: #075d72;
    outline: 0;
}

.report-type-help-popover {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
    display: none;
    gap: 5px;
    padding: 10px 12px;
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    width: min(300px, 80vw);
    z-index: 120;
}

.report-type-control:hover .report-type-help-popover,
.report-type-control:focus-within .report-type-help-popover,
.report-type-control.is-help-open .report-type-help-popover {
    display: grid;
}

.report-type-help-popover strong {
    color: #172b3f;
    font-size: .82rem;
}

.report-type-help-popover span,
.report-type-help-popover small {
    color: #5b6f82;
    font-size: .74rem;
    line-height: 1.35;
}

.report-type-help-popover small {
    background: #f5f8fc;
    border-radius: 5px;
    color: #29445f;
    padding: 6px 7px;
}

.report-icon-command {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #334155;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    text-decoration: none;
    width: 38px;
}

.report-icon-command.primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.report-icon-command.is-configured {
    background: #e8f2ff;
    border-color: #82b5f5;
    color: #0759bd;
    box-shadow: inset 0 -2px 0 rgba(13, 110, 253, .14);
}

.report-stage-bar {
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, 1fr);
    padding: 10px 16px;
}

.report-workbench-notice {
    border-radius: 0;
    margin: 0;
}

.report-intent-studio {
    align-items: stretch;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 12px;
    grid-template-columns: 250px minmax(0, 1fr);
    padding: 12px 16px;
}

.report-mode-switch {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 5px;
}

.report-mode-switch button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #475569;
    display: grid;
    gap: 1px 8px;
    grid-template-columns: 28px 1fr;
    padding: 7px 9px;
    text-align: left;
}

.report-mode-switch button i {
    grid-row: 1 / 3;
}

.report-mode-switch button span,
.report-mode-switch button small {
    grid-column: 2;
}

.report-mode-switch button small {
    color: #64748b;
    font-size: .7rem;
}

.report-mode-switch button.active {
    background: #eaf3ff;
    color: #0755c7;
}

.report-intent-main {
    min-width: 0;
}

.report-intent-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.report-intent-heading > div {
    align-items: center;
    display: flex;
    gap: 7px;
}

.report-quality-dot {
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fef3c7;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.report-quality-dot.is-ready {
    background: #16a34a;
    box-shadow: 0 0 0 3px #dcfce7;
}

.report-quality-dot.is-blocked {
    background: #dc2626;
    box-shadow: 0 0 0 3px #fee2e2;
}

.report-intent-studio .report-sentence {
    padding: 8px 10px;
}

.report-intent-studio .report-token {
    border: 0;
    font: inherit;
}

.report-intent-choices {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    margin-top: 8px;
}

.report-intent-choices > button {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #334155;
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 8px;
    text-align: left;
}

.report-intent-choices > button:hover {
    background: #eef6ff;
    border-color: #9ec5fe;
}

.report-intent-choices span,
.report-intent-choices small {
    display: block;
    min-width: 0;
}

.report-intent-choices small {
    color: #64748b;
    font-size: .68rem;
    line-height: 1.2;
}

.report-workbench[data-report-builder-mode="quick"] .report-stage-bar,
.report-workbench[data-report-builder-mode="quick"] .report-workspace {
    display: none;
}

.report-workbench[data-report-builder-mode="studio"] .report-intent-choices {
    display: none;
}

.report-grain-card {
    background: #f8fafc;
}

.report-coach-actions {
    margin-top: 9px;
}

.report-coach-actions button {
    align-items: center;
    background: #fff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #0755c7;
    display: inline-flex;
    font-size: .74rem;
    font-weight: 700;
    gap: 5px;
    padding: 5px 8px;
}

.report-chip.has-bucket {
    gap: 5px;
    padding-right: 3px;
}

.report-chip.has-bucket select {
    background: rgba(255, 255, 255, .82);
    border: 0;
    border-radius: 4px;
    color: inherit;
    font-size: .7rem;
    max-width: 92px;
    padding: 2px 4px;
}

.report-ai-proposal {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    margin-top: 8px;
    padding: 8px;
}

.report-ai-proposal > div {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 6px;
}

.report-ai-proposal label {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 6px;
    grid-template-columns: 16px 1fr;
    margin: 0;
}

.report-ai-proposal label > span {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    display: block;
    padding: 5px 6px;
}

.report-ai-proposal label:has(input:checked) > span {
    background: #eef6ff;
    border-color: #93c5fd;
}

.report-ai-proposal small,
.report-ai-proposal b {
    display: block;
}

.report-ai-proposal small {
    color: #64748b;
    font-size: .66rem;
}

.report-ai-proposal-details {
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 7px;
}

.report-ai-proposal-details summary {
    color: #1d4ed8;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 700;
}

.report-ai-proposal-details > div {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 7px;
}

.report-ai-proposal-details label {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: .72rem;
    padding: 5px 7px;
}

.report-live-preview {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    overflow: hidden;
}

.report-live-preview-table-wrap {
    max-height: 330px;
    overflow: auto;
}

.report-live-preview-table-wrap thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.report-live-preview-table-wrap th,
.report-live-preview-table-wrap td {
    max-width: 260px;
    overflow: hidden;
    padding: 8px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-live-drill-link {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--bs-primary, #0d6efd);
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    gap: 6px;
    padding: 2px 0;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.report-live-drill-link:hover,
.report-live-drill-link:focus-visible {
    text-decoration-color: currentColor;
}

.report-live-drill-dialog {
    max-width: 1180px;
    width: min(94vw, 1180px);
}

.report-live-drill-dialog .report-settings-body {
    max-height: min(72vh, 760px);
    overflow: auto;
}

.report-live-drill-loading,
.report-live-drill-meta {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.report-live-preview-diagnostics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px 0;
}

.report-live-preview-diagnostics span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #475569;
    font-size: .7rem;
    padding: 4px 7px;
}

.report-live-preview-diagnostics .is-ready {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.report-live-preview-diagnostics .is-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.report-version-dialog {
    max-width: 620px;
}

.report-version-dialog .report-settings-header > div small,
.report-version-row small,
.report-version-empty small {
    color: #64748b;
    display: block;
}

.report-version-list {
    display: grid;
    gap: 7px;
}

.report-version-row {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
}

.report-version-empty {
    align-items: center;
    color: #475569;
    display: grid;
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.report-version-empty i {
    font-size: 1.6rem;
    margin-bottom: 7px;
}

.report-question-builder {
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: grid;
    gap: 12px;
    grid-template-columns: 285px minmax(420px, 1fr) 300px;
    padding: 12px;
}

.report-question-list,
.report-sentence-panel,
.report-guided-coach {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.report-question-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.report-question-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #111827;
    display: grid;
    gap: 9px;
    grid-template-columns: 28px 1fr;
    margin-bottom: 8px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.report-question-card i {
    align-items: center;
    background: #eef6ff;
    border-radius: 7px;
    color: #0d6efd;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.report-question-card small,
.report-guided-card small,
.report-guided-coach p {
    color: #64748b;
    display: block;
    line-height: 1.3;
}

.report-question-card.active,
.report-question-card:hover {
    background: #eef6ff;
    border-color: #9ec5fe;
}

.report-sentence-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.report-sentence-tabs button {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #475569;
    flex: 1;
    font-weight: 800;
    padding: 8px;
}

.report-sentence-tabs button.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.report-sentence {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.8;
    padding: 12px;
}

.report-token {
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    margin: 0 2px;
    padding: 2px 9px;
}

.report-token.blue {
    background: #eef6ff;
    color: #0755c7;
}

.report-token.amber {
    background: #fff7ed;
    color: #9a3412;
}

.report-token.green {
    background: #ecfdf5;
    color: #166534;
}

.report-guided-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
}

.report-guided-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.report-guided-coach {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #14532d;
}

.report-stage-bar button {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #475569;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 9px;
}

.report-stage-bar button.active {
    background: #eef6ff;
    border-color: #9ec5fe;
    color: #0755c7;
    font-weight: 800;
}

.report-workspace {
    display: grid;
    gap: 12px;
    grid-template-columns: 290px minmax(520px, 1fr) 370px;
    min-height: 0;
    padding: 12px;
}

.report-workbench.right-collapsed .report-workspace {
    grid-template-columns: 290px minmax(520px, 1fr) 52px;
}

.report-workbench.right-collapsed .report-coach-body {
    display: none;
}

.report-workbench.right-collapsed .report-coach-panel {
    overflow: visible;
}

.report-workbench.right-collapsed .report-coach-panel .report-panel-head {
    border-bottom: 0;
    justify-content: center;
    padding: 8px 6px;
}

.report-workbench.right-collapsed .report-coach-panel .report-panel-head strong {
    display: none;
}

.report-workbench.right-collapsed [data-report-toggle-right] {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    width: 34px;
}

.report-workbench.right-collapsed [data-report-toggle-right] i {
    transform: rotate(180deg);
}

.report-source-panel,
.report-canvas,
.report-inspector,
.report-coach-panel {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    min-height: 0;
    overflow: hidden;
}

.report-source-panel {
    display: grid;
    grid-template-rows: auto auto 1fr;
    max-height: calc(100vh - 92px);
    position: sticky;
    top: 76px;
}

.report-workbench[data-report-active-stage="conditions"] .report-source-panel {
    grid-template-rows: auto auto auto 1fr;
}

.report-canvas {
    display: block;
}

.report-panel-head,
.report-canvas-head {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.report-canvas-head small {
    color: #64748b;
    display: block;
}

.report-field-search {
    align-items: center;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    margin: 12px;
    padding: 8px 10px;
}

.report-field-search input {
    border: 0;
    outline: 0;
    width: 100%;
}

.report-source-list,
.report-canvas-body,
.report-inspector-body {
    min-height: 0;
    overflow: auto;
}

.report-source-list {
    max-height: none;
}

.report-canvas-body {
    overflow: visible;
}

.report-source-list,
.report-canvas-body {
    padding: 12px;
}

.report-stage-panel {
    display: none;
}

.report-stage-panel.active {
    display: block;
}

.report-source-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.report-source-group.is-primary {
    border-color: #9ec5fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .08);
}

.report-source-group.is-related-source {
    opacity: .72;
}

.report-source-group.is-locked-related-source {
    opacity: .55;
}

.report-source-group h2 {
    align-items: center;
    background: #f8fafc;
    display: flex;
    font-size: .86rem;
    gap: 8px;
    justify-content: space-between;
    margin: 0;
    padding: 9px 10px;
    flex-wrap: wrap;
}

.report-source-group h2 > span {
    align-items: center;
    display: inline-flex;
    flex: 1;
    gap: 7px;
    min-width: 0;
}

.report-source-group [data-report-source-toggle] {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    color: #475569;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.report-source-group.is-collapsed [data-report-source-toggle] i {
    transform: rotate(-90deg);
}

.report-source-group.is-collapsed [data-report-source-fields] {
    display: none;
}

.report-source-group h2 small,
.report-field-row small {
    color: #64748b;
}

.report-source-path {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 5px;
    color: #475569;
    flex: 1 0 100%;
    font-size: .68rem;
    min-width: 0;
    padding: 4px 6px;
}

.report-field-row {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    cursor: grab;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    padding: 8px 10px;
    position: relative;
}

.report-condition-source-tools,
.report-condition-field-check {
    display: none;
}

.report-workbench[data-report-active-stage="conditions"] .report-condition-source-tools {
    align-items: center;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 9px 10px;
}

.report-condition-source-tools > div:first-child {
    min-width: 0;
}

.report-condition-source-tools small {
    color: #64748b;
    display: block;
    font-size: .68rem;
    line-height: 1.2;
}

.report-condition-source-tools strong {
    color: #0f3f83;
    display: block;
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-condition-source-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
}

.report-condition-source-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .72rem;
    gap: 5px;
    white-space: nowrap;
}

.report-condition-source-actions [data-report-condition-selected-count] {
    align-items: center;
    background: rgba(255, 255, 255, .25);
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    min-width: 20px;
    padding: 1px 5px;
}

.report-workbench[data-report-active-stage="conditions"] .report-field-row {
    cursor: default;
    grid-template-columns: 20px minmax(0, 1fr);
}

.report-workbench[data-report-active-stage="conditions"] .report-condition-field-check {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    margin: 0;
}

.report-condition-field-check input {
    cursor: pointer;
    height: 16px;
    margin: 0;
    width: 16px;
}

.report-field-row.is-condition-selected {
    background: #dbeafe;
    box-shadow: inset 3px 0 0 #2563eb;
}

.report-field-row:active {
    cursor: grabbing;
}

.report-field-row.is-dragging {
    background: #eef6ff;
    opacity: .62;
}

.report-field-row .report-field-title {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    padding-right: 96px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-field-row:hover {
    background: #eef6ff;
}

.report-field-row.is-disabled-source-field {
    cursor: not-allowed;
}

.report-field-row.is-disabled-source-field:hover {
    background: #f8fafc;
}

.report-field-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
    visibility: hidden;
    z-index: 2;
}

.report-field-row:hover .report-field-actions,
.report-field-row:focus-within .report-field-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
    visibility: visible;
}

.report-field-actions button {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #334155;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.report-field-actions button:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.report-field-condition-action {
    display: none !important;
}

.report-workbench[data-report-active-stage="conditions"] .report-field-actions [data-report-add-field] {
    display: none;
}

.report-workbench[data-report-active-stage="conditions"] .report-field-condition-action {
    background: #eef6ff;
    border-color: #93c5fd;
    color: #0755c7;
    display: inline-flex !important;
}

.report-dataset-map {
    display: grid;
    gap: 12px;
    grid-template-columns: 1.15fr .85fr;
}

.report-dataset-map > section,
.report-smart-card,
.report-drop-zone,
.report-preview-table-card,
.report-chart-card,
.report-tab-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.report-chart-settings {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 10px;
}

.report-chart-settings label {
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.report-chart-settings .form-select {
    margin-top: 4px;
}

.report-condition-group-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.report-condition-group {
    background: #f8fbff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    padding: 10px;
}

.report-condition-group .report-condition-group {
    background: #f7fdfb;
    border-color: #99f6e4;
    border-left-color: #14b8a6;
    margin-top: 8px;
}

.report-condition-group .report-condition-group .report-condition-group {
    background: #fffaf3;
    border-color: #fed7aa;
    border-left-color: #f97316;
}

.report-condition-group .report-condition-group .report-condition-group .report-condition-group {
    background: #fbf7ff;
    border-color: #ddd6fe;
    border-left-color: #8b5cf6;
}

.report-condition-group.is-root {
    background: #ffffff;
    border-color: #cbd5e1;
    border-left-color: #64748b;
}

.report-condition-group.is-condition-target {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.report-condition-group.is-condition-target::before {
    background: #2563eb;
    border-radius: 999px;
    color: #fff;
    content: "Active destination";
    display: inline-block;
    font-size: .66rem;
    font-weight: 800;
    margin-bottom: 7px;
    padding: 3px 8px;
}

.report-condition-group.is-condition-target > .report-condition-group-head [data-report-condition-target] {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.report-condition-group > .report-condition-connector {
    margin-bottom: 8px;
    max-width: 84px;
}

.report-condition-group-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.report-condition-row {
    align-items: start;
    display: grid;
    gap: 8px;
    grid-template-columns: 74px minmax(170px, 1.25fr) minmax(150px, 1fr) minmax(140px, .9fr) minmax(220px, 1.35fr) auto;
    margin-top: 8px;
}

.report-condition-field {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #0f3f83;
    display: flex;
    font-size: .82rem;
    font-weight: 750;
    gap: 7px;
    min-height: 31px;
    min-width: 0;
    padding: 5px 9px;
}

.report-condition-field span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-condition-field.is-empty {
    background: #fff;
    border-style: dashed;
    color: #64748b;
}

[data-report-condition-drop-list].is-drag-over {
    background: #eff6ff;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #60a5fa;
    padding: 6px;
}

.report-condition-row.is-new-condition {
    animation: report-condition-added 1.4s ease;
}

@keyframes report-condition-added {
    0%,
    45% {
        background: #dcfce7;
        border-color: #4ade80;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
    }
    100% {
        background: #f8fafc;
        border-color: #e2e8f0;
        box-shadow: none;
    }
}

.report-condition-connector.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.report-condition-value {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-condition-value > .form-select,
.report-condition-value > .form-control:only-child {
    grid-column: 1 / -1;
}

.report-having-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.report-having-row {
    align-items: start;
    display: grid;
    gap: 8px;
    grid-template-columns: 58px minmax(108px, 1fr) minmax(118px, 1fr) minmax(0, 1fr) 34px;
    min-width: 0;
}

.report-dataset-map > section,
.report-drop-zone {
    background: #f8fafc;
}

.report-entity {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 9px;
    padding: 10px;
}

.report-entity.primary {
    border-color: #9ec5fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .08);
}

.report-entity small {
    color: #64748b;
    display: block;
}

.report-join-line {
    align-items: center;
    color: #64748b;
    display: flex;
    gap: 8px;
    margin: 4px 0 9px 18px;
}

.report-join-line:before {
    background: #94a3b8;
    content: "";
    height: 1px;
    width: 48px;
}

.report-smart-card {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #14532d;
}

.report-smart-card p {
    margin: 4px 0 10px;
}

.report-drop-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 12px;
}

.report-drop-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.report-column-config {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 12px;
    overflow: hidden;
}

.report-column-config-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.report-drop-target {
    min-height: 76px;
    position: relative;
}

.report-drop-target:empty:before {
    align-items: center;
    border: 1px dashed #b6c7dc;
    border-radius: 8px;
    color: #64748b;
    content: "Drag fields here";
    display: flex;
    font-size: .86rem;
    justify-content: center;
    min-height: 58px;
}

.report-drop-target.is-drag-over {
    background: #eef6ff;
    box-shadow: inset 0 0 0 2px #86b7fe;
}

.report-column-config-row,
.report-filter-config-row,
.report-sort-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 8px;
}

.report-column-config-row {
    align-items: start;
    grid-template-columns: minmax(145px, 1fr) minmax(130px, .7fr) minmax(130px, .62fr) minmax(260px, 1.35fr) 42px;
    position: relative;
}

.report-column-total {
    min-width: 130px;
}

.report-results-scroll {
    max-height: min(68vh, 760px);
    overflow: auto;
}

.report-results-scroll .report-preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.report-results-scroll .report-preview-table tfoot td {
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
    bottom: 0;
    position: sticky;
    z-index: 2;
}

.report-results-scroll .report-preview-table tfoot small,
.report-results-scroll .report-preview-table tfoot strong {
    display: block;
}

.report-results-scroll .report-preview-table tfoot small {
    color: #64748b;
    font-size: .68rem;
    text-transform: uppercase;
}

.report-kpi-output {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-left: 5px solid #0d6efd;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 170px;
    padding: 24px;
}

.report-kpi-output > small {
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.report-kpi-output > strong {
    color: #0f172a;
    font-size: 3rem;
    line-height: 1;
}

.report-kpi-output > a {
    color: #0755c7;
    font-weight: 700;
    justify-self: start;
    text-decoration: none;
}

.report-format-pipeline {
    display: grid;
    gap: 6px;
}

.report-format-step-list {
    display: grid;
    gap: 6px;
}

.report-format-step {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(150px, 1fr) 78px 30px;
    position: relative;
}

.report-format-pipeline .btn {
    justify-self: start;
}

.report-column-actions,
.report-format-actions {
    opacity: .08;
    transition: opacity .16s ease, transform .16s ease;
}

.report-column-config-row:hover > .report-column-actions,
.report-column-config-row:focus-within > .report-column-actions,
.report-format-step:hover .report-format-actions,
.report-format-step:focus-within .report-format-actions {
    opacity: 1;
}

.report-column-actions {
    align-self: start;
    display: grid;
    gap: 4px;
    justify-self: end;
    transform: translateX(2px);
}

.report-column-actions.btn-group > .btn,
.report-column-actions.btn-group-sm > .btn {
    align-items: center;
    border-radius: 6px !important;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 30px;
}

.report-format-actions {
    display: flex;
    justify-self: end;
}

.report-format-actions.btn-group-sm > .btn {
    align-items: center;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.report-format-actions .btn:not(:last-child) {
    display: none;
}

.report-format-step:hover .report-format-actions .btn,
.report-format-step:focus-within .report-format-actions .btn {
    display: inline-flex;
}

.report-subreport-card {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 12px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.report-subreport-card.is-attention {
    background: #f0f7ff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.report-subreport-empty {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #b6c4d6;
    border-radius: 8px;
    color: #334155;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 14px;
}

.report-subreport-empty small {
    color: #64748b;
}

.report-subreport-options {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    padding-top: 12px;
}

.report-subreport-link-list {
    display: grid;
    gap: 10px;
}

.report-subreport-link-row {
    align-items: end;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(180px, 1.3fr) minmax(145px, 1fr) minmax(160px, 1fr) minmax(125px, .8fr) 34px 34px;
    padding: 10px;
}

.report-subreport-link-row.is-configured {
    border-color: #93c5fd;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.report-drilldown-summary {
    background: #f8fafc;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(140px, .8fr) minmax(280px, 2fr) minmax(140px, .8fr) minmax(180px, 1fr);
    padding: 9px 10px;
}

.report-drilldown-summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.report-drilldown-summary b {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.report-drilldown-summary small {
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .report-drilldown-summary {
        grid-template-columns: 1fr 1fr;
    }
}

.report-subreport-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 32px);
    max-width: 820px;
    top: 16px;
    transform: translateX(-50%);
    width: min(94vw, 820px);
}

.report-subreport-dialog .report-settings-header {
    background: #fff;
    position: relative;
    z-index: 2;
}

.report-subreport-dialog .report-settings-body {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 16px;
}

.report-settings-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 11px 14px;
    position: relative;
    z-index: 2;
}

.report-dashboard-publish-settings {
    transition: opacity .15s ease;
}

.report-dashboard-publish-settings.is-disabled {
    opacity: .48;
}

.report-result-field-picker {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    overflow: hidden;
}

.report-result-field-search {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    padding: 8px;
}

.report-result-field-options {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
    overflow: auto;
    padding: 8px;
}

.report-result-field-options label {
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: 8px;
    padding: 7px 8px;
}

.report-result-field-options label:hover {
    background: #eef5ff;
}

.report-selected-columns {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    margin-top: 14px;
    overflow: hidden;
}

.report-selected-columns-head {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 9px 10px;
}

.report-selected-columns-head small {
    color: #64748b;
}

.report-selected-column-list {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
}

.report-selected-column {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    cursor: grab;
    display: grid;
    gap: 8px;
    grid-template-columns: 24px minmax(0, 1fr) minmax(335px, auto) auto;
    padding: 7px 8px;
}

.report-selected-column-link {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.report-selected-column-link label {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    gap: 5px;
    margin: 0;
    white-space: nowrap;
}

.report-selected-column-link .form-select {
    min-width: 100px;
    width: 108px;
}

.report-selected-column-link [data-subreport-column-link-target] {
    width: 124px;
}

@media (max-width: 760px) {
    .report-selected-column {
        grid-template-columns: 24px minmax(0, 1fr) auto;
    }

    .report-selected-column-link {
        grid-column: 2 / -1;
    }
}

.report-selected-column.is-dragging {
    background: #eef6ff;
    border-color: #86b7fe;
    opacity: .75;
}

.report-selected-column-handle {
    color: #64748b;
    text-align: center;
}

.report-selected-column .btn {
    align-items: center;
    display: inline-flex;
    height: 27px;
    justify-content: center;
    padding: 0;
    width: 29px;
}

.report-selected-columns-empty {
    color: #64748b;
    padding: 12px;
    text-align: center;
}

.report-subreport-detail-settings {
    margin-top: 18px;
    padding-top: 4px;
}

.report-subreport-hint {
    background: #fff;
    border: 1px dashed #b6c4d6;
    border-radius: 8px;
    color: #64748b;
    padding: 12px;
    text-align: center;
}

.report-column-config-row.is-measure-column {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.report-column-config-row.is-measure-column strong {
    color: #14532d;
}

.report-column-config-row.is-measure-column small {
    color: #2f7d4f;
}

.report-column-config-row.is-formula-column {
    background: #f0fdfa;
    border-color: #99f6e4;
    border-left: 4px solid #0f766e;
}

.report-column-config-row.is-formula-column strong,
.report-column-config-row.is-formula-column small {
    color: #0f766e;
}

.report-calculated-dialog {
    width: min(760px, calc(100vw - 32px));
    max-width: 760px;
}

.report-calculated-list {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.report-calculated-row {
    align-items: center;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.report-calculated-row span,
.report-calculated-row small {
    display: block;
}

.report-calculated-row small {
    color: #64748b;
    margin-top: 2px;
}

.report-calculated-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    padding: 12px;
    text-align: center;
}

.report-calculated-builder {
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 14px;
}

.report-calculated-builder label {
    color: #64748b;
    display: grid;
    font-size: .78rem;
    font-weight: 700;
    gap: 5px;
    min-width: 0;
}

.report-comparison-card {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    margin: 14px 0;
    padding: 12px;
}

.report-comparison-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.report-comparison-head span,
.report-comparison-head small {
    display: block;
}

.report-comparison-head small {
    color: #64748b;
    font-weight: 400;
    margin-top: 2px;
}

.report-comparison-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.report-comparison-grid label {
    color: #64748b;
    display: grid;
    font-size: .78rem;
    font-weight: 700;
    gap: 5px;
}

@media (max-width: 640px) {
    .report-calculated-builder,
    .report-comparison-grid {
        grid-template-columns: 1fr;
    }
}

.report-filter-config-list,
.report-sort-list,
.report-measure-list,
.report-output-order-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.report-filter-config-row {
    grid-template-columns: minmax(170px, 1fr) auto;
}

.report-sort-row,
.report-measure-row {
    grid-template-columns: minmax(180px, 1fr) 130px auto;
}

.report-measure-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 92px 92px minmax(124px, 1fr) minmax(0, 1fr) auto;
    min-width: 0;
    padding: 8px;
}

.report-measure-row > *,
.report-having-row > * {
    min-width: 0;
}

.report-measure-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.report-output-order-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(190px, 1fr) auto;
    padding: 8px;
}

.report-output-order-row small {
    color: #64748b;
    display: block;
}

.report-column-config-row small,
.report-filter-config-row small {
    color: #64748b;
    display: block;
}

.report-settings-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.report-settings-grid label {
    color: #334155;
    font-size: .84rem;
    font-weight: 700;
}

.report-coach-panel {
    display: grid;
    grid-template-rows: auto 1fr;
    max-height: calc(100vh - 92px);
    position: sticky;
    top: 76px;
}

.report-coach-body {
    display: grid;
    gap: 10px;
    align-content: start;
    overflow: auto;
    padding: 12px;
}

.report-source-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.report-source-card.primary {
    background: #eef6ff;
    border-color: #9ec5fe;
}

.report-source-card.coach {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.report-coach-focus {
    box-shadow: inset 3px 0 0 #0d6efd;
}

.report-source-card strong {
    align-items: center;
    display: flex;
    gap: 7px;
    line-height: 1.25;
}

.report-source-card small {
    color: #475569;
    display: block;
    line-height: 1.45;
    margin-top: 6px;
}

.report-source-card strong {
    align-items: center;
    display: flex;
    gap: 8px;
}

.report-source-card small {
    color: #64748b;
    display: block;
    margin-top: 5px;
}

.report-settings-modal {
    inset: 0;
    position: fixed;
    z-index: 1090;
}

.report-settings-backdrop {
    background: rgba(15, 23, 42, .54);
    inset: 0;
    position: absolute;
}

.report-settings-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .35);
    left: 50%;
    max-width: 620px;
    overflow: visible;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 620px);
}

.report-settings-header {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.report-settings-body {
    border-radius: 0 0 10px 10px;
    padding: 14px;
}

.report-settings-dialog .searchable-select-menu,
.report-settings-dialog .role-tags-menu {
    z-index: 3;
}

.report-share-settings {
    display: grid;
    gap: 16px;
}

[data-report-settings-modal="access"] .report-settings-dialog {
    max-width: 900px;
    width: min(94vw, 900px);
}

[data-report-settings-modal="access"] .report-share-settings {
    align-items: start;
    grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
}

.report-share-section {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 14px;
}

.report-share-section.external {
    background: #f8fafc;
    border-color: #b9d7d4;
}

.report-share-section-head {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    padding-bottom: 11px;
}

.report-share-section-head > span {
    align-items: center;
    background: #ecfeff;
    border-radius: 7px;
    color: #0f766e;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.report-share-section-head small,
.report-share-active-row small {
    color: #64748b;
    display: block;
    font-size: .7rem;
}

.report-share-field {
    display: grid;
    gap: 6px;
}

.report-share-field .form-label,
.report-share-section .row .form-label {
    margin-bottom: 0;
}

.report-share-send-row {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.report-share-response {
    flex: 1;
    font-size: .75rem;
}

.report-share-active {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    max-height: 210px;
    overflow: hidden;
    overflow-y: auto;
}

.report-share-active-head,
.report-share-active-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.report-share-active-head {
    background: #f1f5f9;
    font-size: .76rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.report-share-active-head small {
    color: #64748b;
}

.report-share-active-row {
    border-top: 1px solid #edf2f7;
    font-size: .76rem;
}

.report-share-active-row > span {
    min-width: 0;
}

.report-share-active-row strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-share-empty {
    color: #64748b;
    font-size: .75rem;
    padding: 14px;
    text-align: center;
}

.public-report-body {
    background: #f4f7fb;
    color: #172033;
}

.public-report-brand {
    align-items: center;
    background: #102a43;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
}

.public-report-brand span {
    color: #bcccdc;
    font-size: .75rem;
}

.public-report-heading {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 16px;
}

.public-report-auth {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 110px);
}

.public-report-auth > section {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .1);
    max-width: 460px;
    padding: 28px;
    text-align: center;
    width: min(92vw, 460px);
}

.public-report-auth-icon {
    align-items: center;
    background: #ecfdf5;
    border-radius: 50%;
    color: #047857;
    display: inline-flex;
    font-size: 1.35rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 12px;
    width: 48px;
}

.public-report-auth h1 {
    font-size: 1.25rem;
    letter-spacing: 0;
    margin: 4px 0 10px;
}

.public-report-auth p,
.public-report-auth > section > small {
    color: #64748b;
    font-size: .8rem;
}

.public-report-otp {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: .3rem;
    text-align: center;
}

.template-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    height: 100%;
    padding: 15px;
}

.template-card-head {
    align-items: center;
    display: flex;
    gap: 11px;
}

.template-card-head > span {
    align-items: center;
    background: #eef6ff;
    border-radius: 7px;
    color: #2563eb;
    display: flex;
    font-size: 1.2rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.template-card h2 { font-size: .9rem; margin: 0; }
.template-card small,
.template-card p { color: #64748b; font-size: .72rem; margin: 0; }

.template-editor-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(420px, 1fr) minmax(360px, .8fr);
}

.template-code-browser {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 12px;
}

.template-code-browser details { border-top: 1px solid #e2e8f0; padding: 9px 0; }
.template-code-browser summary { color: #334155; cursor: pointer; font-size: .75rem; font-weight: 800; }
.template-code-browser details > div { display: grid; gap: 5px; margin-top: 8px; }

.template-code-browser button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr) auto;
    padding: 7px 8px;
    text-align: left;
}

.template-code-browser button:hover,
.template-code-browser button.is-copied { background: #ecfeff; border-color: #5eead4; }
.template-code-browser code { color: #0f766e; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; }
.template-code-browser button span { color: #64748b; font-size: .67rem; }
.template-detected-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.template-detected-codes code { background: #f1f5f9; border-radius: 5px; padding: 5px 7px; }

.template-version-row {
    align-items: center;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    padding: 8px 2px;
}

.template-version-row small { color: #64748b; display: block; font-size: .68rem; }

.template-version-hash {
    display: grid;
    justify-items: end;
    line-height: 1.1;
}

.template-version-hash small {
    color: #64748b;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: 0;
}

.template-version-hash code {
    color: var(--app-primary, #176b87);
    font-size: .72rem;
}

.document-merge-preview-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 22%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--app-primary) 6%, var(--app-surface));
    color: var(--app-text);
    font-size: .82rem;
    line-height: 1.45;
}

.document-merge-preview-note i {
    color: var(--app-primary);
    font-size: 1rem;
}

.template-preview-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.template-test-preview {
    min-height: calc(100vh - 210px);
    overflow: hidden;
}

.template-test-preview iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 230px);
    min-height: 620px;
    border: 0;
    background: #fff;
}

.template-automation-settings {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    margin: 18px 0;
    padding: 14px;
}

.template-automation-settings .dashboard-section-head > i {
    color: #0f766e;
    font-size: 1.15rem;
}

.template-selector-settings {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    margin: 18px 0;
    padding: 14px;
}

.template-selector-settings .dashboard-section-head > i {
    color: #0f766e;
    font-size: 1.15rem;
}

.template-selector-list {
    display: grid;
    gap: 10px;
}

.template-selector-row {
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    padding: 10px;
}

.template-selector-row-head {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 9px;
}

.template-selector-row-head strong {
    color: #334155;
    font-size: .78rem;
}

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

.template-selector-grid label {
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.template-selector-check {
    align-items: center;
    align-self: end;
    display: flex;
    gap: 6px;
    min-height: 31px;
}

.document-merge-selectors {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    padding: 10px;
}

.document-merge-selector-group {
    display: grid;
    gap: 4px;
}

.document-merge-selector-group label {
    color: #334155;
    font-size: .76rem;
    font-weight: 800;
}

.mass-merge-selectors {
    background: #fff;
}

.mass-merge-selector-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mass-merge-selector-head strong {
    color: #334155;
    display: block;
    font-size: .82rem;
}

.mass-merge-selector-head small {
    color: #64748b;
    display: block;
    font-size: .72rem;
}

.template-direct-activity {
    border-bottom: 1px solid #dbe4ee;
    border-top: 1px solid #dbe4ee;
    margin: 14px 0;
    padding: 14px 0;
}

.template-field-update-builder .field-update-row-advanced {
    background: #fff;
}

.template-field-update-builder [data-update-event] {
    display: none;
}

.template-decision-settings {
    border-top: 1px solid #dbe4ee;
    margin: 18px 0;
    padding-top: 18px;
}

.template-decision-settings .dashboard-section-head > i { color: #2563eb; font-size: 1.15rem; }
.template-condition-panel,
.template-route-card { background: #f8fafc; border: 1px solid #dbe4ee; border-radius: 7px; padding: 12px; }
.template-condition-panel-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.template-condition-panel-head small { color: #64748b; font-size: .7rem; }
.template-route-list { display: grid; gap: 10px; }
.template-route-card-head { align-items: center; display: grid; gap: 8px; grid-template-columns: 1fr 120px 150px 80px auto; margin-bottom: 10px; }
.template-condition-group { border-left: 3px solid #93c5fd; display: grid; gap: 7px; padding: 8px 0 8px 10px; }
.template-condition-group.depth-1 { border-left-color: #5eead4; }
.template-condition-group.depth-2 { border-left-color: #fbbf24; }
.template-condition-group-head { align-items: center; display: flex; gap: 6px; }
.template-condition-group-head strong { font-size: .72rem; margin-right: auto; }
.template-condition-row { align-items: center; display: grid; gap: 6px; grid-template-columns: 72px minmax(130px, 1fr) minmax(130px, 1fr) 110px minmax(130px, 1fr) auto; }
.template-condition-value { display: grid; gap: 5px; grid-template-columns: minmax(0, 1fr) 76px; }
.template-condition-value > :only-child,
.template-condition-value > .form-control:first-child { grid-column: 1 / -1; }
.template-condition-children { display: grid; gap: 7px; }

@media (max-width: 900px) {
    .template-route-card-head,
    .template-condition-row { grid-template-columns: 1fr; }
}

.template-syntax-help {
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 11px;
}

.template-syntax-help > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 9px;
    padding: 11px;
}

.template-syntax-help p { color: #475569; font-size: .72rem; }
.template-syntax-help code { color: #0f766e; overflow-wrap: anywhere; }

.template-file-choice {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
    display: inline-flex;
    gap: 8px;
    min-width: 104px;
    padding: 6px 8px;
}

.template-file-choice span { color: #334155; font-size: .75rem; font-weight: 700; }
.template-file-choice a { color: #0f766e; margin-left: auto; }

.mass-source-divider {
    align-items: center;
    color: #94a3b8;
    display: flex;
    font-size: .66rem;
    font-weight: 800;
    gap: 12px;
    letter-spacing: .08em;
    margin: 20px 0 16px;
}

.mass-source-divider::before,
.mass-source-divider::after {
    background: #e2e8f0;
    content: "";
    flex: 1;
    height: 1px;
}

.mass-identifier-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.55;
    resize: vertical;
}

.mass-report-picker {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    overflow: hidden;
}

.mass-report-picker-head {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 11px 13px;
}

.mass-report-picker-head strong,
.mass-report-picker-head small { display: block; }
.mass-report-picker-head small { color: #64748b; font-size: .7rem; margin-top: 2px; }
.mass-selection-tools { align-items: center; display: flex; gap: 6px; }

.mass-report-filter {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    padding: 9px 12px;
}

.mass-report-filter i { color: #64748b; }
.mass-report-filter .form-control { max-width: 380px; }
.mass-report-results { max-height: 390px; overflow: auto; }
.mass-report-results table { min-width: 720px; }
.mass-report-results thead { background: #eef2f7; position: sticky; top: 0; z-index: 1; }
.mass-report-results th { color: #475569; font-size: .68rem; white-space: nowrap; }
.mass-report-results td { background: #fff; font-size: .75rem; }
.mass-select-column { width: 36px; }

.mass-report-loading {
    align-items: center;
    color: #64748b;
    display: flex;
    gap: 9px;
    justify-content: center;
    min-height: 140px;
}

.document-merge-modal { inset: 0; position: fixed; z-index: 1090; }
.document-merge-backdrop { background: rgba(15, 23, 42, .54); inset: 0; position: absolute; }
.document-merge-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    left: 50%;
    max-height: calc(100vh - 36px);
    max-width: 720px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 720px);
}

.document-merge-form {
    display: contents;
}

.document-merge-body {
    overflow-y: auto;
    padding: 18px;
}

.document-merge-dialog .related-add-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 18px;
}

.document-merge-dialog .related-add-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 18px;
}

.template-empty-icon {
    align-items: center;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 50%;
    color: #0f766e;
    display: inline-flex;
    font-size: 1.35rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 12px;
    width: 48px;
}

.record-document-history .btn-group form { display: inline-flex; }
.record-document-history .table { min-width: 760px; }

.merge-output-links { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.merge-output-links > a,.merge-output-links > label { align-items: center; display: inline-flex; gap: 5px; margin: 0; }
.merge-output-links a { color: #2867a0; font-size: .78rem; font-weight: 700; text-decoration: none; }
.merge-output-links a.is-pdf { color: #b33b43; }
.merge-output-links a i { font-size: 1.15rem; }
.merge-status-actions { align-items: center; display: flex; gap: 7px; min-height: 30px; }
.merge-automation-state { align-items: center; background: #eef7f1; color: #237b49; display: inline-flex; height: 26px; justify-content: center; width: 26px; }
.merge-automation-state.is-failed { background: #fff0f1; color: #b33b43; }
.merge-remerge-menu { position: relative; }
.merge-remerge-menu > summary { align-items: center; border: 1px solid var(--app-border, #d9e3eb); color: var(--app-primary, #176b87); cursor: pointer; display: inline-flex; height: 28px; justify-content: center; list-style: none; width: 30px; }
.merge-remerge-menu > summary::-webkit-details-marker { display: none; }
.merge-remerge-menu > div { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); box-shadow: 0 12px 30px rgba(17,42,67,.18); min-width: 235px; padding: 5px; position: absolute; right: 0; top: calc(100% + 5px); z-index: 5200; }
.merge-remerge-menu form button { align-items: center; background: transparent; border: 0; color: var(--app-text, #243b56); display: flex; gap: 9px; padding: 8px; text-align: left; width: 100%; }
.merge-remerge-menu form button:hover { background: color-mix(in srgb, var(--app-primary, #176b87) 8%, transparent); }
.merge-remerge-menu form button > span { display: grid; font-size: .8rem; font-weight: 700; }
.merge-remerge-menu form button small { color: var(--app-muted, #718198); font-size: .7rem; font-weight: 400; }
.merge-job-count { align-items: center; background: color-mix(in srgb, var(--app-primary, #176b87) 10%, transparent); color: var(--app-primary, #176b87); display: inline-flex; font-weight: 750; justify-content: center; min-height: 30px; min-width: 34px; text-decoration: none; }
.merge-batch-id { color: var(--app-primary, #176b87); font-size: .78rem; white-space: nowrap; }
.merge-job-statuses { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; }
.merge-status-chip { align-items: center; background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); color: var(--app-text, #243b56); display: inline-flex; font-size: .7rem; font-weight: 800; gap: 5px; min-height: 27px; padding: 3px 8px; }
.merge-status-chip:hover { box-shadow: 0 3px 10px rgba(17, 42, 67, .12); transform: translateY(-1px); }
.merge-status-chip.success { background: #edf9f2; border-color: #b8dfc7; color: #237b49; }
.merge-status-chip.danger { background: #fff1f2; border-color: #f5c2c7; color: #b4232d; }
.merge-status-chip.progress { background: #fff8e8; border-color: #f1d28a; color: #8a5a00; }
.merge-status-chip .spinner-border { height: 11px; width: 11px; }
.merge-progress-track { background: color-mix(in srgb, var(--app-border, #d9e3eb) 65%, transparent); height: 3px; margin: 5px 0 3px; max-width: 210px; overflow: hidden; }
.merge-progress-track span { background: var(--app-primary, #176b87); display: block; height: 100%; transition: width .25s ease; }
.merge-download-control { align-items: center; display: flex; gap: 7px; min-width: 145px; }
.merge-download-control .btn { font-size: .67rem; font-weight: 800; min-width: 42px; }
#mergeJobDetailsModal .modal-content { max-height: calc(100vh - 36px); }
#mergeJobDetailsModal .modal-body { min-height: 220px; }
#mergeJobDetailsModal thead { background: var(--app-surface-muted, #f4f7fa); position: sticky; top: 0; z-index: 1; }

.report-schedule-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 28px);
    max-width: 1040px;
    top: 14px;
    transform: translateX(-50%);
    width: min(96vw, 1040px);
}

.report-schedule-body {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.report-schedule-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr);
}

.report-schedule-section {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 14px;
}

.report-schedule-weekdays {
    display: grid;
    gap: 6px;
}

.report-schedule-weekdays > div {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
}

.report-schedule-weekdays label {
    cursor: pointer;
    margin: 0;
}

.report-schedule-weekdays input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.report-schedule-weekdays span {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    display: flex;
    font-size: .7rem;
    font-weight: 700;
    height: 34px;
    justify-content: center;
}

.report-schedule-weekdays input:checked + span {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.report-schedule-next {
    align-items: center;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 7px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
}

.report-schedule-next span {
    color: #0e7490;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.report-schedule-next strong {
    color: #164e63;
    font-size: .78rem;
}

.report-schedule-checks {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    display: grid;
    gap: 9px;
    padding: 11px;
}

.report-schedule-history {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    margin-top: 14px;
    overflow: hidden;
}

.report-schedule-run {
    align-items: center;
    border-top: 1px solid #edf2f7;
    display: grid;
    gap: 10px;
    grid-template-columns: 12px minmax(0, 1fr);
    padding: 9px 12px;
}

.report-schedule-run > span:first-child {
    font-size: .48rem;
}

.report-schedule-run .status-success { color: #16a34a; }
.report-schedule-run .status-partial,
.report-schedule-run .status-skipped { color: #f59e0b; }
.report-schedule-run .status-failed { color: #dc2626; }
.report-schedule-run .status-running { color: #0891b2; }

.report-schedule-run strong {
    display: block;
    font-size: .74rem;
}

.report-schedule-run small {
    color: #64748b;
    display: block;
    font-size: .68rem;
}

.report-schedule-response {
    font-size: .76rem;
    margin-top: 14px;
}

.report-settings-dialog.report-subreport-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 32px);
    max-width: 820px;
    top: 16px;
    transform: translateX(-50%);
    width: min(94vw, 820px);
}

.report-level-builder {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 12px;
    overflow: hidden;
}

.report-level-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.report-level-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr 1fr 34px;
    padding: 8px;
}

.report-drop-zone {
    border-style: dashed;
    min-height: 102px;
}

.report-drop-zone strong {
    display: block;
    font-size: .82rem;
    margin-bottom: 8px;
}

.report-chip {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    font-size: .82rem;
    gap: 6px;
    margin: 0 5px 6px 0;
    padding: 5px 8px;
}

.report-chip.measure {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.report-chip.filter {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.report-chip button {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    padding: 0;
}

.report-preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 235px;
    margin-top: 12px;
}

.report-preview-table-card,
.report-chart-card {
    overflow: hidden;
    padding: 0;
}

.report-preview-head {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 9px 10px;
}

.report-preview-head small {
    color: #64748b;
}

.report-column-heading {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.report-column-heading small {
    display: block;
    line-height: 1.25;
}

.report-preview-table-card th {
    background: #f8fafc;
    color: #334155;
    font-size: .75rem;
    text-transform: uppercase;
}

.report-bars {
    align-items: end;
    display: flex;
    gap: 9px;
    height: 184px;
    padding: 22px 14px 42px;
}

.report-bars span {
    background: #0d6efd;
    border-radius: 5px 5px 0 0;
    flex: 1;
    min-width: 18px;
    position: relative;
}

.report-bars span small {
    bottom: -32px;
    color: #64748b;
    font-size: .62rem;
    left: 50%;
    max-width: 84px;
    overflow: hidden;
    position: absolute;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    white-space: nowrap;
}

.report-bars span b {
    color: #334155;
    font-size: .66rem;
    left: 50%;
    position: absolute;
    top: -19px;
    transform: translateX(-50%);
}

.report-bars.is-line span {
    border-radius: 999px;
    flex: 0 0 18px;
    margin-inline: auto;
}

.report-bars.is-area span {
    background: linear-gradient(180deg, rgba(13, 110, 253, .85), rgba(13, 110, 253, .16));
    border-radius: 8px 8px 0 0;
}

.report-chart-preview {
    min-height: 174px;
}

.report-chart-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    font-size: .9rem;
    height: 174px;
    justify-content: center;
}

.report-preview-pie {
    aspect-ratio: 1;
    background: conic-gradient(#2563eb 0 38%, #14b8a6 38% 62%, #f59e0b 62% 82%, #ef4444 82% 100%);
    border-radius: 50%;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    height: 132px;
    margin: 18px auto 10px;
    position: relative;
}

.report-preview-pie.is-doughnut::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 54%;
    left: 23%;
    position: absolute;
    top: 23%;
    width: 54%;
}

.report-preview-legend {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.report-preview-legend i {
    border-radius: 999px;
    display: block;
    height: 10px;
    width: 34px;
}

.report-preview-legend i:nth-child(1) { background: #2563eb; }
.report-preview-legend i:nth-child(2) { background: #14b8a6; }

.report-preview-live-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: center;
    padding: 0 12px 12px;
}

.report-preview-live-legend span {
    align-items: center;
    color: #475569;
    display: inline-flex;
    font-size: .7rem;
    gap: 5px;
}

.report-preview-live-legend i {
    border-radius: 50%;
    height: 8px;
    width: 8px;
}
.report-preview-legend i:nth-child(3) { background: #f59e0b; }
.report-preview-legend i:nth-child(4) { background: #ef4444; }

.document-page-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.document-page-head h1 {
    font-size: 1.55rem;
    margin: 0;
}

.document-page-head p {
    color: #64748b;
    margin: 3px 0 0;
}

.document-module-switcher {
    min-width: 260px;
}

.document-module-empty {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 360px;
    text-align: center;
}

.document-module-empty i {
    color: #94a3b8;
    font-size: 2.4rem;
}

.document-module-empty h2 {
    color: #0f172a;
    font-size: 1.25rem;
    margin: 0;
}

.document-manager {
    display: grid;
    gap: 16px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.document-tag-rail,
.document-workbench {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.document-tag-rail {
    align-self: start;
    overflow: hidden;
    position: sticky;
    top: 14px;
}

.document-panel-head,
.document-toolbar {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px;
}

.document-panel-head small,
.document-toolbar small {
    color: #64748b;
    display: block;
    font-size: .78rem;
}

.document-tag-link {
    align-items: center;
    color: #334155;
    display: grid;
    gap: 9px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px 14px;
    text-decoration: none;
}

.document-tag-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.document-tag-row .document-tag-link {
    min-width: 0;
}

.document-tag-settings {
    background: transparent;
    border: 0;
    border-left: 1px solid #eef2f7;
    color: #64748b;
}

.document-tag-settings:hover {
    background: #eef5ff;
    color: #0d6efd;
}

.document-tag-link:hover,
.document-tag-link.active {
    background: #eef5ff;
    color: #0d47a1;
}

.document-tag-dot {
    border-radius: 999px;
    display: block;
    height: 10px;
    width: 10px;
}

.document-workbench {
    min-width: 0;
}

.document-toolbar h2 {
    font-size: 1.1rem;
    margin: 0;
}

.document-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.document-search {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    min-width: 290px;
    padding: 7px 10px;
}

.document-search input {
    background: transparent;
    border: 0;
    min-width: 0;
    outline: 0;
    width: 100%;
}

.document-dropzone {
    align-items: center;
    background: #f8fbff;
    border: 1px dashed #9db7da;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(300px, auto);
    margin: 14px;
    padding: 14px;
}

.document-dropzone.is-dragging,
.document-dropzone.has-files {
    background: #eef6ff;
    border-color: #0d6efd;
}

.document-upload-queue {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    grid-column: 1 / -1;
}

.document-upload-attributes {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 10px;
}

.document-upload-attributes label {
    display: grid;
    gap: 4px;
}

.document-upload-attributes span {
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.document-upload-queue span {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: .78rem;
    gap: 5px;
    max-width: 260px;
    overflow: hidden;
    padding: 5px 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-dropzone > div:first-child {
    align-items: center;
    display: grid;
    gap: 4px 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.document-dropzone > div:first-child i {
    color: #0d6efd;
    font-size: 1.6rem;
    grid-row: span 2;
}

.document-dropzone small {
    color: #64748b;
}

.document-upload-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.document-upload-controls .form-select {
    width: 150px;
}

.document-upload-controls .form-control {
    width: 150px;
}

.document-bulk-bar {
    align-items: center;
    background: #fbfdff;
    border-bottom: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
}

.document-bulk-bar .form-select {
    max-width: 190px;
}

.document-selection-count {
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
    margin-left: auto;
}

.document-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.document-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.document-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 54px minmax(0, 1fr) auto;
    padding: 10px;
    position: relative;
    user-select: none;
}

.document-card:hover {
    border-color: #b9d4ff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.document-card.is-selected {
    background: #eef6ff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .16);
}

.document-list-grid .document-card {
    align-items: stretch;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.document-list-grid .document-thumb {
    grid-column: 1 / -1;
    height: 126px;
    width: 100%;
}

.document-list-grid .document-select {
    position: absolute;
}

.document-list-preview .document-card {
    align-items: start;
    grid-template-columns: auto 70px minmax(0, 1fr) auto;
}

.document-thumb {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    color: #2563eb;
    display: flex;
    height: 54px;
    justify-content: center;
    overflow: hidden;
    width: 54px;
}

.document-thumb i {
    font-size: 1.6rem;
}

.document-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.document-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.document-title-row a {
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.document-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: .78rem;
    gap: 8px;
    margin-top: 4px;
}

.document-tag-pill {
    background: color-mix(in srgb, var(--tag-color) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--tag-color) 28%, #fff);
    border-radius: 999px;
    color: #334155;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
}

.document-status-badge {
    background: color-mix(in srgb, var(--document-status-color) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--document-status-color) 30%, #fff);
    color: color-mix(in srgb, var(--document-status-color) 72%, #0f172a);
    font-weight: 700;
}

.document-workflow-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.document-workflow-stats > div {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    padding: 12px 14px;
}

.document-workflow-stats strong {
    color: #0f172a;
    display: block;
    font-size: 1.25rem;
    line-height: 1.1;
}

.document-workflow-stats span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.document-share-list {
    display: grid;
    gap: 12px;
}

.document-share-group {
    background: color-mix(in srgb, var(--app-surface, #fff) 96%, var(--app-primary, #2563eb));
    border: 1px solid var(--app-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.document-share-group > header {
    align-items: center;
    background: color-mix(in srgb, var(--app-page, #f8fafc) 88%, var(--app-primary, #2563eb));
    border-bottom: 1px solid var(--app-border, #e2e8f0);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 11px 12px;
}

.document-share-group > header small,
.document-share-files small {
    color: color-mix(in srgb, var(--app-text, #334155) 68%, transparent);
    display: block;
    margin-top: 2px;
}

.document-share-avatar,
.document-share-file-icon {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #2563eb) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--app-primary, #2563eb) 24%, #fff);
    border-radius: 7px;
    color: var(--app-primary, #2563eb);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.document-share-files {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.document-share-files > a {
    align-items: center;
    color: var(--app-text, #1f2937);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 11px 12px;
    text-decoration: none;
}

.document-share-files > a:hover {
    background: color-mix(in srgb, var(--app-primary, #2563eb) 7%, transparent);
}

.document-prompt-icon-preview {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #2563eb) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--app-primary, #2563eb) 24%, #fff);
    border-radius: 6px;
    color: var(--app-primary, #2563eb);
    display: inline-flex;
    flex: 0 0 32px;
    height: 32px;
    justify-content: center;
}

.document-actions {
    display: flex;
    gap: 5px;
}

.document-icon-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #334155;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    text-decoration: none;
    width: 32px;
}

.document-icon-btn:hover {
    background: #eef5ff;
    border-color: #b9d4ff;
    color: #0d6efd;
}

.document-manager.is-loading {
    opacity: .68;
    pointer-events: none;
}

body.document-manager-fullscreen-open {
    overflow: hidden;
}

.document-manager.is-fullscreen {
    background: #f6f8fb;
    bottom: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    left: 0;
    margin: 0;
    max-height: none;
    padding: 14px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 2050;
}

.document-manager.is-fullscreen .document-tag-rail,
.document-manager.is-fullscreen .document-workbench {
    min-height: 0;
}

.document-manager.is-fullscreen .document-list {
    max-height: calc(100vh - 250px);
    overflow: auto;
}

.document-context-menu {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .18);
    min-width: 190px;
    padding: 6px;
    position: fixed;
    z-index: 2000;
}

.document-context-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #334155;
    display: flex;
    gap: 8px;
    padding: 8px 9px;
    text-align: left;
    width: 100%;
}

.document-context-menu button:hover {
    background: #eef5ff;
    color: #0d6efd;
}

.document-context-menu button.danger {
    color: #b42318;
}

.document-context-menu button.danger:hover {
    background: #fff1f1;
}

.document-annotation-edit {
    position: relative;
}

.document-annotation-edit summary {
    list-style: none;
}

.document-annotation-edit summary::-webkit-details-marker {
    display: none;
}

.document-annotation-edit-form {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .18);
    display: grid;
    gap: 8px;
    min-width: 260px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 20;
}

.document-inline-preview {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    height: 260px;
    margin-top: 10px;
    overflow: hidden;
}

.document-inline-preview iframe,
.document-detail-preview iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.document-inline-preview div,
.document-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    min-height: 190px;
    text-align: center;
}

.document-empty i {
    color: #94a3b8;
    font-size: 2rem;
}

.document-detail-preview {
    height: 68vh;
    min-height: 420px;
    overflow: hidden;
    position: relative;
}

.document-pdf-viewer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
}

.document-pdf-toolbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 8px;
    position: relative;
    z-index: 6;
}

.document-pdf-toolbar label {
    align-items: center;
    color: #344054;
    display: flex;
    font-size: .88rem;
    font-weight: 700;
    gap: 7px;
    margin: 0;
}

.document-pdf-toolbar input {
    text-align: center;
    width: 74px;
}

.document-pdf-toolbar-divider {
    background: #dbe3ee;
    display: inline-block;
    height: 24px;
    width: 1px;
}

.document-pdf-zoom-label {
    color: #344054;
    font-size: .84rem;
    font-weight: 800;
    min-width: 44px;
    text-align: center;
}

.document-pdf-search {
    max-width: 180px;
}

.document-pdf-search-status {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    min-width: 64px;
}

.document-pdf-body {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 0;
}

.document-pdf-pages {
    background: #f8fafc;
    border-right: 1px solid #dbe3ee;
    display: grid;
    gap: 8px;
    overflow: auto;
    padding: 10px;
}

.document-pdf-pages button {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475467;
    font-size: .8rem;
    font-weight: 700;
    min-height: 118px;
    padding: 8px 6px;
}

.document-pdf-pages button::before {
    content: none;
}

.document-pdf-pages button canvas {
    background: #fff;
    border: 1px solid #d0d8e4;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .08);
    display: block;
    height: auto;
    margin: 0 auto 7px;
    max-height: 86px;
    max-width: 78px;
    width: auto;
}

.document-pdf-pages button.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.document-pdf-body iframe {
    background: #f1f5f9;
    border: 0;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.document-pdf-canvas-area {
    align-items: flex-start;
    background: linear-gradient(180deg, #eef3f9 0%, #dfe7f1 100%);
    display: grid;
    gap: 22px;
    justify-items: center;
    min-height: 0;
    overflow: auto;
    padding: 18px;
}

.document-pdf-page-surface {
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
    max-width: 100%;
    position: relative;
}

.document-pdf-page-badge {
    background: rgba(15, 23, 42, .78);
    border-radius: 999px;
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    left: 10px;
    padding: 4px 9px;
    position: absolute;
    top: 10px;
    z-index: 3;
}

.document-pdf-page-surface canvas {
    display: block;
    max-width: 100%;
}

.document-pdf-loading {
    align-items: center;
    align-self: stretch;
    color: #475467;
    display: grid;
    font-weight: 700;
    gap: 10px;
    justify-items: center;
    min-height: 260px;
    width: 100%;
}

.document-detail-preview.is-image-annotatable {
    align-items: center;
    background: #0f172a;
    display: flex;
    justify-content: center;
}

.document-detail-preview img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.document-annotation-layer {
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 4;
}

.document-detail-preview.is-annotation-mode .document-annotation-layer {
    cursor: crosshair;
    pointer-events: auto;
}

.document-detail-preview.is-annotation-mode::after {
    background: rgba(37, 99, 235, .08);
    border: 1px dashed rgba(37, 99, 235, .35);
    content: "";
    inset: 10px;
    pointer-events: none;
    position: absolute;
    z-index: 3;
}

.document-annotation-mark {
    border: 3px solid #f59e0b;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
    color: var(--annotation-color, #f59e0b);
    display: grid;
    place-items: center;
    pointer-events: none;
    position: absolute;
}

.document-annotation-mark.circle {
    border-radius: 999px;
}

.document-annotation-mark.comment,
.document-annotation-mark.bookmark {
    background: #fff;
    border: 2px solid var(--annotation-color, #f59e0b);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .2);
    font-size: 1rem;
    min-height: 28px;
    min-width: 28px;
}

.document-annotation-mark.bookmark {
    border-radius: 8px 8px 12px 12px;
}

.document-annotation-mark.is-draft {
    animation: annotationPulse 1s ease-in-out infinite;
    background: color-mix(in srgb, var(--annotation-color, #f59e0b) 12%, transparent);
}

.document-annotation-mark.is-highlighted {
    animation: annotationHighlight 1.8s ease-in-out;
    z-index: 8;
}

@keyframes annotationPulse {
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--annotation-color, #f59e0b) 22%, transparent); }
}

@keyframes annotationHighlight {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
    35%, 70% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--annotation-color, #f59e0b) 30%, transparent); }
}

.document-annotation-form {
    display: grid;
    gap: 10px;
}

.document-annotation-tools {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.document-annotation-tool-row,
.document-annotation-action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.document-annotation-page-input {
    max-width: 88px;
}

.document-annotation-help {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1d4ed8;
    font-size: .85rem;
    font-weight: 700;
    padding: 8px 10px;
}

.document-annotation-list {
    display: grid;
    gap: 8px;
}

.document-annotation-list > div {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px;
}

.document-annotation-dot {
    border-radius: 999px;
    height: 12px;
    width: 12px;
}

.document-annotation-jump {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
    text-align: left;
}

.document-annotation-jump:hover strong {
    color: #0d6efd;
    text-decoration: underline;
}

.document-annotation-list small {
    color: #64748b;
    display: block;
}

.document-ai-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.document-ai-result {
    background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    color: #344054;
    font-size: .88rem;
    min-height: 96px;
    padding: 8px;
}

.document-ai-chat-window {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.document-ai-chat-head,
.document-ai-chat-foot {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.document-ai-chat-foot {
    border-top: 1px solid #dbe3ee;
    color: #64748b;
    font-size: .76rem;
    padding-top: 8px;
}

.document-ai-message {
    align-items: flex-start;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    line-height: 1.45;
    padding: 9px 10px;
}

.document-ai-message.system {
    align-items: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    color: #475569;
}

.document-ai-message.user {
    align-self: flex-end;
    background: #dbeafe;
    color: #1e3a8a;
    max-width: 92%;
}

.document-ai-message.assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    max-width: 98%;
}

.document-ai-message pre,
.document-ai-extract-preview {
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: .88rem;
    margin: 0;
    white-space: pre-wrap;
}

.document-ai-answer-body {
    flex: 1;
    min-width: 0;
}

.document-ai-markdown p {
    margin: 0 0 8px;
}

.document-ai-markdown p:last-child {
    margin-bottom: 0;
}

.document-ai-structured-answer > p {
    color: #475569;
    margin: 0 0 10px;
}

.document-ai-date-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.document-ai-party-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.document-ai-date-item {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 9px;
}

.document-ai-party-item {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 9px;
}

.document-ai-party-head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
}

.document-ai-role-chip {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #047857;
    font-size: .74rem;
    font-weight: 800;
    padding: 3px 8px;
}

.document-ai-date-chip {
    align-self: start;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: .78rem;
    font-weight: 800;
    padding: 4px 9px;
}

.document-ai-date-item p {
    color: #334155;
    margin: 0;
}

.document-ai-party-item p {
    color: #334155;
    margin: 0;
}

.document-ai-extract-preview {
    background: #0f172a;
    border-radius: 8px;
    color: #e2e8f0;
    max-height: 220px;
    overflow: auto;
    padding: 10px;
}

[data-document-ai-preview-toggle].active {
    background: #2563eb;
    color: #fff;
}

.document-quick-preview-dialog {
    max-width: min(1440px, calc(100vw - 32px));
}

.document-quick-preview-dialog .modal-content {
    height: min(92vh, 980px);
}

.document-quick-preview-dialog .modal-body {
    min-height: 0;
}

.document-modal-preview-stage {
    background: #eef3f9;
    height: 100%;
    min-height: 72vh;
}

.document-quick-pdf-viewer .document-pdf-body {
    grid-template-columns: 150px minmax(0, 1fr);
}

.document-modal-image-preview {
    align-items: center;
    background: linear-gradient(180deg, #eef3f9 0%, #dfe7f1 100%);
    display: flex;
    height: 100%;
    justify-content: center;
    min-height: 72vh;
    overflow: auto;
    padding: 24px;
}

.document-modal-image-preview img {
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.document-modal-preview-frame {
    border: 0;
    display: block;
    height: min(78vh, 820px);
    width: 100%;
}

.document-recycle-bin {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    grid-column: 1 / -1;
    margin-top: 16px;
    overflow: hidden;
}

.document-inbox-list {
    display: grid;
    gap: 14px;
}

.document-detail-list {
    display: grid;
    gap: 8px;
    grid-template-columns: 120px minmax(0, 1fr);
    margin: 0;
}

.document-detail-list dt {
    color: #64748b;
    font-size: .8rem;
}

.document-detail-list dd {
    margin: 0;
    min-width: 0;
}

.document-audit-list,
.document-version-list {
    display: grid;
    gap: 10px;
}

.document-audit-list > div {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.document-audit-list small,
.document-version-list small,
.document-version-list span {
    color: #64748b;
    display: block;
}

.document-audit-icon {
    align-items: center;
    background: #eef5ff;
    border-radius: 999px;
    color: #0d6efd;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.document-attribute-config {
    display: grid;
    gap: 8px;
}

.document-attribute-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    font-size: .82rem;
    padding: 12px;
    text-align: center;
}

.document-attribute-row {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    padding: 9px;
}

.document-attribute-main {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(150px, 1fr) 120px minmax(180px, 1fr);
}

.document-attribute-main label {
    display: grid;
    gap: 4px;
}

.document-attribute-main label > span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
}

.document-attribute-required {
    margin: 0 4px 8px 2px;
    white-space: nowrap;
}

.document-attribute-remove {
    height: 32px;
    margin-bottom: 1px;
    padding: 0;
    width: 32px;
}

.document-upload-attributes em,
.external-request-attributes em {
    font-style: normal;
    margin-left: 2px;
}

.external-request-attributes {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 12px;
}

.external-request-attributes label {
    display: grid;
    gap: 5px;
}

.external-request-attributes label > span {
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

@media (max-width: 767px) {
    .document-attribute-row,
    .document-attribute-main {
        grid-template-columns: 1fr;
    }

    .document-attribute-required {
        margin: 2px 0;
    }
}

.document-column-config {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 8px;
    padding: 10px;
}

.document-column-config strong {
    flex: 0 0 100%;
}

.document-column-config label {
    font-size: .82rem;
}

.public-share-shell {
    display: grid;
    min-height: calc(100vh - 140px);
    place-items: center;
}

.public-share-card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .12);
    max-width: 460px;
    padding: 28px;
    text-align: center;
    width: 100%;
}

.public-share-card h1 {
    font-size: 1.35rem;
}

.public-share-icon {
    align-items: center;
    background: #eef5ff;
    border-radius: 999px;
    color: #0d6efd;
    display: inline-flex;
    font-size: 1.6rem;
    height: 58px;
    justify-content: center;
    margin-bottom: 14px;
    width: 58px;
}

.shared-document-portal {
    margin: 20px auto;
    max-width: 1280px;
}

.shared-document-portal-head,
.shared-document-intro,
.shared-document-workspace,
.shared-document-footer {
    background: #fff;
    border: 1px solid #dce4ef;
}

.shared-document-portal-head {
    align-items: center;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    padding: 13px 18px;
}

.shared-document-brand,
.shared-document-access,
.shared-document-facts div,
.shared-document-file-meta,
.shared-document-footer {
    align-items: center;
    display: flex;
}

.shared-document-brand {
    color: #1e3655;
    font-weight: 700;
    gap: 9px;
}

.shared-document-brand i {
    color: #0d6efd;
    font-size: 1.2rem;
}

.shared-document-access {
    background: #eaf7ef;
    border: 1px solid #bfe2ca;
    color: #1f6b3a;
    font-size: .82rem;
    font-weight: 700;
    gap: 7px;
    padding: 5px 9px;
}

.shared-document-intro {
    border-top: 0;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    padding: 24px 26px;
}

.shared-document-intro h1 {
    color: #182b45;
    font-size: 1.65rem;
    margin: 2px 0 8px;
}

.shared-document-intro p {
    color: #506176;
    margin: 0;
    max-width: 720px;
}

.shared-document-facts {
    display: grid;
    gap: 10px;
    min-width: 235px;
}

.shared-document-facts div {
    color: #52647a;
    font-size: .82rem;
    gap: 9px;
}

.shared-document-facts i {
    color: #0d6efd;
    font-size: 1rem;
}

.shared-document-workspace {
    border-radius: 0 0 8px 8px;
    border-top: 0;
    display: grid;
    grid-template-columns: minmax(380px, .95fr) minmax(430px, 1.35fr);
    min-height: 580px;
}

.shared-document-file-pane {
    border-right: 1px solid #dce4ef;
    min-width: 0;
}

.shared-document-preview-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shared-document-pane-head {
    align-items: center;
    border-bottom: 1px solid #e3eaf2;
    color: #1f334e;
    display: flex;
    font-size: .9rem;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 17px;
}

.shared-document-pane-head span {
    color: #77869a;
    font-size: .76rem;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-document-file {
    align-items: center;
    border-bottom: 1px solid #edf1f5;
    display: flex;
    gap: 11px;
    min-height: 86px;
    padding: 12px 14px;
}

.shared-document-file:hover,
.shared-document-file.is-first {
    background: #f7faff;
}

.shared-document-file-icon {
    align-items: center;
    background: #edf3fb;
    color: #32669d;
    display: flex;
    flex: 0 0 38px;
    font-size: 1.25rem;
    height: 42px;
    justify-content: center;
}

.shared-document-file-main {
    min-width: 0;
    flex: 1;
}

.shared-document-file-main strong {
    color: #24374f;
    display: block;
    font-size: .88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-document-file-meta {
    color: #718198;
    flex-wrap: wrap;
    font-size: .72rem;
    gap: 0;
    margin-top: 5px;
}

.shared-document-file-meta span + span::before {
    color: #b1bdca;
    content: '•';
    margin: 0 6px;
}

.shared-document-file-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
}

.shared-document-file-actions .btn {
    white-space: nowrap;
}

.shared-document-preview-pane iframe {
    background: #f0f3f7;
    border: 0;
    flex: 1;
    min-height: 520px;
    width: 100%;
}

.shared-document-preview-empty,
.shared-document-empty {
    align-items: center;
    color: #6c7c91;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 42px 22px;
    text-align: center;
}

.shared-document-preview-empty i,
.shared-document-empty i {
    color: #94a9bf;
    font-size: 2rem;
    margin-bottom: 10px;
}

.shared-document-preview-empty strong {
    color: #3c506a;
}

.shared-document-empty {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    margin-top: 16px;
}

.shared-document-empty h2 {
    color: #24374f;
    font-size: 1.05rem;
}

.shared-document-footer {
    background: #f6f9fc;
    border-radius: 0 0 8px 8px;
    border-top: 0;
    color: #748399;
    font-size: .75rem;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 15px;
}

@media (max-width: 820px) {
    .shared-document-intro {
        display: block;
    }
    .shared-document-facts {
        margin-top: 16px;
    }
    .shared-document-workspace {
        display: block;
    }
    .shared-document-file-pane {
        border-bottom: 1px solid #dce4ef;
        border-right: 0;
    }
    .shared-document-preview-pane iframe {
        min-height: 430px;
    }
}

@media (max-width: 820px) {
    .theme-studio-head { gap: 12px; }
    .theme-palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-appearance-grid { grid-template-columns: 1fr; }
    .theme-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-preview-shell,.theme-preview-body,.theme-preview-fields,.theme-preview-grid { grid-template-columns: 1fr; }
    .theme-preview-rail { display: none; }
    .theme-studio-footer { align-items: stretch; flex-direction: column; gap: 10px; }
}

@media (max-width: 520px) {
    .shared-document-portal {
        margin: 0;
    }
    .shared-document-portal-head,
    .shared-document-intro {
        padding-left: 14px;
        padding-right: 14px;
    }
    .shared-document-brand span,
    .shared-document-file-actions span {
        display: none;
    }
    .shared-document-file {
        padding: 11px;
    }
    .shared-document-file-actions .btn {
        padding-left: 8px;
        padding-right: 8px;
    }
}

.view-designer-form {
    position: relative;
}

.view-designer-modal.is-canvas-focus .view-designer-workbench {
    bottom: 0;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 20;
}

.view-designer-modal.is-canvas-focus .view-field-palette,
.view-designer-modal.is-canvas-focus .view-canvas-shell {
    height: 100%;
    max-height: none;
    min-height: 0;
}

.view-designer-modal.is-canvas-focus .view-canvas-shell {
    background: #f5f7fb;
}

.view-designer-modal.is-canvas-focus .view-designer-actions {
    flex: 0 0 auto;
}

.view-designer-modal.is-canvas-focus .view-designer-checks,
.view-designer-modal.is-canvas-focus .record-title-builder,
.view-designer-modal.is-canvas-focus .designer-pinned-summary {
    display: none;
}

.view-designer-modal.is-canvas-focus .view-designer-action-buttons {
    margin-left: auto;
}

.view-designer-modal.is-canvas-focus .designer-canvas-focus-toggle {
    align-items: center;
    background: #18345e;
    border-color: #18345e;
    color: #fff;
    display: inline-flex;
    gap: 5px;
}

.designer-canvas-focus-toggle {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.designer-canvas-focus-save {
    display: none;
}

.view-designer-modal.is-canvas-focus .designer-canvas-focus-save {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.view-designer-modal.is-canvas-focus .view-designer-message:not(.d-none) {
    border: 1px solid currentColor;
    border-radius: 6px;
    bottom: 12px;
    box-shadow: 0 8px 24px rgba(12, 24, 43, .2);
    max-width: min(360px, calc(100% - 220px));
    position: absolute;
    right: 12px;
    z-index: 35;
}

.report-inspector {
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.report-inspector-tabs {
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 8px;
}

.report-inspector-tabs button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: .76rem;
    font-weight: 800;
    padding: 6px 10px;
    white-space: nowrap;
}

.report-inspector-tabs button.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.report-inspector-body {
    height: auto;
    padding: 12px;
}

.report-tab-panel {
    display: none;
}

.report-tab-panel.active {
    display: block;
}

.report-condition-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 7px;
    grid-template-columns: 74px minmax(170px, 1.15fr) minmax(135px, .9fr) minmax(135px, .9fr) minmax(210px, 1.25fr) 34px;
    margin-bottom: 8px;
    padding: 8px;
}

.report-mini-icon {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    color: #334155;
    display: inline-flex;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.report-mini-icon.danger {
    color: #b42318;
}

@media (max-width: 1250px) {
    .report-intent-studio {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .report-intent-choices {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    .report-workspace {
        grid-template-columns: 260px 1fr;
    }

    .report-inspector {
        grid-column: 1 / -1;
        min-height: 430px;
    }
}

@media (max-width: 900px) {
    .report-intent-studio {
        grid-template-columns: 1fr;
    }

    .report-mode-switch {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .template-editor-grid {
        grid-template-columns: 1fr;
    }

    .template-code-browser {
        max-height: none;
        position: static;
    }

    .report-schedule-grid {
        grid-template-columns: 1fr;
    }

    .report-schedule-weekdays > div {
        grid-template-columns: repeat(4, minmax(42px, 1fr));
    }

    [data-report-settings-modal="access"] .report-share-settings {
        grid-template-columns: 1fr;
    }

    [data-report-settings-modal="access"] .report-settings-dialog {
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        top: 12px;
        transform: translateX(-50%);
    }

    .dashboard-command-header,
    .dashboard-canvas-heading,
    .dashboard-lens-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-ai-brief,
    .dashboard-intelligence-grid,
    .dashboard-attention-board,
    .dashboard-map-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-lens-switcher {
        grid-template-columns: repeat(4, minmax(90px, 1fr));
        overflow-x: auto;
    }

    .dashboard-lens-switcher button {
        min-width: 105px;
    }

    .dashboard-flow-board {
        grid-template-columns: repeat(4, minmax(250px, 1fr));
    }

    .dashboard-calendar {
        overflow-x: auto;
    }

    .dashboard-calendar-toolbar {
        align-items: flex-start;
        background: #fff;
        grid-template-columns: 1fr;
        left: 0;
        position: sticky;
        width: min(100%, 100vw);
        z-index: 4;
    }

    .dashboard-calendar-controls {
        grid-template-columns: repeat(3, minmax(120px, 1fr)) auto auto;
        width: 100%;
    }

    .calendar-add-command {
        grid-column: 1 / -1;
    }

    .calendar-intelligence {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .calendar-intelligence-metrics {
        grid-column: 1 / -1;
        overflow-x: auto;
    }

    .dashboard-calendar-weekdays,
    .dashboard-calendar-grid.is-month,
    .dashboard-calendar-grid.is-week {
        min-width: 700px;
    }

    .dashboard-calendar-grid.is-year {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    .dashboard-ai-risk {
        text-align: left;
    }

    .dashboard-ai-command {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-ai-command .btn {
        grid-column: 1 / -1;
    }

    .dashboard-timeline-event {
        grid-template-columns: 62px 8px minmax(0, 1fr) auto;
    }

    .report-source-panel {
        max-height: none;
        position: static;
    }

    .document-page-head,
    .document-toolbar,
    .document-dropzone {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .document-page-head,
    .document-toolbar,
    .document-toolbar-actions,
    .document-upload-controls {
        flex-direction: column;
    }

    .document-manager {
        grid-template-columns: 1fr;
    }

    .document-tag-rail {
        max-height: 260px;
        overflow-y: auto;
        position: static;
    }

    .document-search,
    .document-module-switcher,
    .document-upload-controls .form-select,
    .document-upload-controls .form-control {
        min-width: 0;
        width: 100%;
    }

    .document-card,
    .document-list-preview .document-card {
        grid-template-columns: auto 48px minmax(0, 1fr);
    }

    .document-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .report-command-bar,
    .report-workspace,
    .report-dataset-map,
    .report-preview-grid {
        grid-template-columns: 1fr;
    }

    .report-command-main {
        grid-template-columns: 1fr;
    }


    .report-stage-bar,
    .report-drop-grid,
    .report-question-builder,
    .report-guided-grid,
    .report-condition-row,
    .report-level-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .document-summary-prompt-config > div,
    .document-intake-rule-head,
    .document-intake-condition {
        grid-template-columns: 1fr;
    }

    .document-summary-prompt-config > div > button,
    .document-intake-rule-head > button,
    .document-intake-condition > button {
        justify-self: end;
    }
}
.address-field-config {
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    overflow: hidden;
}

.address-field-config > .form-label { padding: 12px 14px 4px; }
.address-field-config-head,
.address-field-config-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 72px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
}
.address-field-config-head { background: #f3f6f9; color: #52606d; font-size: 12px; font-weight: 700; }
.address-field-config-row { border-top: 1px solid #edf0f3; font-size: 13px; }
.address-field-config-row input { justify-self: center; }

.address-group { padding: 0; }
.address-group-row { border: 1px solid #dce3ea; border-radius: 6px; background: #fff; padding: 12px; margin-bottom: 10px; }
.address-group-row-head { display: flex; justify-content: space-between; align-items: center; min-height: 30px; margin-bottom: 8px; color: #344054; font-weight: 700; }
.address-postal-wrap { position: relative; }
.address-postal-suggestions { position: absolute; z-index: 1080; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow: auto; background: #fff; border: 1px solid #cfd8e3; border-radius: 6px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); }
.address-postal-suggestions button { display: block; width: 100%; border: 0; border-bottom: 1px solid #edf0f3; background: #fff; padding: 9px 11px; text-align: left; }
.address-postal-suggestions button:hover { background: #eef6ff; }
.address-postal-suggestions button strong,
.address-postal-suggestions button small { display: block; }
.address-postal-suggestions button small { color: #667085; margin-top: 2px; }
.address-suggestion-state { padding: 10px; color: #667085; font-size: 13px; }
.address-display-card { display: grid; gap: 2px; }
.address-display-card small { color: #667085; }
.address-display-table th { white-space: nowrap; font-size: 12px; color: #52606d; }

/* Application theme tokens and shared work-surface polish. */
body { background: var(--app-page, #f4f7fa); color: var(--app-text, #1f3447); }
.navbar.app-navbar.bg-primary,.app-navbar,.bg-primary { background: var(--app-nav, #153b52) !important; }
.app-navbar { border-bottom: 1px solid color-mix(in srgb, var(--app-nav-text, #fff) 18%, transparent); box-shadow: 0 8px 22px color-mix(in srgb, var(--app-nav, #153b52) 16%, transparent); }.app-navbar .navbar-brand,.app-navbar .navbar-nav .nav-link,.app-navbar .navbar-toggler,.app-navbar .profile-menu-button,.app-navbar .notification-button { color: var(--app-nav-text, #fff) !important; }.app-navbar .profile-menu-button,.app-navbar .notification-button,.app-navbar .navbar-workspace-search-trigger { background: color-mix(in srgb, var(--app-nav-text, #fff) 9%, transparent); border-color: color-mix(in srgb, var(--app-nav-text, #fff) 22%, transparent); }.app-navbar .navbar-workspace-search-trigger,.app-navbar .navbar-workspace-search-trigger kbd { color: var(--app-nav-text, #fff); }.app-navbar .navbar-workspace-search-trigger kbd { background: color-mix(in srgb, var(--app-nav-text, #fff) 12%, transparent); }
.app-brand-lockup { align-items: center; display: inline-flex; gap: .55rem; max-width: 230px; }
.app-brand-lockup img { background: #fff; border-radius: 5px; height: 30px; object-fit: contain; padding: 2px; width: 34px; }
.app-brand-lockup > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-brand-mark { align-items: center; background: color-mix(in srgb, var(--app-nav-text, #fff) 14%, transparent); border: 1px solid color-mix(in srgb, var(--app-nav-text, #fff) 25%, transparent); border-radius: 5px; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.global-branding-settings { background: color-mix(in srgb, var(--app-primary, #176b87) 4%, var(--app-surface, #fff)); border: 1px solid color-mix(in srgb, var(--app-primary, #176b87) 20%, var(--app-border, #d9e3eb)); border-radius: 7px; padding: 1rem; }
.global-branding-settings > div:first-child > i { color: var(--app-primary, #176b87); font-size: 1.25rem; }
.branding-logo-control { align-items: flex-start; display: grid; gap: .75rem; grid-template-columns: 76px minmax(0, 1fr); }
.branding-logo-preview { align-items: center; background: #fff; border: 1px solid var(--app-border, #d9e3eb); border-radius: 6px; display: flex; height: 72px; justify-content: center; overflow: hidden; width: 76px; }
.branding-logo-preview img { height: 100%; object-fit: contain; padding: 5px; width: 100%; }
.branding-logo-preview.is-empty { color: var(--app-muted, #64748b); font-size: 1.4rem; }
.auth-route { background: color-mix(in srgb, var(--app-page, #f4f7fa) 78%, var(--app-surface, #fff)); min-height: 100vh; }
.auth-route .app-navbar { box-shadow: none; min-height: 58px; }
.auth-route .navbar-toggler,.auth-route .navbar-collapse { display: none !important; }
.auth-navbar-status { align-items: center; color: color-mix(in srgb, var(--app-nav-text, #fff) 74%, transparent); display: inline-flex; font-size: .76rem; gap: .4rem; margin-left: auto; }
.auth-main { align-items: center; display: flex; min-height: calc(100vh - 58px); padding: clamp(1rem, 3vw, 2.5rem) !important; }
.auth-brand-page { background: var(--app-surface, #fff); border: 1px solid color-mix(in srgb, var(--app-border, #d9e3eb) 88%, transparent); border-radius: 8px; box-shadow: 0 24px 70px rgba(19, 39, 58, .14); display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr); margin: 0 auto; max-width: 1160px; min-height: min(650px, calc(100vh - 108px)); overflow: hidden; width: 100%; }
.auth-client-intro { background: var(--app-nav, #173f52); color: var(--app-nav-text, #fff); display: flex; flex-direction: column; min-width: 0; padding: clamp(1.75rem, 3vw, 3.2rem); position: relative; }
.auth-client-intro::after { border-bottom: 1px solid color-mix(in srgb, var(--app-nav-text, #fff) 8%, transparent); border-right: 1px solid color-mix(in srgb, var(--app-nav-text, #fff) 8%, transparent); bottom: 0; content: ""; height: 44%; pointer-events: none; position: absolute; right: 0; width: 38%; }
.auth-client-identity { align-items: center; display: flex; gap: .85rem; position: relative; z-index: 1; }
.auth-client-identity > span { display: grid; gap: .08rem; min-width: 0; }
.auth-client-identity small { color: color-mix(in srgb, var(--app-nav-text, #fff) 62%, transparent); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.auth-client-identity strong { color: var(--app-nav-text, #fff); font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-client-logo { align-items: center; background: #fff; border: 1px solid color-mix(in srgb, var(--app-nav-text, #fff) 28%, transparent); border-radius: 7px; color: var(--app-primary, #176b87); display: flex; flex: 0 0 auto; height: 52px; justify-content: center; overflow: hidden; width: 56px; }
.auth-client-logo img { height: 100%; object-fit: contain; padding: 5px; width: 100%; }
.auth-client-logo i { font-size: 1.55rem; }
.auth-brand-message { margin: clamp(1.7rem, 4vh, 3.2rem) 0 1.45rem; max-width: 600px; position: relative; z-index: 1; }
.auth-brand-message .eyebrow { align-items: center; color: color-mix(in srgb, var(--app-nav-text, #fff) 68%, transparent); display: flex; font-size: .7rem; gap: .5rem; letter-spacing: .08em; text-transform: uppercase; }
.auth-brand-message .eyebrow i { color: var(--app-accent, #d77a35); font-size: .95rem; }
.auth-client-intro h1 { color: var(--app-nav-text, #fff); font-size: clamp(2rem, 3.6vw, 3.05rem); font-weight: 650; letter-spacing: 0; line-height: 1.07; margin: .65rem 0 .9rem; }
.auth-client-intro p { color: color-mix(in srgb, var(--app-nav-text, #fff) 74%, transparent); font-size: .96rem; line-height: 1.7; margin: 0; max-width: 560px; }
.auth-capability-map { display: grid; gap: 1px; margin-top: auto; max-width: 610px; position: relative; z-index: 1; }
.auth-capability-track { align-items: center; background: color-mix(in srgb, var(--app-nav-text, #fff) 6%, transparent); border-left: 2px solid color-mix(in srgb, var(--app-accent, #d77a35) 75%, transparent); display: grid; gap: .8rem; grid-template-columns: 34px minmax(0, 1fr) 24px; min-height: 52px; padding: .45rem .85rem; }
.auth-capability-track > span { align-items: center; color: var(--app-nav-text, #fff); display: flex; font-size: 1rem; height: 34px; justify-content: center; }
.auth-capability-track > div { display: grid; gap: .08rem; }
.auth-capability-track strong { color: var(--app-nav-text, #fff); font-size: .78rem; }
.auth-capability-track small { color: color-mix(in srgb, var(--app-nav-text, #fff) 60%, transparent); font-size: .7rem; }
.auth-capability-track b { color: color-mix(in srgb, var(--app-nav-text, #fff) 30%, transparent); font-size: .65rem; font-weight: 600; }
.auth-brand-credit { align-items: center; color: color-mix(in srgb, var(--app-nav-text, #fff) 60%, transparent); display: flex; flex-wrap: wrap; font-size: .68rem; gap: .55rem 1.25rem; margin-top: .9rem; position: relative; z-index: 1; }
.auth-brand-credit strong { color: color-mix(in srgb, var(--app-nav-text, #fff) 86%, transparent); }
.auth-login-panel { align-items: center; background: var(--app-surface, #fff); display: flex; justify-content: center; padding: clamp(2rem, 5vw, 4.75rem); }
.auth-login-card { max-width: 390px; width: 100%; }
.auth-login-heading { align-items: center; display: flex; gap: .8rem; margin-bottom: .9rem; }
.auth-login-heading > span { align-items: center; background: color-mix(in srgb, var(--app-primary, #176b87) 10%, var(--app-surface, #fff)); border: 1px solid color-mix(in srgb, var(--app-primary, #176b87) 16%, var(--app-border, #d9e3eb)); border-radius: 7px; color: var(--app-primary, #176b87); display: flex; height: 44px; justify-content: center; width: 44px; }
.auth-login-heading .eyebrow { color: var(--app-primary, #176b87); font-size: .67rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.auth-login-heading h2 { color: var(--app-text, #1f3447); font-size: 1.55rem; letter-spacing: 0; margin: .1rem 0 0; }
.auth-login-lead { color: color-mix(in srgb, var(--app-text, #1f3447) 64%, transparent); font-size: .84rem; line-height: 1.55; margin-bottom: 1.8rem; }
.auth-login-form { display: grid; gap: 1.15rem; }
.auth-input-group { display: grid; gap: .42rem; }
.auth-input-group .form-label { font-size: .75rem; margin: 0; }
.auth-input-control { align-items: center; display: flex; position: relative; }
.auth-input-control > i { color: color-mix(in srgb, var(--app-text, #1f3447) 52%, transparent); font-size: .92rem; left: .9rem; pointer-events: none; position: absolute; z-index: 2; }
.auth-input-control .form-control { background: color-mix(in srgb, var(--app-surface, #fff) 92%, var(--app-page, #f4f7fa)); border: 1px solid var(--app-border, #d9e3eb); border-radius: 7px; min-height: 48px; padding-left: 2.65rem; }
.auth-input-control .form-control:focus { background: var(--app-surface, #fff); }
.auth-input-control button { align-items: center; background: transparent; border: 0; color: color-mix(in srgb, var(--app-text, #1f3447) 55%, transparent); display: flex; height: 38px; justify-content: center; padding: 0; position: absolute; right: .45rem; width: 38px; z-index: 3; }
.auth-input-control button:hover,.auth-input-control button:focus { color: var(--app-primary, #176b87); }
.auth-input-control button + * { margin: 0; }
.auth-input-control:has(button) .form-control { padding-right: 2.8rem; }
.auth-login-submit { align-items: center; border-radius: 7px; display: flex; font-weight: 700; justify-content: space-between; min-height: 48px; padding-left: 1rem; padding-right: 1rem; }
.auth-login-error { align-items: flex-start; display: flex; font-size: .78rem; gap: .55rem; margin-bottom: 1rem; }
.auth-security-note { align-items: center; border-bottom: 1px solid var(--app-border, #d9e3eb); border-top: 1px solid var(--app-border, #d9e3eb); color: color-mix(in srgb, var(--app-text, #1f3447) 58%, transparent); display: flex; gap: .7rem; margin-top: 1.6rem; padding: .9rem 0; }
.auth-security-note > i { color: var(--app-primary, #176b87); }
.auth-security-note > span { display: grid; gap: .05rem; }
.auth-security-note strong { color: var(--app-text, #1f3447); font-size: .7rem; }
.auth-security-note small { font-size: .65rem; line-height: 1.35; }
.auth-development-access { color: color-mix(in srgb, var(--app-text, #1f3447) 56%, transparent); font-size: .68rem; margin-top: 1rem; }
.auth-development-access summary { cursor: pointer; width: max-content; }
.auth-development-access p { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0 0; }
.auth-development-access code { background: color-mix(in srgb, var(--app-page, #f4f7fa) 80%, var(--app-surface, #fff)); border: 1px solid var(--app-border, #d9e3eb); border-radius: 4px; color: var(--app-text, #1f3447); padding: .25rem .4rem; }
body[data-theme-mode="dark"] .auth-login-panel,body[data-theme-mode="dark"] .auth-brand-page { background: var(--app-surface, #162033); }
body[data-theme-mode="dark"] .auth-input-control .form-control { background: color-mix(in srgb, var(--app-surface, #162033) 88%, #000); }
@media (max-width: 900px) { .auth-brand-page { grid-template-columns: minmax(0, 1fr) minmax(350px, .92fr); } .auth-client-intro { padding: 2rem; } .auth-client-intro h1 { font-size: 2.3rem; } }
@media (max-width: 760px) { .auth-main { align-items: flex-start; padding: .75rem !important; } .auth-brand-page { grid-template-columns: 1fr; min-height: 0; } .auth-client-intro { padding: 1.35rem; } .auth-brand-message { margin: 1.75rem 0 1.25rem; } .auth-client-intro h1 { font-size: 1.8rem; } .auth-client-intro p { font-size: .82rem; } .auth-capability-map { display: none; } .auth-brand-credit { margin-top: 1.5rem; } .auth-login-panel { padding: 1.6rem 1.35rem 1.8rem; } }
@media (max-width: 440px) { .auth-navbar-status { font-size: 0; } .auth-navbar-status i { font-size: .9rem; } .auth-client-intro h1 br { display: none; } }
.btn-primary { background-color: var(--app-primary, #176b87); border-color: var(--app-primary, #176b87); }
.btn-primary:hover,.btn-primary:focus { background-color: var(--app-nav, #153b52); border-color: var(--app-nav, #153b52); }
.btn-outline-primary { border-color: var(--app-primary, #176b87); color: var(--app-primary, #176b87); }
.btn-outline-primary:hover { background-color: var(--app-primary, #176b87); border-color: var(--app-primary, #176b87); }
.form-control,.form-select { border-color: var(--app-border, #d9e3eb); border-radius: 6px; color: var(--app-text, #1f3447); min-height: 38px; }
.form-control,.form-select { background-color: var(--app-form-background, #fff); color: var(--app-form-text, var(--app-text, #1f3447)); font-size: var(--app-form-font-size, 14px); padding: calc(var(--app-form-padding, 10px) * .65) var(--app-form-padding, 10px); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }.form-label { color: var(--app-form-text, var(--app-text, #1f3447)); }
body[data-form-style="notebook"] .form-control,body[data-form-style="notebook"] .form-select,.theme-preview[data-form-style="notebook"] .form-control,.theme-preview[data-form-style="notebook"] .form-select { background-color: transparent; border-radius: 0; border-width: 0 0 2px; box-shadow: none; padding-left: 0; padding-right: 0; }body[data-form-style="rounded"] .form-control,body[data-form-style="rounded"] .form-select,.theme-preview[data-form-style="rounded"] .form-control,.theme-preview[data-form-style="rounded"] .form-select { border-radius: 11px; }body[data-form-style="square"] .form-control,body[data-form-style="square"] .form-select,.theme-preview[data-form-style="square"] .form-control,.theme-preview[data-form-style="square"] .form-select { border-radius: 0; }body[data-form-style="soft"] .form-control,body[data-form-style="soft"] .form-select,.theme-preview[data-form-style="soft"] .form-control,.theme-preview[data-form-style="soft"] .form-select { background-color: color-mix(in srgb, var(--app-primary, #176b87) 7%, var(--app-form-background, #fff)); border-color: transparent; border-radius: 8px; }body[data-form-style="elevated"] .form-control,body[data-form-style="elevated"] .form-select,.theme-preview[data-form-style="elevated"] .form-control,.theme-preview[data-form-style="elevated"] .form-select { border-radius: 5px; box-shadow: 0 2px 6px rgba(28,54,74,.12); }body[data-form-style="animated"] .form-control,body[data-form-style="animated"] .form-select,.theme-preview[data-form-style="animated"] .form-control,.theme-preview[data-form-style="animated"] .form-select { border-radius: 7px; }body[data-form-style="animated"] .form-control:focus,body[data-form-style="animated"] .form-select:focus,.theme-preview[data-form-style="animated"] .form-control:focus,.theme-preview[data-form-style="animated"] .form-select:focus { transform: translateY(-1px); }
.form-control:focus,.form-select:focus { border-color: var(--app-primary, #176b87); box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--app-primary, #176b87) 18%, transparent); }
body[data-form-style="notebook"] select:not([multiple]),.theme-preview[data-form-style="notebook"] select:not([multiple]) { -webkit-appearance: none; appearance: none; background-color: transparent !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.25 6 8l4-3.75' fill='none' stroke='%235b6c7d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E") !important; background-position: right .15rem center !important; background-repeat: no-repeat !important; background-size: 12px 12px !important; border: 0 !important; border-bottom: 2px solid var(--app-border, #d9e3eb) !important; border-radius: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 1.45rem !important; }body[data-form-style="notebook"] select:not([multiple]):focus,.theme-preview[data-form-style="notebook"] select:not([multiple]):focus { border-bottom-color: var(--app-primary, #176b87) !important; box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary, #176b87) 18%, transparent) !important; }
body[data-form-style="notebook"] .searchable-select-control,body[data-form-style="notebook"] .role-tags-control { background: transparent !important; border: 0 !important; border-bottom: 2px solid var(--app-border, #d9e3eb) !important; border-radius: 0 !important; box-shadow: none !important; color: var(--app-form-text, var(--app-text, #1f3447)) !important; min-height: 38px; padding: calc(var(--app-form-padding, 10px) * .65) 0 !important; }body[data-form-style="notebook"] .searchable-select-control:hover,body[data-form-style="notebook"] .searchable-select-control:focus,body[data-form-style="notebook"] .role-tags-control:focus-within { border-bottom-color: var(--app-primary, #176b87) !important; box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary, #176b87) 18%, transparent) !important; outline: 0; }body[data-form-style="notebook"] .searchable-select-control .lookup-caret { color: var(--app-primary, #176b87); font-size: 1rem; }
body[data-form-style="notebook"] .lookup-control { background: transparent !important; border: 0 !important; border-bottom: 2px solid var(--app-border, #d9e3eb) !important; border-radius: 0 !important; box-shadow: none !important; color: var(--app-form-text, var(--app-text, #1f3447)) !important; min-height: 38px; padding: calc(var(--app-form-padding, 10px) * .65) 0 !important; }body[data-form-style="notebook"] .lookup-control:hover,body[data-form-style="notebook"] .lookup-control:focus { border-bottom-color: var(--app-primary, #176b87) !important; box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary, #176b87) 18%, transparent) !important; outline: 0; }body[data-form-style="notebook"] .lookup-control .lookup-caret { color: var(--app-primary, #176b87); }
.form-label { color: color-mix(in srgb, var(--app-text, #1f3447) 82%, #fff); font-size: .82rem; font-weight: 650; }
.table { --bs-table-color: var(--app-text, #1f3447); --bs-table-bg: var(--app-surface, #fff); --bs-table-border-color: var(--app-border, #d9e3eb); }
.table thead th { background: color-mix(in srgb, var(--app-page, #f4f7fa) 72%, #fff); color: var(--app-text, #1f3447); font-size: .76rem; letter-spacing: 0; text-transform: uppercase; }
.card,.config-panel,.dashboard-section,.workspace-search-head,.workspace-search-results { border-color: var(--app-border, #d9e3eb); border-radius: 7px; box-shadow: 0 1px 2px rgba(20,47,68,.04); }
.card,.config-panel,.dashboard-section { background: var(--app-surface, #fff); }
a { color: var(--app-primary, #176b87); }
.nav-pills .nav-link.active,.pagination .page-item.active .page-link { background-color: var(--app-primary, #176b87); border-color: var(--app-primary, #176b87); }
body[data-theme-mode="dark"] { color-scheme: dark; }
body[data-theme-mode="dark"] .form-control,body[data-theme-mode="dark"] .form-select,body[data-theme-mode="dark"] .input-group-text { background-color: var(--app-surface, #162033); color: var(--app-text, #e6edf7); }
body[data-theme-mode="dark"] .form-control::placeholder { color: color-mix(in srgb, var(--app-text, #e6edf7) 55%, transparent); }
body[data-theme-mode="dark"] .card,body[data-theme-mode="dark"] .config-panel,body[data-theme-mode="dark"] .dashboard-section,body[data-theme-mode="dark"] .workspace-search-head,body[data-theme-mode="dark"] .workspace-search-results,body[data-theme-mode="dark"] .dropdown-menu,body[data-theme-mode="dark"] .modal-content,body[data-theme-mode="dark"] .table { background-color: var(--app-surface, #162033); color: var(--app-text, #e6edf7); }
body[data-theme-mode="dark"] .table thead th,body[data-theme-mode="dark"] .workspace-search-module-group > header { background: color-mix(in srgb, var(--app-surface, #162033) 80%, #000); color: var(--app-text, #e6edf7); }
body[data-theme-mode="dark"] .dropdown-item,body[data-theme-mode="dark"] .text-muted,body[data-theme-mode="dark"] .form-text { color: color-mix(in srgb, var(--app-text, #e6edf7) 70%, transparent) !important; }
body[data-theme-mode="dark"] .dropdown-item:hover,body[data-theme-mode="dark"] .table-hover > tbody > tr:hover > * { background-color: color-mix(in srgb, var(--app-primary, #68a9ff) 14%, var(--app-surface, #162033)); color: var(--app-text, #e6edf7); }
body[data-theme-mode="dark"] .theme-studio-section,body[data-theme-mode="dark"] .theme-studio-footer,body[data-theme-mode="dark"] .theme-palette-card,body[data-theme-mode="dark"] .theme-color-grid label,body[data-theme-mode="dark"] .theme-preview-body > div,body[data-theme-mode="dark"] .theme-preview-body aside { background: var(--app-surface, #162033); }

.theme-studio { margin: 0 auto; max-width: 1120px; }
.theme-studio-head { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 22px; }
.theme-studio-head h1 { color: var(--app-text, #1f3447); font-size: 1.7rem; margin: 3px 0 6px; }
.theme-studio-head p { color: #697b8f; margin: 0; }
.theme-studio-section { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); margin-bottom: 14px; padding: 18px; }
.theme-studio-section-head h2 { font-size: 1rem; margin: 0 0 3px; }.theme-studio-section-head p { color: #718198; font-size: .82rem; margin: 0 0 14px; }
.theme-palette-grid { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.theme-palette-card { border: 1px solid var(--app-border, #d9e3eb); cursor: pointer; display: grid; gap: 5px; min-height: 112px; padding: 10px; position: relative; }.theme-palette-card input { position: absolute; opacity: 0; }.theme-palette-card.is-selected { border-color: var(--app-primary, #176b87); box-shadow: inset 0 0 0 1px var(--app-primary, #176b87); }.theme-palette-card strong { font-size: .84rem; }.theme-palette-card small { color: #718198; font-size: .72rem; }.theme-palette-swatch { display: flex; height: 38px; overflow: hidden; }.theme-palette-swatch i { flex: 1; }
.theme-palette-pager { align-items: center; display: flex; gap: 10px; justify-content: center; margin-top: 14px; }.theme-palette-pager span { color: #718198; font-size: .78rem; min-width: 90px; text-align: center; }.theme-palette-pager .btn:disabled { cursor: not-allowed; opacity: .48; }
.form-style-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }.form-style-card { border: 1px solid var(--app-border, #d9e3eb); cursor: pointer; display: grid; gap: 6px; min-height: 142px; padding: 10px; position: relative; }.form-style-card input { opacity: 0; position: absolute; }.form-style-card.is-selected { border-color: var(--app-primary, #176b87); box-shadow: inset 0 0 0 1px var(--app-primary, #176b87); }.form-style-card strong { color: var(--app-text, #1f3447); font-size: .82rem; }.form-style-card strong i { color: var(--app-primary, #176b87); margin-right: 4px; }.form-style-card small { color: #718198; font-size: .71rem; line-height: 1.35; }.form-style-sample { align-items: end; background: color-mix(in srgb, var(--app-page, #f4f7fa) 70%, #fff); display: flex; gap: 7px; height: 41px; padding: 7px; }.form-style-sample i,.form-style-sample b { background: var(--app-form-background, #fff); border: 1px solid var(--app-border, #d9e3eb); display: block; height: 24px; width: 100%; }.form-style-sample-rounded i,.form-style-sample-rounded b { border-radius: 10px; }.form-style-sample-square i,.form-style-sample-square b { border-radius: 0; }.form-style-sample-notebook i,.form-style-sample-notebook b { background: transparent; border-width: 0 0 2px; border-color: var(--app-primary, #176b87); }.form-style-sample-soft i,.form-style-sample-soft b { background: color-mix(in srgb, var(--app-primary, #176b87) 8%, var(--app-form-background, #fff)); border-color: transparent; border-radius: 7px; }.form-style-sample-elevated i,.form-style-sample-elevated b { border-radius: 5px; box-shadow: 0 3px 7px rgba(28,54,74,.16); }.form-style-sample-animated i,.form-style-sample-animated b { border-radius: 6px; transition: transform .2s ease; }.form-style-sample-animated b { border-color: var(--app-primary, #176b87); transform: translateY(-3px); }.form-appearance-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }.form-appearance-grid > label { border: 1px solid var(--app-border, #d9e3eb); display: grid; gap: 7px; padding: 9px; }.form-appearance-grid > label > span { color: var(--app-text, #1f3447); font-size: .76rem; font-weight: 650; }.form-appearance-grid > label > div { align-items: center; display: flex; gap: 8px; }.form-appearance-grid input[type="range"] { flex: 1; }.form-appearance-grid input[type="color"] { border: 0; height: 28px; padding: 0; width: 30px; }.form-appearance-grid code,.form-appearance-grid output { color: #738398; font-size: .72rem; min-width: 62px; }
.theme-color-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }.theme-color-grid label { align-items: center; border: 1px solid var(--app-border, #d9e3eb); display: grid; gap: 7px; grid-template-columns: minmax(0,1fr) 30px; padding: 7px 8px; }.theme-color-grid label span { font-size: .76rem; font-weight: 650; }.theme-color-grid input { border: 0; height: 28px; padding: 0; width: 30px; }.theme-color-grid code { color: #738398; font-size: .68rem; grid-column: 1 / -1; }
.theme-preview { border: 1px solid var(--app-border, #d9e3eb); margin-bottom: 14px; overflow: hidden; }.theme-preview-nav { align-items: center; background: var(--app-nav, #153b52); color: #fff; display: flex; gap: 18px; min-height: 44px; padding: 0 14px; }.theme-preview-nav strong { margin-right: auto; }.theme-preview-nav span { font-size: .78rem; opacity: .86; }.theme-preview-body { background: var(--app-page, #f4f7fa); display: grid; gap: 14px; grid-template-columns: minmax(0,1fr) 220px; padding: 16px; }.theme-preview-body > div,.theme-preview-body aside { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); padding: 14px; }.theme-preview-body small { color: #718198; display: block; }.theme-preview-body h3 { font-size: 1rem; margin: 3px 0 5px; }.theme-preview-body p { color: #66798d; font-size: .82rem; }.theme-preview-fields { display: grid; gap: 8px; grid-template-columns: minmax(0,1fr) 130px 120px; }.theme-preview-body aside { display: grid; align-content: start; gap: 6px; }.theme-preview-body aside span { font-size: .84rem; }.theme-studio-footer { align-items: center; background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); display: flex; font-size: .82rem; justify-content: space-between; padding: 12px 14px; }
.theme-preview { background: var(--app-page, #f4f7fa); color: var(--app-text, #1f3447); }.theme-preview-nav { color: var(--app-nav-text, #fff); }.theme-preview-shell { display: grid; grid-template-columns: 162px minmax(0,1fr); min-height: 300px; }.theme-preview-rail { background: color-mix(in srgb, var(--app-nav, #153b52) 94%, #000); color: rgba(255,255,255,.82); display: grid; align-content: start; gap: 5px; padding: 14px 9px; }.theme-preview-rail small { color: rgba(255,255,255,.48); font-size: .62rem; font-weight: 700; padding: 0 7px 5px; }.theme-preview-rail span { display: flex; font-size: .76rem; gap: 8px; padding: 7px; }.theme-preview-rail span.is-active { background: color-mix(in srgb, var(--app-primary, #176b87) 54%, transparent); color: #fff; }.theme-preview-avatar { align-items: center; background: var(--app-accent, #d77a35); border-radius: 50%; display: inline-flex; font-size: .65rem !important; height: 23px; justify-content: center; width: 23px; }.theme-preview-body { background: var(--app-page, #f4f7fa); display: grid; gap: 12px; grid-template-columns: 1fr; padding: 15px; }.theme-preview-title,.theme-preview-grid article,.theme-preview-table { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); }.theme-preview-title { align-items: start; display: flex; justify-content: space-between; padding: 12px; }.theme-preview-title small,.theme-preview-title span,.theme-preview-grid small { color: color-mix(in srgb, var(--app-text, #1f3447) 58%, transparent); font-size: .72rem; }.theme-preview-title h3 { font-size: 1.05rem; margin: 2px 0; }.theme-preview-fields { display: grid; gap: 8px; grid-template-columns: minmax(0,1fr) 130px 90px; }.theme-preview-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0,1fr)); }.theme-preview-grid article { display: grid; gap: 4px; padding: 10px; }.theme-preview-grid strong { font-size: .8rem; }.theme-preview-table > div { align-items: center; border-bottom: 1px solid var(--app-border, #d9e3eb); display: flex; font-size: .78rem; justify-content: space-between; padding: 9px 10px; }.theme-preview-table button { background: none; border: 0; color: var(--app-primary, #176b87); font-size: .72rem; }.theme-preview-table > span { border-bottom: 1px solid var(--app-border, #d9e3eb); display: grid; font-size: .75rem; gap: 5px; grid-template-columns: 48px minmax(0,1fr) auto; padding: 9px 10px; }.theme-preview-table > span:last-child { border-bottom: 0; }.theme-preview-table b { color: var(--app-primary, #176b87); font-size: .68rem; }.theme-preview-table small { color: color-mix(in srgb, var(--app-text, #1f3447) 55%, transparent); }.theme-preview[data-theme-mode="dark"] .theme-preview-title,.theme-preview[data-theme-mode="dark"] .theme-preview-grid article,.theme-preview[data-theme-mode="dark"] .theme-preview-table,.theme-preview[data-theme-mode="dark"] .form-control,.theme-preview[data-theme-mode="dark"] .form-select { background: var(--app-surface, #162033); color: var(--app-text, #e6edf7); }.theme-preview[data-theme-mode="dark"] .theme-preview-rail { background: color-mix(in srgb, var(--app-nav, #111827) 92%, #000); }

.navbar-workspace-search {
    flex: 0 0 38px;
    position: relative;
    margin-right: 16px;
    max-width: 38px;
    width: 38px;
}
.navbar-workspace-search-trigger { align-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff; display: flex; font-size: .92rem; height: 38px; justify-content: center; padding: 0; width: 38px; }
.navbar-workspace-search-panel { background: #fff; border: 1px solid #cbd8e6; box-shadow: 0 16px 40px rgba(18,42,68,.24); color: #243b56; padding: 14px; position: absolute; right: 0; top: calc(100% + 8px); width: min(720px, calc(100vw - 28px)); z-index: 1150; }
.navbar-search-panel-head { align-items: center; display: flex; font-size: .9rem; justify-content: space-between; margin-bottom: 11px; }
.navbar-search-panel-actions { display: inline-flex; gap: 5px; }
.navbar-search-panel-head button { background: transparent; border: 0; color: #62748a; padding: 2px 4px; }
.navbar-search-panel-head button:hover { color: #1e65a2; }
.navbar-search-configuration { max-height: min(65vh, 620px); overflow: auto; }
.navbar-search-configuration .search-field-layout-builder { margin-bottom: 7px; }
.navbar-search-config-footer { align-items: center; border-top: 1px solid #dfe7f0; display: flex; font-size: .76rem; justify-content: space-between; margin: 12px -14px -14px; min-height: 52px; padding: 9px 14px; position: sticky; bottom: 0; background: #fff; }
.quick-search-lookup-modes { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-search-lookup-modes label { align-items: center; background: #f6f9fc; border: 1px solid #dce6f0; color: #425c76; display: grid; font-size: .75rem; gap: 7px; grid-template-columns: minmax(0, 1fr) 116px; padding: 6px 8px; }
.navbar-search-main-row { display: grid; gap: 8px; grid-template-columns: 1fr 1.1fr .8fr; }
.navbar-search-input { align-items: center; border: 1px solid #9eafc3; display: flex; min-height: 33px; }
.navbar-search-input-wide { margin-top: 8px; width: 100%; }
.navbar-search-input > i { color: #4777a6; margin-left: 10px; }
.navbar-search-input input,.navbar-search-input select { background: #fff; border: 0; font-size: .86rem; min-width: 0; outline: 0; padding: 6px 9px; width: 100%; }
.navbar-search-input .role-tags { flex: 1 1 auto; min-width: 0; }
.navbar-search-input .role-tags-control { background: transparent; border: 0; min-height: 31px; padding: 4px 7px; }
.navbar-search-criteria .role-tags,.workspace-search-criteria .role-tags { margin-top: 3px; min-width: 0; width: 100%; }
.navbar-search-criteria .role-tags-control,.workspace-search-criteria .role-tags-control { min-height: 36px; }
.navbar-search-input button { align-self: stretch; background: #0d6efd; border: 0; color: #fff; min-width: 36px; }
.navbar-search-more { margin-top: 8px; }
.navbar-search-more > button { background: transparent; border: 0; color: #386590; font-size: .76rem; padding: 0; }
.navbar-search-more-fields { align-items: end; background: #f4f8fc; display: flex; gap: 10px; margin-top: 8px; padding: 9px; }
.navbar-search-more-fields label { color: #52647a; font-size: .72rem; font-weight: 700; min-width: 270px; }
.navbar-search-more-fields select { margin-top: 3px; }
.navbar-search-criteria,.workspace-search-criteria { display: grid; gap: 9px; width: 100%; }
.navbar-search-criteria.criteria-cols-1,.workspace-search-criteria.criteria-cols-1 { grid-template-columns: 1fr; }
.navbar-search-criteria.criteria-cols-2,.workspace-search-criteria.criteria-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.navbar-search-criteria.criteria-cols-3,.workspace-search-criteria.criteria-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.navbar-search-criteria label,.workspace-search-criteria label { color: #52647a; font-size: .72rem; font-weight: 700; min-width: 0; }
.navbar-search-criteria .form-control,.navbar-search-criteria .form-select,.workspace-search-criteria .form-control,.workspace-search-criteria .form-select { margin-top: 3px; }
.search-criteria-hint { color: #718198; font-size: .78rem; padding: 4px 0; }
.search-field-layout-builder { background: #f6f9fc; border: 1px solid #dbe5ef; padding: 9px; }
.search-field-builder-add { display: flex; gap: 7px; margin-bottom: 9px; }
.search-field-builder-add .form-select { min-width: 0; }
.search-field-layout-canvas { display: grid; gap: 6px; }
.search-field-layout-builder.is-criteria .search-field-layout-canvas.criteria-cols-1 { grid-template-columns: 1fr; }
.search-field-layout-builder.is-criteria .search-field-layout-canvas.criteria-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search-field-layout-builder.is-criteria .search-field-layout-canvas.criteria-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.search-field-layout-card { align-items: center; background: #fff; border: 1px solid #d7e2ed; display: flex; gap: 7px; min-height: 35px; padding: 5px 6px; }
.search-field-layout-card strong { color: #314b66; flex: 1; font-size: .76rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-field-layout-order { align-items: center; background: #e4eef8; color: #3f668b; display: inline-flex; font-size: .66rem; font-weight: 700; height: 20px; justify-content: center; width: 20px; }
.search-field-layout-tools { display: inline-flex; gap: 1px; opacity: .45; }
.search-field-layout-card:hover .search-field-layout-tools { opacity: 1; }
.search-field-layout-tools button { background: transparent; border: 0; color: #54718c; padding: 1px 3px; }
.search-field-layout-tools button:last-child { color: #b64c50; }
.search-field-layout-empty { border: 1px dashed #cbd8e5; color: #78889b; font-size: .76rem; padding: 13px; text-align: center; }
.search-layout-switch { display: inline-flex; border: 1px solid #cfdae6; }
.search-layout-switch button { align-items: center; background: #fff; border: 0; border-right: 1px solid #cfdae6; color: #5d7287; display: inline-flex; font-size: .76rem; gap: 5px; min-height: 31px; padding: 0 10px; }
.search-layout-switch button:last-child { border-right: 0; }
.search-layout-switch button.is-active { background: #e8f2fc; color: #23649e; }
.navbar-search-results { border-top: 1px solid #e1e8f0; margin: 13px -14px -14px; max-height: min(62vh, 570px); overflow: auto; padding: 12px 14px 14px; }
.navbar-search-hint { align-items: center; color: #64758a; display: flex; font-size: .8rem; gap: 8px; min-height: 44px; }

/* Global Form Style refinements. */
.form-control,.form-select { border-style: var(--app-form-border-style, solid); padding: calc(var(--app-form-padding, 10px) * .65) var(--app-form-padding, 10px); }
.searchable-select-control,.lookup-control,.role-tags-control { border-style: var(--app-form-border-style, solid); padding: calc(var(--app-form-padding, 10px) * .65) var(--app-form-padding, 10px); }
body[data-form-style="notebook"] .form-control,body[data-form-style="notebook"] .form-select { padding: calc(var(--app-form-padding, 10px) * .65) 0; }body[data-form-style="notebook"] select:not([multiple]) { border-bottom-style: var(--app-form-border-style, solid) !important; }body[data-form-style="notebook"] .searchable-select-control,body[data-form-style="notebook"] .lookup-control,body[data-form-style="notebook"] .role-tags-control { border-bottom-style: var(--app-form-border-style, solid) !important; padding: calc(var(--app-form-padding, 10px) * .65) 0 !important; }
.form-appearance-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }.form-border-style { gap: 0 !important; }.form-border-style label { border: 1px solid var(--app-border, #d9e3eb); color: #65768a; cursor: pointer; flex: 1; font-size: .72rem; padding: 6px 7px; text-align: center; }.form-border-style label + label { border-left: 0; }.form-border-style label.is-selected { background: color-mix(in srgb, var(--app-primary, #176b87) 10%, transparent); border-color: var(--app-primary, #176b87); color: var(--app-primary, #176b87); font-weight: 700; }.form-border-style input { opacity: 0; position: absolute; }
.form-appearance-option { border: 1px solid var(--app-border, #d9e3eb); display: grid; gap: 7px; padding: 9px; }.form-appearance-option > span { color: var(--app-text, #1f3447); font-size: .76rem; font-weight: 650; }

@media (max-width: 820px) { .form-appearance-grid { grid-template-columns: 1fr; } }
.workspace-search-results-compact { border: 0; padding: 0; }
.workspace-search-results-compact .workspace-search-module-group { margin-bottom: 10px; }
.workspace-search-results-compact .workspace-search-module-group > header { min-height: 39px; padding: 0 10px; }
.workspace-search-results-compact .workspace-search-module-group td,.workspace-search-results-compact .workspace-search-module-group th { font-size: .78rem; padding: .45rem .55rem; }
.workspace-search-results-compact .workspace-search-empty { min-height: 125px; }

.workspace-search-page { margin: 0 auto; max-width: 1180px; }
.workspace-search-head { background: #fff; border: 1px solid #dbe4ef; padding: 28px; }
.workspace-search-head h1 { color: #1e3550; font-size: 1.65rem; margin: 2px 0 6px; }
.workspace-search-head > div > p { color: #617188; margin: 0 0 22px; }
.workspace-search-form { max-width: 980px; }
.workspace-search-main-row { display: grid; gap: 9px; grid-template-columns: 190px 220px 145px; }
.workspace-search-input-wide { margin-top: 9px; }
.workspace-search-input { align-items: center; border: 1px solid #9eafc3; display: flex; min-height: 43px; }
.workspace-search-input > i { color: #4777a6; margin-left: 13px; }
.workspace-search-input input,.workspace-search-input select { border: 0; min-width: 0; outline: 0; padding: 8px 11px; width: 100%; }
.workspace-search-input button { align-self: stretch; background: #0d6efd; border: 0; color: #fff; min-width: 44px; }
.workspace-search-more { margin-top: 10px; }
.workspace-search-more > button { background: transparent; border: 0; color: #39658f; font-size: .8rem; padding: 0; }
.workspace-search-more-fields { align-items: end; background: #f4f8fc; display: flex; gap: 10px; margin-top: 9px; padding: 10px; }
.workspace-search-more-fields label { color: #52647a; font-size: .75rem; font-weight: 700; min-width: 190px; }
.workspace-search-more-fields select { margin-top: 3px; }
.workspace-search-results { background: #fff; border: 1px solid #dbe4ef; border-top: 0; padding: 20px; }
.workspace-search-results-head { align-items: baseline; color: #26415f; display: flex; gap: 7px; margin-bottom: 15px; }
.workspace-search-results-head span { color: #75859a; font-size: .85rem; }
.workspace-search-module-group { border: 1px solid #dfe7f0; margin-bottom: 14px; overflow: hidden; }
.workspace-search-module-group > header { align-items: center; background: #f5f8fc; color: #25415f; display: flex; gap: 9px; min-height: 48px; padding: 0 13px; }
.workspace-search-module-group > header small { color: #728198; margin-left: auto; }
.workspace-search-module-icon { align-items: center; background: #e2eefb; color: #2263a4; display: inline-flex; height: 27px; justify-content: center; width: 27px; }
.workspace-search-module-group td,.workspace-search-module-group th { font-size: .84rem; }
.workspace-search-empty { align-items: center; color: #728198; display: flex; flex-direction: column; min-height: 220px; justify-content: center; text-align: center; }
.workspace-search-empty i { color: #9fb2c7; font-size: 2rem; margin-bottom: 10px; }
.workspace-search-empty strong { color: #3b526c; }

@media (max-width: 820px) {
    .navbar-workspace-search { max-width: 38px; margin: 8px 0; order: 3; width: 38px; }
    .navbar-workspace-search-panel { position: fixed; left: 14px; right: 14px; top: 66px; width: auto; }
    .navbar-search-main-row { grid-template-columns: 1fr; }
    .navbar-search-more-fields { display: grid; grid-template-columns: 1fr; }
    .navbar-search-criteria.criteria-cols-2,.navbar-search-criteria.criteria-cols-3,.workspace-search-criteria.criteria-cols-2,.workspace-search-criteria.criteria-cols-3 { grid-template-columns: 1fr; }
    .search-field-layout-builder.is-criteria .search-field-layout-canvas.criteria-cols-2,.search-field-layout-builder.is-criteria .search-field-layout-canvas.criteria-cols-3 { grid-template-columns: 1fr; }
    .quick-search-lookup-modes { grid-template-columns: 1fr; }
    .workspace-search-main-row { grid-template-columns: 1fr; }
    .workspace-search-more-fields { display: grid; grid-template-columns: 1fr; }
    .workspace-search-more-fields.d-none { display: none; }
}
.field-rules-launch .is-configured{background:#e8f3ff;border-color:#1677c8;color:#0b5d9e}.field-rules-modal{position:fixed;inset:0;z-index:1085}.field-rules-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}.field-rules-dialog{position:relative;margin:3vh auto;background:var(--bs-body-bg,#fff);width:min(1180px,94vw);height:94vh;display:flex;flex-direction:column;border-radius:8px;box-shadow:0 24px 70px rgba(0,0,0,.3);overflow:hidden}.field-rules-dialog>header,.field-rules-dialog>footer{padding:14px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--bs-border-color,#ddd)}.field-rules-dialog>footer{border-top:1px solid var(--bs-border-color,#ddd);border-bottom:0;justify-content:flex-end;gap:10px}.field-rules-dialog h3{font-size:1.1rem;margin:2px 0 0}.field-rules-toolbar{padding:12px 18px;display:flex;gap:12px;align-items:center;background:var(--bs-tertiary-bg,#f5f7fa)}.field-rules-list{padding:16px;overflow:auto;flex:1}.field-rule-card{border:1px solid var(--bs-border-color,#d9dee5);border-radius:7px;margin-bottom:14px;padding:12px}.field-rule-card>header{display:grid;grid-template-columns:220px 1fr 36px;gap:8px;margin-bottom:10px}.field-condition-group{border-left:4px solid #3b82f6;background:rgba(59,130,246,.045);padding:10px;margin:8px 0}.field-condition-group.depth-1{border-color:#10b981}.field-condition-group.depth-2{border-color:#f59e0b}.field-condition-group.depth-3{border-color:#ef4444}.field-condition-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.field-condition-head strong{margin-right:auto}.field-condition-head select{width:auto}.field-condition-row{display:grid;grid-template-columns:minmax(150px,1.2fr) minmax(130px,1fr) 130px minmax(150px,1fr) 36px;gap:8px;margin:8px 0}.field-rule-token{display:flex;align-items:center;height:31px;padding:0 10px;background:var(--bs-secondary-bg,#eee);border-radius:4px}@media(max-width:800px){.field-rules-dialog{margin:0;width:100vw;height:100vh;border-radius:0}.field-condition-row,.field-rule-card>header{grid-template-columns:1fr}.field-rules-toolbar{align-items:flex-start;flex-direction:column}}
.field-rule-action-config{display:grid;grid-template-columns:auto minmax(150px,220px) minmax(180px,1fr);gap:10px;align-items:end;padding:10px;margin-bottom:10px;background:var(--bs-tertiary-bg,#f5f7fa);border:1px solid var(--bs-border-color,#d9dee5);border-radius:6px}.field-rule-action-config>strong{align-self:center}.field-rule-action-config label{display:grid;gap:4px;font-size:.78rem}.field-rule-action-config:has([data-style-preset]){grid-template-columns:auto repeat(5,minmax(105px,1fr))}.field-rule-action-config .form-control-color{width:100%;height:31px;padding:3px}.field-rule-readonly input[name],.field-rule-readonly select[name],.field-rule-readonly textarea[name],.field-rule-readonly [data-lookup-toggle]{pointer-events:none;cursor:not-allowed;opacity:.76}.field-rule-style-active{--rule-bg:#fff7d6;--rule-color:#6b4f00;--rule-border-color:#e0a800;--rule-border-style:solid;--rule-font-weight:600;padding:10px;border:2px var(--rule-border-style) var(--rule-border-color);border-radius:6px;background:var(--rule-bg);color:var(--rule-color);font-weight:var(--rule-font-weight)}.field-rule-style-danger{--rule-bg:#fff0f1;--rule-color:#8a1420;--rule-border-color:#dc3545}.field-rule-style-success{--rule-bg:#eaf8ef;--rule-color:#176b38;--rule-border-color:#2f9e5b}.field-rule-style-info{--rule-bg:#eaf5ff;--rule-color:#11547c;--rule-border-color:#3b82a8}.field-rule-style-custom{--rule-bg:#fff7d6;--rule-color:#24364b;--rule-border-color:#e0a800}.field-rule-style-active .form-label{color:var(--rule-color);font-weight:var(--rule-font-weight)}.field-rule-active-message{margin-top:6px;font-size:.78rem;color:var(--rule-color,currentColor)}@media(max-width:900px){.field-rule-action-config,.field-rule-action-config:has([data-style-preset]){grid-template-columns:1fr 1fr}.field-rule-action-config>strong{grid-column:1/-1}}
.field-rule-style-active{padding:10px!important;border:2px var(--rule-border-style) var(--rule-border-color)!important;background:var(--rule-bg)!important;color:var(--rule-color)!important;font-weight:var(--rule-font-weight)!important}

/* Keep the visual designer usable in narrow desktop and tablet windows. */
@media (max-width: 991.98px) {
    .view-designer-dialog {
        height: calc(100dvh - 8px);
        left: 4px;
        max-width: calc(100vw - 8px);
        right: 4px;
        top: 4px;
    }

    .view-designer-header {
        padding: 9px 11px;
    }

    .view-designer-settings {
        align-items: end;
        display: grid;
        gap: 7px;
        grid-template-columns: minmax(180px, 1fr) minmax(105px, .55fr);
        padding: 8px 10px;
    }

    .view-designer-workbench {
        display: grid;
        grid-template-columns: 190px minmax(0, 1fr);
        min-height: 0;
    }

    .view-field-palette {
        border-bottom: 0;
        border-right: 1px solid #dfe6f0;
        max-height: none;
        min-height: 0;
        overflow: auto;
    }

    .view-designer-toolhead,
    .view-palette-list {
        padding: 9px;
    }

    .view-canvas-shell {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
    }

    .view-designer-actions {
        align-items: center;
        flex: 0 0 auto;
        flex-direction: row;
        max-height: 110px;
        min-height: 72px;
        overflow: auto;
        padding: 8px 10px;
    }

    .view-designer-action-buttons {
        justify-content: flex-end;
        margin-left: auto;
    }

    .record-title-builder {
        grid-template-columns: auto minmax(140px, 1fr) minmax(145px, 180px) auto;
        padding: 5px 7px;
    }

    .designer-pinned-summary {
        padding: 8px 10px;
    }

    .designer-pinned-summary-head {
        margin-bottom: 5px;
    }

    .designer-tabs-menu {
        padding: 7px 10px 0;
    }

    .view-record-preview,
    .view-record-preview.is-main-only {
        display: grid;
        flex: 1 1 auto;
        grid-template-columns: minmax(640px, 1fr) 280px;
        min-height: 0;
        min-width: 0;
        overflow: auto;
        padding: 10px;
    }

    .view-record-preview.is-main-only {
        grid-template-columns: minmax(640px, 1fr);
    }

    .view-canvas {
        min-height: 100%;
        overflow: visible;
    }

    .view-designer-inspector {
        border-left: 1px solid #dfe6f0;
        border-top: 0;
        max-height: none;
    }
}

@media (max-width: 520px) {
    .view-designer-workbench {
        grid-template-columns: 155px minmax(0, 1fr);
    }

    .view-designer-settings {
        grid-template-columns: 1fr;
        max-height: 190px;
        overflow: auto;
    }

    .view-designer-checks {
        justify-content: flex-start;
    }
}
/* Configurable navigation and mega menu */
.app-primary-menu .nav-link { display: flex; align-items: center; gap: 7px; }
.app-primary-menu button.nav-link { background: transparent; border: 0; }
.primary-menu-divider { width: 1px; margin: 10px 8px; background: color-mix(in srgb, var(--app-nav-text) 28%, transparent); }
.app-mega-dropdown { position: static; }
.app-mega-menu { left: 16px !important; right: 16px !important; width: auto; max-height: min(72vh, 640px); padding: 0; overflow: auto; border-color: var(--app-border); border-radius: 8px; }
.app-mega-menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface)); }
.app-mega-menu-head small { color: var(--bs-secondary-color); }
.app-mega-menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; padding: 12px; }
.app-mega-column { min-width: 0; padding: 8px 12px 14px; border-right: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent); }
.app-mega-column:last-child { border-right: 0; }
.app-mega-column h6 { margin: 0 0 8px; color: var(--app-text); font-size: .78rem; text-transform: uppercase; }
.mega-menu-link { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 6px 8px; color: var(--app-text); text-decoration: none; border-radius: 5px; }
.mega-menu-link:hover, .mega-menu-link:focus { color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 9%, transparent); }
.mega-menu-link i { width: 18px; color: var(--app-primary); text-align: center; }
.mega-subgroup { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--app-border); }
.mega-subgroup > strong { display: block; margin-bottom: 4px; font-size: .76rem; color: var(--bs-secondary-color); }

/* Menu management */
.menu-manager-page { max-width: 1680px; margin: 0 auto; }
.menu-manager-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.menu-manager-heading h1 { margin: 0 0 4px; font-size: 1.65rem; }
.menu-manager-heading p { margin: 0; color: var(--bs-secondary-color); }
.menu-location-tabs { margin-bottom: 16px; }
.menu-manager-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 470px); gap: 20px; align-items: start; }
.menu-manager-list { min-width: 0; }
.menu-manager-tree { display: grid; gap: 7px; }
.menu-manager-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; min-height: 58px; margin-left: calc(var(--menu-depth) * 26px); padding: 9px 10px; border: 1px solid var(--app-border); border-left: 3px solid color-mix(in srgb, var(--app-primary) 75%, var(--app-border)); background: var(--app-surface); border-radius: 6px; }
.menu-manager-row.is-inactive { opacity: .62; }
.menu-manager-row-main { display: flex; align-items: center; min-width: 0; gap: 10px; }
.menu-manager-row-main > span:last-child { min-width: 0; }
.menu-manager-row-main strong, .menu-manager-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-manager-row-main small { margin-top: 2px; color: var(--bs-secondary-color); }
.menu-manager-kind { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 9%, var(--app-surface)); border-radius: 5px; }
.menu-manager-meta { display: flex; gap: 10px; color: var(--bs-secondary-color); font-size: .76rem; }
.menu-manager-actions { display: flex; align-items: center; gap: 2px; opacity: .55; transition: opacity .15s ease; }
.menu-manager-row:hover .menu-manager-actions, .menu-manager-row:focus-within .menu-manager-actions { opacity: 1; }
.menu-manager-actions form { margin: 0; }
.menu-manager-actions a.icon-btn { text-decoration: none; }
.menu-manager-editor { position: sticky; top: 18px; padding: 0; overflow: visible; }
.menu-manager-editor.is-attention { animation: menu-editor-attention .8s ease; }
@keyframes menu-editor-attention { 0%, 100% { box-shadow: none; } 35% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--app-primary) 24%, transparent); } }
.menu-manager-editor form { padding: 16px; }
.menu-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--app-border); }
.menu-editor-footer { display: flex; justify-content: flex-end; margin: 18px -16px -16px; padding: 13px 16px; border-top: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-page) 65%, var(--app-surface)); }

@media (max-width: 991.98px) {
    .app-mega-dropdown { position: relative; }
    .app-mega-menu { position: static !important; margin: 4px 0 8px; max-height: 55vh; transform: none !important; }
    .app-mega-menu-grid { grid-template-columns: 1fr; }
    .app-mega-column { border-right: 0; border-bottom: 1px solid var(--app-border); }
    .menu-manager-grid { grid-template-columns: 1fr; }
    .menu-manager-editor { position: static; }
}

@media (max-width: 680px) {
    .menu-manager-heading { align-items: stretch; flex-direction: column; }
    .menu-manager-row { grid-template-columns: minmax(0, 1fr) auto; margin-left: calc(var(--menu-depth) * 12px); }
    .menu-manager-meta { display: none; }
}

/* Viewport-safe menus and report filter controls */
.app-navbar .profile-menu-button + .dropdown-menu {
    left: auto !important;
    max-height: calc(100vh - 76px);
    max-width: calc(100vw - 20px);
    min-width: min(290px, calc(100vw - 20px));
    overflow: auto;
    right: 0 !important;
    transform: none !important;
}

.searchable-select-menu,
.role-tags-menu {
    max-width: calc(100vw - 20px);
}

.report-settings-body.has-open-select-menu {
    overflow: visible !important;
}

.report-filter-config-row {
    grid-template-columns: minmax(170px, 1fr) minmax(210px, 290px) auto;
}

.report-filter-control-mode label {
    color: var(--app-text, #334155);
    display: grid;
    font-size: .72rem;
    font-weight: 700;
    gap: 3px;
}

.report-filter-control-mode.is-readonly .form-control {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #176b87) 6%, var(--app-surface, #fff));
    color: var(--app-muted, #64748b);
    display: flex;
    font-weight: 600;
}

.report-runtime-lookup {
    position: relative;
}

.report-runtime-lookup-control {
    align-items: center;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #ced4da);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 38px;
    padding: 4px 7px;
}

.report-runtime-lookup-control:focus-within {
    border-color: var(--app-primary, #0d6efd);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--app-primary, #0d6efd) 18%, transparent);
}

.report-runtime-lookup-control input {
    background: transparent;
    border: 0;
    color: var(--app-text, #1f3447);
    flex: 1 1 150px;
    min-width: 110px;
    outline: 0;
}

.report-runtime-lookup-chips {
    display: contents;
}

.report-runtime-lookup-chips > span {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #0d6efd) 10%, var(--app-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--app-primary, #0d6efd) 28%, var(--app-border, #ced4da));
    color: var(--app-text, #1f3447);
    display: inline-flex;
    font-size: .77rem;
    gap: 2px;
    padding: 3px 3px 3px 7px;
}

.report-runtime-lookup-chips button {
    background: transparent;
    border: 0;
    color: inherit;
    line-height: 1;
    padding: 0 2px;
}

.report-runtime-lookup-results {
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #ced4da);
    box-shadow: 0 14px 35px color-mix(in srgb, var(--app-text, #1f3447) 16%, transparent);
    left: 0;
    max-height: 260px;
    overflow: auto;
    padding: 5px;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 5200;
}

.report-runtime-lookup-results button {
    background: transparent;
    border: 0;
    color: var(--app-text, #1f3447);
    display: block;
    padding: 7px 8px;
    text-align: left;
    width: 100%;
}

.report-runtime-lookup-results button:hover {
    background: color-mix(in srgb, var(--app-primary, #0d6efd) 10%, var(--app-surface, #fff));
}

/* Dashboard surfaces follow the active Theme Studio palette. */
.dashboard-command-header,
.dashboard-space-tabs a,
.dashboard-ai-command,
.dashboard-ai-response,
.dashboard-focus,
.dashboard-widget,
.dashboard-next-actions,
.dashboard-calendar,
.dashboard-lens-switcher,
.dashboard-lens-panel,
.dashboard-attention-board,
.dashboard-flow-lane,
.dashboard-flow-card,
.dashboard-list-row,
.dashboard-timeline-event,
.dashboard-calendar-day-detail,
.focus-item {
    background: var(--app-surface, #fff);
    border-color: var(--app-border, #d9e3eb);
    color: var(--app-text, #1f3447);
}

.dashboard-command-header {
    border-bottom-color: var(--app-border, #d9e3eb);
}

.dashboard-command-title p,
.dashboard-ai-answer p,
.dashboard-widget small,
.dashboard-list-row small,
.dashboard-timeline-event small,
.dashboard-calendar-day small {
    color: color-mix(in srgb, var(--app-text, #1f3447) 62%, transparent);
}

.dashboard-space-tabs a.active,
.dashboard-lens-switcher button.active {
    background: var(--app-primary, #0f766e);
    border-color: var(--app-primary, #0f766e);
    color: var(--app-primary-contrast, #fff);
}

.dashboard-lens-switcher button,
.dashboard-lens-switcher button span,
.dashboard-lens-switcher button small {
    color: var(--app-text, #1f3447);
}

.dashboard-lens-switcher button:hover {
    background: color-mix(in srgb, var(--app-primary, #0f766e) 7%, var(--app-surface, #fff));
    border-color: var(--app-border, #d9e3eb);
}

.dashboard-lens-switcher button.active > i,
.dashboard-lens-switcher button.active span,
.dashboard-lens-switcher button.active small {
    color: var(--app-primary-contrast, #fff);
}

.dashboard-space-tabs a.active small {
    background: color-mix(in srgb, var(--app-primary-contrast, #fff) 16%, transparent);
    color: var(--app-primary-contrast, #fff);
}

.dashboard-space-tabs small,
.dashboard-metrics-strip > div,
.dashboard-calendar-day,
.dashboard-report-table thead th,
.dashboard-table thead th {
    background: color-mix(in srgb, var(--app-page, #f4f7fa) 72%, var(--app-surface, #fff));
    border-color: var(--app-border, #d9e3eb);
    color: var(--app-text, #1f3447);
}

.dashboard-ai-brief {
    background: var(--app-nav, #102a43);
    border-color: color-mix(in srgb, var(--app-nav-text, #fff) 20%, var(--app-nav, #102a43));
    color: var(--app-nav-text, #fff);
}

.dashboard-ai-mark {
    background: var(--app-accent, #2dd4bf);
    color: var(--app-accent-contrast, #fff);
}

.dashboard-ai-brief .eyebrow {
    color: color-mix(in srgb, var(--app-nav-text, #fff) 82%, transparent);
}

.dashboard-ai-brief h2,
.dashboard-ai-brief strong {
    color: var(--app-nav-text, #fff);
}

.dashboard-ai-brief small,
.dashboard-ai-risk span {
    color: color-mix(in srgb, var(--app-nav-text, #fff) 76%, transparent);
}

.dashboard-ai-risk div {
    background: color-mix(in srgb, var(--app-nav-text, #fff) 24%, transparent);
}

.dashboard-ai-risk i {
    background: var(--app-accent, #f59e0b);
}

.dashboard-ai-command > i,
.dashboard-widget a,
.dashboard-section-head a {
    color: var(--app-primary, #0f766e);
}

.dashboard-ai-command input {
    background: transparent;
    color: var(--app-text, #1f3447);
}

.report-output-pie-svg.is-doughnut circle {
    fill: var(--app-surface, #fff);
}

.dashboard-report-chart-pie {
    border-color: var(--app-border, #d9e3eb);
}

.dashboard-report-chart-pie.is-doughnut::after {
    background: var(--app-surface, #fff);
}

.focus-item:hover,
.dashboard-list-row:hover,
.dashboard-report-chart-link:hover > div {
    background: color-mix(in srgb, var(--app-primary, #0d6efd) 9%, var(--app-surface, #fff));
    color: var(--app-primary, #0d6efd);
}

.focus-score {
    background: var(--app-primary, #0d6efd);
    color: var(--app-primary-contrast, #fff);
}

@media (max-width: 760px) {
    .report-filter-config-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .report-filter-control-mode {
        grid-column: 1 / -1;
    }
}
.document-workflow-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.document-workflow-rules {
    display: grid;
    gap: .75rem;
}

.document-workflow-rule {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    padding: .85rem;
    border-radius: 6px;
}

.document-workflow-rule-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .65rem;
}

/* Work management */
.work-center { max-width: 1680px; margin: 0 auto; color: var(--app-text); }
.work-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1rem; }
.work-hero h1 { font-size: 1.65rem; margin: .15rem 0 .25rem; letter-spacing: 0; }
.work-hero p { margin: 0; color: color-mix(in srgb, var(--app-text) 68%, transparent); }
.work-hero-actions { display: flex; gap: .55rem; }
.work-table small, .work-user-settings td small { display: block; color: color-mix(in srgb, var(--app-text) 62%, transparent); }
.timer-pulse { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 5px rgb(220 38 38 / 12%); animation: work-pulse 1.5s infinite; }
@keyframes work-pulse { 50% { box-shadow: 0 0 0 9px rgb(220 38 38 / 2%); } }
.work-timer-clock { font: 700 1.15rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.work-toolbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--app-surface); border: 1px solid var(--app-border); padding: .6rem; border-radius: 6px; box-shadow: 0 5px 18px rgb(15 23 42 / 5%); }
.work-view-tabs { display: flex; gap: .2rem; }
.work-view-tabs a { display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; color: var(--app-text); text-decoration: none; border-radius: 4px; font-size: .86rem; white-space: nowrap; }
.work-view-tabs a:hover { background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface)); }
.work-view-tabs a.active { background: var(--app-primary); color: var(--app-primary-contrast); }
.work-filters { display: grid; grid-template-columns: repeat(3, minmax(125px, 1fr)) auto; gap: .4rem; min-width: min(100%, 620px); }
.work-filter-search { position: relative; }
.work-filter-search { grid-column: 1 / 4; grid-row: 2; }
.work-filters > button { grid-column: 4; grid-row: 2; }
.work-filter-search i { position: absolute; z-index: 2; left: .7rem; top: 50%; transform: translateY(-50%); color: #64748b; pointer-events: none; }
body[data-form-style] .work-filter-search input { padding-left: 2.15rem; }
.work-record-picker { position: relative; }
.work-record-search { position: relative; }
.work-record-search > i { position: absolute; z-index: 2; left: .75rem; top: 50%; transform: translateY(-50%); color: color-mix(in srgb, var(--app-text) 48%, transparent); }
.work-record-search input { padding-left: 2.15rem; }
.work-record-results { position: absolute; z-index: 1085; top: calc(100% - 1.25rem); left: 0; right: 0; max-height: 260px; overflow-y: auto; padding: .3rem; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-surface); box-shadow: 0 12px 30px rgb(15 23 42 / 16%); }
.work-record-results button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; width: 100%; padding: .6rem .65rem; border: 0; border-radius: 4px; color: var(--app-text); background: transparent; text-align: left; }
.work-record-results button:hover, .work-record-results button:focus { background: color-mix(in srgb, var(--app-primary) 8%, var(--app-surface)); outline: none; }
.work-record-results button > i { color: var(--app-primary); }
.work-record-results button > small { color: color-mix(in srgb, var(--app-text) 48%, transparent); }
.work-record-loading, .work-record-empty { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 64px; padding: .75rem; color: color-mix(in srgb, var(--app-text) 60%, transparent); font-size: .8rem; }
.work-record-selected { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .45rem; padding: .55rem .65rem; border: 1px solid color-mix(in srgb, var(--app-primary) 30%, var(--app-border)); border-radius: 5px; background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface)); }
.work-record-selected span { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.work-record-selected span i { color: var(--app-primary); }
.work-record-selected strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.work-record-selected button { flex: 0 0 auto; border: 0; color: color-mix(in srgb, var(--app-text) 55%, transparent); background: transparent; }
.work-fixed-record-context { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid var(--app-border); border-radius: 5px; background: color-mix(in srgb, var(--app-page) 52%, var(--app-surface)); }
.work-fixed-record-context > i { color: var(--app-primary); font-size: 1.05rem; }
.work-fixed-record-context small, .work-fixed-record-context strong { display: block; }
.work-fixed-record-context small { color: color-mix(in srgb, var(--app-text) 56%, transparent); font-size: .7rem; }
.work-fixed-record-context strong { font-size: .84rem; }
.work-custom-dates { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; padding: .45rem; border: 1px solid var(--app-border); border-radius: 4px; background: color-mix(in srgb, var(--app-page) 52%, var(--app-surface)); }
.work-custom-dates label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .45rem; margin: 0; }
.work-custom-dates label span { color: color-mix(in srgb, var(--app-text) 66%, transparent); font-size: .72rem; font-weight: 650; }
.work-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin: .8rem 0; }
.work-kpis a { display: flex; align-items: center; gap: .75rem; min-height: 76px; padding: .85rem 1rem; color: var(--app-text); text-decoration: none; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 6px; }
.work-kpis a:hover { border-color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface)); }
.work-kpis i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 11%, var(--app-surface)); }
.work-kpis strong { display: block; font-size: 1.3rem; }
.work-kpis small { color: color-mix(in srgb, var(--app-text) 66%, transparent); }
.work-panel, .work-group { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 6px; overflow: hidden; }
.work-panel-head, .work-group > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-page) 58%, var(--app-surface)); }
.work-panel-head h2 { font-size: 1rem; margin: 0; }
.work-panel-head p { font-size: .82rem; margin: .15rem 0 0; color: color-mix(in srgb, var(--app-text) 62%, transparent); }
.work-panel-head > span { font-size: .76rem; color: color-mix(in srgb, var(--app-text) 60%, transparent); }
.work-table { font-size: .84rem; }
.work-table thead th { position: sticky; top: 0; z-index: 2; white-space: nowrap; padding: .65rem .75rem; color: color-mix(in srgb, var(--app-text) 72%, transparent); background: color-mix(in srgb, var(--app-page) 68%, var(--app-surface)); border-bottom-color: var(--app-border); }
.work-table td { padding: .65rem .75rem; border-color: color-mix(in srgb, var(--app-border) 72%, transparent); }
.work-table td:first-child { min-width: 220px; }
.work-table td:nth-child(2) { min-width: 160px; }
.work-table a { color: var(--app-primary); text-decoration: none; }
.work-overdue { color: #b91c1c !important; font-weight: 600; }
.work-status, .work-priority { display: inline-flex; align-items: center; min-height: 24px; padding: .2rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 650; white-space: nowrap; background: #e8eef4; color: #334155; }
.work-status.status-completed { background: #dcfce7; color: #166534; }
.work-status.status-in_progress { background: #dbeafe; color: #1d4ed8; }
.work-status.status-blocked, .work-status.status-overdue { background: #fee2e2; color: #991b1b; }
.work-priority.priority-urgent { background: #fee2e2; color: #991b1b; }
.work-priority.priority-high { background: #ffedd5; color: #9a3412; }
.work-empty { display: grid; place-items: center; gap: .35rem; min-height: 140px; color: color-mix(in srgb, var(--app-text) 56%, transparent); text-align: center; }
.work-empty i { font-size: 1.5rem; color: var(--app-primary); }
.work-groups { display: grid; gap: .8rem; }
.work-group > header > div:first-child { display: flex; align-items: center; gap: .65rem; }
.work-group-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--app-primary) 12%, var(--app-surface)); color: var(--app-primary); }
.work-group header small { display: block; color: color-mix(in srgb, var(--app-text) 60%, transparent); }
.work-group-stats { display: flex; gap: .45rem; }
.work-group-stats span { padding: .3rem .5rem; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 4px; font-size: .75rem; }
.work-aging-table th, .work-aging-table td { padding: .75rem; text-align: center; vertical-align: middle; border-color: var(--app-border); }
.work-aging-table th:first-child { text-align: left; min-width: 170px; }
.work-aging-table button { min-width: 42px; padding: .32rem .55rem; border: 1px solid color-mix(in srgb, var(--app-primary) 30%, var(--app-border)); border-radius: 4px; color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 8%, var(--app-surface)); font-weight: 700; }
.work-aging-table button:hover { color: var(--app-primary-contrast); background: var(--app-primary); }
.work-time-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-bottom: .8rem; }
.work-time-summary > div { display: flex; align-items: center; gap: .8rem; padding: 1rem; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 6px; }
.work-time-summary i { font-size: 1.25rem; color: var(--app-primary); }
.work-time-summary strong, .work-time-summary small { display: block; }
.work-time-summary strong { font-size: 1.3rem; }
.work-loading { display: flex; justify-content: center; align-items: center; gap: .5rem; min-height: 180px; }
.work-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.work-settings-grid section, .work-user-settings { padding: 1rem; border: 1px solid var(--app-border); border-radius: 6px; }
.work-settings-grid h3, .work-user-settings h3 { margin: 0 0 .8rem; font-size: .95rem; }
.work-settings-grid h4 { margin: 1rem 0 .45rem; font-size: .8rem; }
.work-bucket-row { display: grid; grid-template-columns: 1.3fr .65fr .65fr auto; gap: .4rem; margin-bottom: .4rem; }
.work-task-types > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin-bottom: .4rem; }
.work-user-settings { margin-top: 1rem; }
.work-user-settings > div:first-child { display: flex; justify-content: space-between; }
.work-user-settings p { color: color-mix(in srgb, var(--app-text) 62%, transparent); font-size: .82rem; }
.record-time-billing { overflow: hidden; border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-surface); }
.record-time-billing > header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-page) 56%, var(--app-surface)); }
.record-time-billing > header > div { display: flex; align-items: center; gap: .5rem; }
.record-time-billing > header i { color: var(--app-primary); }
.record-time-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--app-border); }
.record-time-summary span { padding: .7rem .85rem; color: color-mix(in srgb, var(--app-text) 65%, transparent); font-size: .75rem; }
.record-time-summary span + span { border-left: 1px solid var(--app-border); }
.record-time-summary b { display: block; color: var(--app-text); font-size: 1rem; }
.record-time-billing th, .record-time-billing td { padding: .55rem .7rem; border-color: var(--app-border); font-size: .78rem; }
#workSettingsModal .modal-dialog { height: calc(100vh - 2rem); margin: 1rem auto; }
#workSettingsModal .modal-content { max-height: 100%; min-height: 0; overflow: hidden; }
#workSettingsModal .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#workSettingsModal .modal-header, #workSettingsModal .modal-footer { flex: 0 0 auto; }
.global-running-timer { position: fixed; z-index: 1040; right: 18px; bottom: 18px; display: flex; align-items: stretch; max-width: min(360px, calc(100vw - 24px)); border: 1px solid color-mix(in srgb, var(--app-primary) 34%, var(--app-border)); border-radius: 6px; background: color-mix(in srgb, var(--app-surface) 96%, transparent); box-shadow: 0 12px 34px rgb(15 23 42 / 18%); backdrop-filter: blur(10px); transition: max-width .18s ease; }
.global-running-timer-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; min-width: 0; padding: .55rem .65rem .55rem .75rem; color: var(--app-text); text-decoration: none; }
.global-running-timer-copy { min-width: 0; }
.global-running-timer-copy small, .global-running-timer-copy strong, .global-running-timer-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-running-timer-copy small { color: var(--app-primary); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.global-running-timer-copy strong { font-size: .78rem; }
.global-running-timer-copy em { color: color-mix(in srgb, var(--app-text) 56%, transparent); font-size: .66rem; font-style: normal; }
.global-running-timer-main > b { font: 700 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.global-running-timer > button { display: grid; flex: 0 0 34px; width: 34px; place-items: center; border: 0; border-left: 1px solid var(--app-border); color: color-mix(in srgb, var(--app-text) 58%, transparent); background: var(--app-surface); }
.global-running-timer > button:last-child { border-radius: 0 5px 5px 0; color: #b91c1c; background: color-mix(in srgb, #dc2626 7%, var(--app-surface)); }
.global-running-timer > button:hover { color: var(--app-primary-contrast); background: var(--app-primary); }
.global-running-timer > button:last-child:hover { color: #fff; background: #dc2626; }
.global-running-timer.is-collapsed { max-width: 180px; }
.global-running-timer.is-collapsed .global-running-timer-copy { display: none; }
.global-running-timer.is-collapsed .global-running-timer-main { grid-template-columns: auto auto; }
@media (max-width: 1100px) {
    .work-toolbar { position: static; display: block; }
    .work-view-tabs { overflow-x: auto; margin-bottom: .6rem; }
    .work-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; min-width: 0; }
    .work-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .work-hero { align-items: flex-start; flex-direction: column; }
    .work-filters, .work-settings-grid { grid-template-columns: 1fr; }
    .work-filter-search, .work-filters > button, .work-custom-dates { grid-column: 1; grid-row: auto; }
    .work-custom-dates { grid-template-columns: 1fr; }
    .work-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-time-summary { grid-template-columns: 1fr; }
    .global-running-timer { right: 10px; bottom: 10px; max-width: calc(100vw - 20px); }
    .global-running-timer-main { grid-template-columns: auto minmax(0, 1fr); }
    .global-running-timer-main > b { grid-column: 2; }
}

/* Users, roles, and permissions */
.access-admin { max-width: 1560px; margin: 0 auto; color: var(--app-text); }
.access-admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.access-admin-head h1 { margin: .12rem 0 .3rem; font-size: 1.65rem; }
.access-admin-head p, .access-toolbar p { margin: 0; color: color-mix(in srgb, var(--app-text) 64%, transparent); }
.access-admin-tabs { display: flex; gap: .25rem; padding: .3rem; margin-bottom: .8rem; width: fit-content; border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-surface); }
.access-admin-tabs a { display: flex; align-items: center; gap: .45rem; min-height: 38px; padding: .45rem .8rem; border-radius: 4px; color: var(--app-text); text-decoration: none; font-size: .86rem; }
.access-admin-tabs a:hover { background: color-mix(in srgb, var(--app-primary) 6%, var(--app-surface)); }
.access-admin-tabs a.active { color: var(--app-primary-contrast); background: var(--app-primary); }
.access-admin-tabs b { min-width: 20px; padding: .08rem .35rem; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: .68rem; text-align: center; }
.access-panel { overflow: hidden; border: 1px solid var(--app-border); border-radius: 6px; background: var(--app-surface); }
.access-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; padding: .9rem 1rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-page) 46%, var(--app-surface)); }
.access-toolbar h2 { margin: 0 0 .2rem; font-size: 1rem; }
.access-toolbar p { font-size: .8rem; }
.access-filter { position: relative; display: block; min-width: 260px; }
.access-filter i { position: absolute; left: .7rem; top: 50%; z-index: 1; transform: translateY(-50%); color: color-mix(in srgb, var(--app-text) 52%, transparent); }
.access-filter input { width: 100%; min-height: 38px; padding: .4rem .65rem .4rem 2rem; border: 1px solid var(--app-border); border-radius: var(--form-radius, 4px); color: var(--app-text); background: var(--app-surface); }
.access-table { margin: 0; font-size: .84rem; }
.access-table th { padding: .65rem .8rem; white-space: nowrap; color: color-mix(in srgb, var(--app-text) 68%, transparent); background: color-mix(in srgb, var(--app-page) 60%, var(--app-surface)); border-color: var(--app-border); font-size: .74rem; text-transform: uppercase; }
.access-table td { padding: .7rem .8rem; border-color: color-mix(in srgb, var(--app-border) 72%, transparent); }
.access-user-cell { display: flex; align-items: center; gap: .65rem; min-width: 210px; }
.access-user-cell strong, .access-user-cell small { display: block; }
.access-user-cell small { color: color-mix(in srgb, var(--app-text) 58%, transparent); }
.access-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 11%, var(--app-surface)); font-weight: 750; }
.access-role-chips { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 130px; }
.access-role-chips span, .access-scope { display: inline-flex; padding: .2rem .45rem; border: 1px solid color-mix(in srgb, var(--app-primary) 18%, var(--app-border)); border-radius: 999px; background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface)); font-size: .72rem; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: .4rem; border-radius: 50%; background: #94a3b8; }
.status-dot.active { background: #16a34a; box-shadow: 0 0 0 3px rgb(22 163 74 / 10%); }
.access-row-actions, .access-role-actions { white-space: nowrap; }
.access-row-actions form, .access-role-actions form { display: inline; }
.access-row-actions .btn, .access-role-actions .btn-light { border-color: var(--app-border); }
.access-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .8rem; }
.access-role-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .9rem; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-surface); }
.access-role-card.is-inactive { opacity: .62; }
.access-role-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 5px; color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 10%, var(--app-surface)); }
.access-role-main h3 { display: inline; margin: 0 .35rem 0 0; font-size: .95rem; }
.access-role-main code { color: color-mix(in srgb, var(--app-text) 60%, transparent); font-size: .72rem; }
.access-role-main p { margin: .25rem 0 0; color: color-mix(in srgb, var(--app-text) 60%, transparent); font-size: .75rem; }
.access-role-status { align-self: start; padding: .2rem .45rem; border-radius: 999px; color: #166534; background: #dcfce7; font-size: .7rem; }
.access-role-card.is-inactive .access-role-status { color: #475569; background: #e2e8f0; }
.access-role-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: .35rem; }
.access-role-picker label { display: flex; align-items: center; gap: .6rem; margin: 0; color: color-mix(in srgb, var(--app-text) 68%, transparent); font-size: .78rem; }
.access-role-picker { min-width: 0; }
.access-role-picker select { width: 190px !important; min-width: 190px; }
.permission-sticky-tools { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-surface) 95%, transparent); backdrop-filter: blur(8px); }
.permission-sticky-tools > div { display: flex; align-items: center; gap: .4rem; }
.permission-sticky-tools span { margin-left: .55rem; color: color-mix(in srgb, var(--app-text) 58%, transparent); font-size: .76rem; }
.permission-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .8rem; background: color-mix(in srgb, var(--app-page) 52%, var(--app-surface)); }
.permission-group { overflow: hidden; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-surface); }
.permission-group header { display: flex; align-items: center; justify-content: space-between; padding: .65rem .75rem; border-bottom: 1px solid var(--app-border); }
.permission-group h3, .permission-module-matrix h3 { margin: 0; font-size: .9rem; }
.permission-group header button { border: 0; color: var(--app-primary); background: transparent; }
.permission-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: start; padding: .62rem .75rem; border-bottom: 1px solid color-mix(in srgb, var(--app-border) 62%, transparent); cursor: pointer; }
.permission-option:last-child { border-bottom: 0; }
.permission-option:hover { background: color-mix(in srgb, var(--app-primary) 4%, var(--app-surface)); }
.permission-option input { margin-top: .15rem; }
.permission-option strong, .permission-option small { display: block; }
.permission-option strong { font-size: .82rem; }
.permission-option small { margin-top: .1rem; color: color-mix(in srgb, var(--app-text) 58%, transparent); font-size: .72rem; }
.permission-module-matrix { margin: 0 .8rem .8rem; overflow: hidden; border: 1px solid var(--app-border); border-radius: 5px; }
.permission-module-matrix > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border-bottom: 1px solid var(--app-border); }
.permission-module-matrix header p { margin: .15rem 0 0; color: color-mix(in srgb, var(--app-text) 58%, transparent); font-size: .75rem; }
.permission-module-matrix table { margin: 0; font-size: .8rem; }
.permission-module-matrix th, .permission-module-matrix td { padding: .55rem .7rem; text-align: center; border-color: var(--app-border); }
.permission-module-matrix th { background: color-mix(in srgb, var(--app-page) 58%, var(--app-surface)); white-space: nowrap; }
.permission-module-matrix th:first-child, .permission-module-matrix td:first-child { min-width: 220px; text-align: left; }
.module-permission-title { display: flex; align-items: center; gap: .45rem; }
.module-permission-title i { color: var(--app-primary); }
.access-role-selector { display: flex; flex-wrap: wrap; gap: .4rem; }
.access-role-selector label { cursor: pointer; }
.access-role-selector input { position: absolute; opacity: 0; pointer-events: none; }
.access-role-selector span { display: flex; align-items: center; gap: .35rem; min-height: 34px; padding: .35rem .6rem; border: 1px solid var(--app-border); border-radius: 4px; background: var(--app-surface); font-size: .78rem; }
.access-role-selector input:checked + span { border-color: var(--app-primary); color: var(--app-primary); background: color-mix(in srgb, var(--app-primary) 8%, var(--app-surface)); box-shadow: inset 0 0 0 1px var(--app-primary); }
#accessUserModal .modal-header p, #accessRoleModal .modal-header p { margin: .15rem 0 0; color: color-mix(in srgb, var(--app-text) 60%, transparent); font-size: .78rem; }
#accessUserModal .modal-title, #accessRoleModal .modal-title { font-size: 1.05rem; }
@media (max-width: 900px) {
    .access-role-grid, .permission-feature-grid { grid-template-columns: 1fr; }
    .access-toolbar { align-items: stretch; flex-direction: column; }
    .access-filter { min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
    .access-admin-head { align-items: stretch; flex-direction: column; }
    .access-admin-tabs { width: 100%; overflow-x: auto; }
    .access-admin-tabs a { flex: 1 0 auto; justify-content: center; }
    .permission-sticky-tools { align-items: stretch; flex-direction: column; }
    .permission-sticky-tools > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
    .permission-sticky-tools .btn-primary { grid-column: 1 / -1; }
    .access-role-picker label { align-items: stretch; flex-direction: column; }
    .access-role-picker select { min-width: 0; width: 100%; }
}

.report-aging-builder {
    margin-bottom: .8rem;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
}
.report-aging-builder.is-enabled {
    border-color: color-mix(in srgb, var(--app-primary) 42%, var(--app-border));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-primary) 7%, transparent);
}
.report-aging-builder > .report-preview-head {
    margin: 0;
    padding: .72rem .8rem;
    border-bottom: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-page) 55%, var(--app-surface));
}
.report-aging-builder > .report-preview-head strong,
.report-aging-builder > .report-preview-head small,
.report-aging-range-head strong,
.report-aging-range-head small,
.report-aging-drilldown strong,
.report-aging-drilldown small {
    display: block;
}
.report-aging-builder > .report-preview-head small,
.report-aging-range-head small,
.report-aging-drilldown small {
    margin-top: .15rem;
    color: color-mix(in srgb, var(--app-text) 58%, transparent);
    font-size: .72rem;
}
.report-aging-settings { padding: .8rem; }
.report-aging-source-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: .65rem;
    align-items: end;
}
.report-aging-source-grid > label:not(.report-aging-check),
.report-aging-range label {
    display: grid;
    gap: .28rem;
    margin: 0;
    color: color-mix(in srgb, var(--app-text) 72%, transparent);
    font-size: .72rem;
    font-weight: 700;
}
.report-aging-check {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    min-height: 34px;
    margin: 0;
    font-size: .76rem;
    white-space: nowrap;
}
.report-aging-range-head,
.report-aging-drilldown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
}
.report-aging-ranges {
    display: grid;
    gap: .42rem;
    margin-top: .55rem;
}
.report-aging-range {
    display: grid;
    grid-template-columns: 26px minmax(150px, 1fr) 96px 96px auto;
    gap: .48rem;
    align-items: end;
    padding: .5rem;
    border: 1px solid color-mix(in srgb, var(--app-border) 80%, transparent);
    border-radius: 5px;
    background: color-mix(in srgb, var(--app-page) 42%, var(--app-surface));
}
.report-aging-range-grip {
    display: grid;
    width: 26px;
    min-height: 31px;
    place-items: center;
    color: color-mix(in srgb, var(--app-text) 45%, transparent);
    cursor: grab;
}
.report-aging-range-actions {
    display: flex;
    gap: .2rem;
    align-items: center;
    min-height: 31px;
}
.report-aging-range .report-mini-icon {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
}
@media (max-width: 1000px) {
    .report-aging-source-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .report-aging-source-grid { grid-template-columns: 1fr; }
    .report-aging-range { grid-template-columns: 24px minmax(0, 1fr) minmax(72px, .45fr) minmax(72px, .45fr); }
    .report-aging-range-actions { grid-column: 2 / -1; justify-content: flex-end; }
    .report-aging-range-head, .report-aging-drilldown { align-items: flex-start; flex-direction: column; }
}

/* Public scheduling and booking calendars */
.booking-admin-grid {
    display: grid;
    grid-template-columns: minmax(250px, .32fr) minmax(0, 1fr);
    gap: .9rem;
    align-items: start;
}
.booking-calendar-list {
    position: sticky;
    top: 76px;
    overflow: hidden;
}
.booking-calendar-list > .dashboard-section-head,
.booking-upcoming > .dashboard-section-head {
    margin: 0;
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--app-border);
}
.booking-calendar-list > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    padding: .75rem .85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
    color: var(--app-text);
    text-decoration: none;
}
.booking-calendar-list > a:hover,
.booking-calendar-list > a.active {
    background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface));
}
.booking-calendar-list > a.active {
    box-shadow: inset 3px 0 var(--app-primary);
}
.booking-calendar-list > a > i { color: var(--app-primary); }
.booking-calendar-list strong,
.booking-calendar-list small,
.booking-public-link small,
.booking-public-link strong,
.booking-upcoming td small {
    display: block;
}
.booking-calendar-list small,
.booking-public-link small,
.booking-upcoming td small {
    margin-top: .12rem;
    color: var(--app-muted);
    font-size: .7rem;
}
.booking-calendar-form { min-width: 0; }
.booking-hours {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 6px;
}
.booking-hours > .dashboard-section-head {
    margin: 0;
    padding: .7rem .8rem;
    background: color-mix(in srgb, var(--app-page) 60%, var(--app-surface));
}
.booking-hours-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 130px auto 130px;
    gap: .55rem;
    align-items: center;
    min-height: 48px;
    padding: .45rem .75rem;
    border-top: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
}
.booking-hours-row > span {
    color: var(--app-muted);
    font-size: .72rem;
    text-align: center;
}
.booking-public-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 25%, var(--app-border));
    border-radius: 6px;
    background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface));
}
.booking-public-link strong { overflow-wrap: anywhere; font-size: .8rem; }
.booking-public-link-copy { min-width: 0; flex: 1 1 260px; }
.booking-public-link-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
}
.booking-public-link-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .booking-public-link { align-items: stretch; flex-direction: column; }
    .booking-public-link-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.booking-upcoming { overflow: hidden; }
.booking-upcoming .table { color: var(--app-text); font-size: .8rem; }
.booking-upcoming th {
    color: var(--app-muted);
    background: color-mix(in srgb, var(--app-page) 52%, var(--app-surface));
    font-size: .7rem;
    text-transform: uppercase;
}
.booking-upcoming th,
.booking-upcoming td {
    padding: .65rem .85rem;
    border-color: var(--app-border);
}
.booking-public-page {
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background: #f3f6fa;
}
.booking-public-shell {
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(390px, 1.22fr);
    width: min(980px, calc(100% - 32px));
    min-height: 570px;
    margin: clamp(24px, 7vh, 72px) auto;
    overflow: hidden;
    border: 1px solid #dce3ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 55px rgb(31 48 78 / 12%);
}
.booking-public-intro {
    padding: clamp(28px, 5vw, 52px);
    color: #fff;
    background: #203b63;
}
.booking-public-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: clamp(34px, 6vh, 58px);
}
.booking-public-brand > span:last-child {
    display: grid;
    min-width: 0;
    gap: .08rem;
}
.booking-public-brand small {
    color: rgb(255 255 255 / 72%);
    font-size: .67rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.booking-public-brand strong {
    color: #fff;
    font-size: .94rem;
    font-weight: 760;
    line-height: 1.25;
}
.booking-public-logo {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 9px 24px rgb(7 35 43 / 20%);
}
.booking-public-logo img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}
.booking-public-logo.is-fallback {
    color: var(--booking-accent);
    background: #fff;
    font-size: 1.5rem;
}
.booking-public-brand.is-compact {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dce3ed;
}
.booking-public-brand.is-compact small { color: #728096; }
.booking-public-brand.is-compact strong { color: #172033; }
.booking-public-brand.is-compact .booking-public-logo { border-color: #dce3ed; }
.booking-public-intro .eyebrow { color: #bcd2ee; }
.booking-public-intro h1 {
    margin: .5rem 0 1rem;
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    letter-spacing: 0;
}
.booking-public-intro p {
    color: #e3ecf7;
    line-height: 1.65;
}
.booking-public-intro dl { display: grid; gap: .65rem; margin-top: 2rem; }
.booking-public-intro dl div { padding-top: .65rem; border-top: 1px solid rgb(255 255 255 / 18%); }
.booking-public-intro dt { color: #bcd2ee; font-size: .7rem; text-transform: uppercase; }
.booking-public-intro dd { margin: .15rem 0 0; }
.booking-public-picker {
    min-width: 0;
    padding: clamp(24px, 4vw, 42px);
}
.booking-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
}
.booking-slot-grid label { margin: 0; cursor: pointer; }
.booking-slot-grid input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.booking-slot-grid label span {
    display: grid;
    min-height: 42px;
    place-items: center;
    border: 1px solid #cbd6e6;
    border-radius: 5px;
    color: #244f86;
    background: #fff;
    font-size: .82rem;
    font-weight: 750;
}
.booking-slot-grid label:hover span { border-color: #5682b9; background: #f2f7fc; }
.booking-slot-grid input:checked + span {
    border-color: #244f86;
    color: #fff;
    background: #244f86;
    box-shadow: 0 0 0 3px rgb(36 79 134 / 12%);
}
.booking-confirmed {
    display: grid;
    min-height: 420px;
    place-content: center;
    justify-items: center;
    text-align: center;
}
.booking-confirmed > i { margin-bottom: .8rem; color: #16814d; font-size: 2.5rem; }
.booking-confirmed h2 { font-size: 1.5rem; }
.booking-confirmed p { color: #617086; }
.booking-reschedule-shell {
    width: min(560px, calc(100% - 32px));
    margin: clamp(24px, 8vh, 80px) auto;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid #dce3ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 55px rgb(31 48 78 / 12%);
}
.booking-reschedule-shell h1 {
    margin: .45rem 0 1rem;
    font-size: 1.7rem;
    letter-spacing: 0;
}
.booking-public-footer {
    display: flex;
    width: min(980px, calc(100% - 32px));
    margin: 12px auto 26px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #6e7c8f;
    font-size: .72rem;
}
.booking-public-shell,
.booking-reschedule-shell { margin-bottom: 0; }
.booking-public-footer span { display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 850px) {
    .booking-admin-grid,
    .booking-public-shell { grid-template-columns: 1fr; }
    .booking-calendar-list { position: static; }
    .booking-public-shell { margin: 16px auto; }
    .booking-public-intro { padding: 28px; }
    .booking-public-brand { margin-bottom: 30px; }
    .booking-public-footer { margin-top: 0; }
}
@media (max-width: 560px) {
    .booking-hours-row { grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr) auto minmax(90px, .7fr); }
    .booking-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-public-shell { width: min(100% - 16px, 980px); }
    .booking-public-picker { padding: 22px 18px; }
    .booking-public-footer { width: calc(100% - 24px); flex-direction: column; align-items: flex-start; }
}

/* Calendar operations center */
.calendar-stat-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(92px, .42fr)) minmax(270px, 1.9fr);
    gap: .55rem;
    margin-bottom: .7rem;
}
.calendar-stat-strip > div {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 58px;
    padding: .65rem .75rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    color: var(--app-text);
    background: var(--app-surface);
}
.calendar-stat-strip > div > i {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 5px;
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 9%, var(--app-surface));
}
.calendar-stat-strip span,
.calendar-stat-strip strong,
.calendar-stat-strip small { display: block; }
.calendar-stat-strip strong { font-size: 1.05rem; line-height: 1.05; }
.calendar-stat-strip small { margin-top: .12rem; color: var(--app-muted); font-size: .61rem; text-transform: uppercase; }
.calendar-stat-strip .calendar-stat-brief {
    background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface));
}
.calendar-stat-brief strong { font-size: .78rem; }
.calendar-stat-brief small { font-size: .66rem; text-transform: none; }
.dashboard-calendar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    width: 100%;
}
.dashboard-calendar-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
}
.dashboard-calendar-navigation { min-height: 38px; }
.dashboard-calendar-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.dashboard-calendar-primary-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.dashboard-calendar-controls { justify-content: flex-start; }
.dashboard-calendar-controls .calendar-add-command { margin-left: auto; }
.dashboard-calendar-controls > .calendar-filter {
    flex: 1 1 150px;
    max-width: none;
}
.dashboard-calendar-controls > .calendar-filter:first-child { max-width: none; }
.dashboard-calendar-controls .calendar-icon-switch,
.dashboard-calendar-controls .calendar-range-switch,
.dashboard-calendar-controls > .btn,
.dashboard-calendar-controls > .icon-btn { flex: 0 0 auto; }
.calendar-event.source-booking {
    color: #5b356c;
    background: #faf2fc;
    border-left-color: #a855a7;
}
.calendar-event-detail-fields {
    display: flex !important;
    flex-wrap: wrap;
    gap: .3rem .65rem;
    margin-top: .4rem;
}
.calendar-event-detail-fields em {
    color: var(--app-muted);
    font-size: .68rem;
    font-style: normal;
}
.calendar-event-detail-fields b { color: var(--app-text); font-weight: 700; }
.calendar-day-detail-event.source-booking { border-left: 3px solid #a855a7; }
.calendar-event.source-record {
    color: color-mix(in srgb, var(--calendar-source-color, #b45309) 78%, #111827);
    background: color-mix(in srgb, var(--calendar-source-color, #b45309) 10%, var(--app-surface));
    border-left-color: var(--calendar-source-color, #b45309);
}
.calendar-day-detail-event.source-record { border-left: 3px solid var(--calendar-source-color, #b45309); }
.calendar-booking-queue {
    border-top: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-page) 45%, var(--app-surface));
}
.calendar-booking-queue > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--app-border);
}
.calendar-booking-queue > header strong,
.calendar-booking-queue > header small { display: block; }
.calendar-booking-queue > header strong { font-size: .82rem; }
.calendar-booking-queue > header small { color: var(--app-muted); font-size: .68rem; }
.calendar-booking-queue > header > span {
    padding: .2rem .45rem;
    border-radius: 999px;
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 9%, var(--app-surface));
    font-size: .68rem;
    font-weight: 750;
}
.calendar-booking-queue-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
    padding: .65rem;
}
.calendar-booking-queue-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: .55rem;
    align-items: center;
    min-width: 0;
    padding: .55rem;
    border: 1px solid var(--app-border);
    border-radius: 5px;
    background: var(--app-surface);
}
.calendar-booking-queue-list time {
    display: inline-flex;
    max-width: 128px;
    align-items: center;
    gap: .35rem;
    padding: .3rem .42rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 20%, var(--app-border));
    border-radius: 5px;
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 6%, var(--app-surface));
    font-size: .66rem;
    font-weight: 750;
    line-height: 1.25;
}
.calendar-booking-queue-list time i { flex: 0 0 auto; font-size: .8rem; }
.calendar-booking-queue-list time span { white-space: normal; }
.calendar-booking-queue-list strong,
.calendar-booking-queue-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-booking-queue-list strong { font-size: .75rem; }
.calendar-booking-queue-list small { color: var(--app-muted); font-size: .64rem; }
.calendar-booking-name {
    display: block;
    overflow: hidden;
    max-width: 100%;
    padding: 0;
    border: 0;
    color: var(--app-text);
    background: transparent;
    font-size: .75rem;
    font-weight: 750;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-booking-name:hover,
.calendar-booking-name:focus-visible { color: var(--app-primary); text-decoration: underline; }
.calendar-booking-detail-modal .modal-header p { margin: .15rem 0 0; color: var(--app-muted); font-size: .72rem; }
.calendar-booking-detail-schedule {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    margin-bottom: .85rem;
    padding: .75rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 18%, var(--app-border));
    border-radius: 6px;
    background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface));
}
.calendar-booking-detail-schedule > i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 5px;
    color: var(--app-primary-contrast);
    background: var(--app-primary);
}
.calendar-booking-detail-schedule small,
.calendar-booking-detail-schedule strong { display: block; }
.calendar-booking-detail-schedule small { color: var(--app-muted); font-size: .68rem; }
.calendar-booking-detail-schedule strong { font-size: .82rem; }
.calendar-booking-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.calendar-booking-detail-grid section {
    padding: .75rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
}
.calendar-booking-detail-grid section > h3 {
    display: flex;
    gap: .4rem;
    align-items: center;
    margin: 0 0 .6rem;
    color: var(--app-text);
    font-size: .78rem;
}
.calendar-booking-detail-grid section > h3 i { color: var(--app-primary); }
.calendar-booking-detail-wide { grid-column: 1 / -1; }
.calendar-booking-detail-grid dl { display: grid; grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr); gap: .35rem .65rem; margin: 0; }
.calendar-booking-detail-grid dt { color: var(--app-muted); font-size: .68rem; font-weight: 650; }
.calendar-booking-detail-grid dd { overflow-wrap: anywhere; margin: 0; color: var(--app-text); font-size: .72rem; }
.calendar-booking-detail-grid p { margin: 0; color: var(--app-text); font-size: .73rem; white-space: pre-wrap; }
.calendar-booking-response-grid { grid-template-columns: repeat(2, minmax(90px, .42fr) minmax(0, 1fr)) !important; }
.calendar-settings-modal .modal-header p { margin: .15rem 0 0; color: var(--app-muted); font-size: .72rem; }
.calendar-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.calendar-settings-grid > section {
    padding: .75rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
}
.calendar-settings-grid > section > h3 { margin: 0 0 .6rem; font-size: .86rem; }
.calendar-setting-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.calendar-setting-checks label,
.calendar-source-settings label {
    display: flex;
    align-items: center;
    gap: .38rem;
    min-height: 32px;
    margin: 0;
    padding: .3rem .5rem;
    border: 1px solid var(--app-border);
    border-radius: 4px;
    background: color-mix(in srgb, var(--app-page) 42%, var(--app-surface));
    font-size: .72rem;
    cursor: pointer;
}
.calendar-source-settings { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.calendar-source-settings > div { display: flex; flex-wrap: wrap; gap: .35rem; align-content: start; }
.calendar-source-settings strong { flex: 0 0 100%; font-size: .72rem; }
.calendar-record-field-settings { grid-column: 1 / -1; }
.calendar-record-field-settings > p { margin: -.3rem 0 .65rem; color: var(--app-muted); font-size: .7rem; }
.calendar-record-field-settings details { border-top: 1px solid var(--app-border); }
.calendar-record-field-settings summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem .2rem;
    font-size: .76rem;
    font-weight: 750;
    cursor: pointer;
}
.calendar-record-field-settings summary small { margin-left: auto; color: var(--app-muted); font-weight: 500; }
.calendar-record-field-settings details .calendar-setting-checks { padding: 0 0 .7rem 1.3rem; }
.calendar-record-date-settings { grid-column: 1 / -1; }
.calendar-record-date-settings > .dashboard-section-head { margin: 0 0 .65rem; }
.calendar-record-date-settings > .dashboard-section-head h3 { margin: 0 0 .12rem; font-size: .86rem; }
.calendar-record-date-settings > .dashboard-section-head p { margin: 0; color: var(--app-muted); font-size: .7rem; }
.calendar-record-date-rules { display: grid; gap: .55rem; }
.calendar-record-date-rule {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--app-page) 35%, var(--app-surface));
}
.calendar-record-date-rule > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 38px;
    padding: .35rem .55rem;
    border-bottom: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-primary) 5%, var(--app-surface));
}
.calendar-record-date-rule > header > span { display: flex; align-items: center; gap: .4rem; }
.calendar-record-date-rule > header i { color: var(--app-primary); }
.calendar-record-date-rule > header strong { font-size: .76rem; }
.calendar-record-date-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.25fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(110px, .7fr) 70px;
    gap: .55rem;
    align-items: start;
    padding: .6rem;
}
.calendar-record-date-grid > label,
.calendar-date-title-builder {
    display: grid;
    gap: .28rem;
    margin: 0;
}
.calendar-record-date-grid > label > span,
.calendar-date-title-builder > span {
    color: var(--app-muted);
    font-size: .64rem;
    font-weight: 750;
    text-transform: uppercase;
}
.calendar-date-color .form-control-color { width: 100%; min-width: 52px; }
.calendar-date-title-builder { grid-column: 1 / 4; }
.calendar-date-title-builder > div:first-of-type { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; }
.calendar-date-title-fields { display: flex; flex-wrap: wrap; gap: .3rem; min-height: 30px; }
.calendar-date-title-chip {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    min-height: 28px;
    padding: .15rem .2rem .15rem .45rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 30%, var(--app-border));
    border-radius: 4px;
    background: color-mix(in srgb, var(--app-primary) 8%, var(--app-surface));
}
.calendar-date-title-chip b { margin-right: .15rem; font-size: .68rem; font-weight: 700; }
.calendar-date-title-chip button {
    display: grid;
    width: 22px;
    height: 22px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 3px;
    color: var(--app-muted);
    background: transparent;
}
.calendar-date-title-chip button:hover { color: var(--app-primary); background: var(--app-surface); }
.calendar-date-detail-fields { grid-column: 4 / 6; }
.calendar-date-detail-fields select { min-height: 92px; }

/* Booking form designer */
.booking-form-builder {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 6px;
}
.booking-form-builder > .dashboard-section-head {
    margin: 0;
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-page) 52%, var(--app-surface));
}
.booking-form-fields { display: grid; }
.booking-form-field {
    display: grid;
    grid-template-columns: 20px minmax(150px, 1.2fr) minmax(115px, .75fr) minmax(110px, .7fr) 72px minmax(210px, 1.45fr) auto auto 32px;
    gap: .4rem;
    align-items: center;
    padding: .5rem .6rem;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
}
.booking-form-field:last-child { border-bottom: 0; }
.booking-form-field > i { color: var(--app-muted); cursor: grab; }
.booking-form-field.is-dragging {
    opacity: .5;
    border: 1px dashed var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface));
}
.booking-form-field > .form-check {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0;
    font-size: .68rem;
}
.booking-layout-preview-shell {
    padding: .8rem;
    border-top: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-page) 40%, var(--app-surface));
}
.booking-layout-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .65rem;
}
.booking-layout-preview-head strong { font-size: .78rem; }
.booking-layout-preview-head small { color: var(--app-muted); font-size: .68rem; }
.booking-layout-preview {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .7rem;
    padding: .85rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
}
.booking-layout-preview-field {
    grid-column: span var(--booking-preview-span, 12);
    min-width: 0;
}
.booking-layout-preview-field.starts-row { grid-column: 1 / span var(--booking-preview-span, 12); }
.booking-question.starts-row { grid-column: 1 / span var(--booking-field-span, 12); }
.booking-layout-preview-field label {
    display: block;
    overflow: hidden;
    margin-bottom: .3rem;
    color: var(--app-text);
    font-size: .7rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.booking-layout-preview-field label b { color: var(--bs-danger); }
.booking-preview-control,
.booking-preview-check {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    padding: .4rem .55rem;
    border: 1px solid var(--app-border);
    border-radius: 5px;
    color: var(--app-muted);
    background: var(--app-input-bg, var(--app-surface));
    font-size: .7rem;
}
.booking-preview-control.is-textarea { min-height: 62px; }
.booking-public-page { --booking-accent: #244f86; }
.booking-public-intro { background: var(--booking-accent); }
.booking-slot-grid label span { color: var(--booking-accent); }
.booking-slot-grid input:checked + span,
.booking-public-page .btn-primary {
    border-color: var(--booking-accent);
    color: #fff;
    background: var(--booking-accent);
}
.booking-question-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .7rem; }
.booking-question { grid-column: span var(--booking-field-span, 12); min-width: 0; }
.booking-question-check {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 42px;
    padding: .55rem .65rem;
    border: 1px solid #dce3ed;
    border-radius: 5px;
}
.booking-share-settings {
    padding: .9rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 18%, var(--app-border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--app-primary) 3%, var(--app-surface));
}
.booking-target-settings {
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 22%, var(--app-border));
    border-radius: 7px;
    background: color-mix(in srgb, var(--app-primary) 3%, var(--app-surface));
}
.booking-target-card {
    padding: .9rem;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: var(--app-surface);
}
.booking-target-card + .booking-target-card { margin-top: .75rem; }
.booking-target-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}
.booking-target-card-head > div { display: grid; gap: .12rem; }
.booking-target-card-head small { color: var(--app-muted); font-size: .72rem; }
.booking-target-card-head.compact { margin: .6rem 0 .45rem; }
.booking-map-row {
    display: grid;
    grid-template-columns: minmax(145px, 1.05fr) minmax(110px, .7fr) 18px minmax(145px, 1fr) minmax(120px, .72fr) 34px;
    align-items: center;
    gap: .45rem;
    padding: .45rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 70%, transparent);
}
.booking-map-row:last-child { border-bottom: 0; }
.booking-map-row > i { color: var(--app-muted); text-align: center; }
.booking-map-row.is-match { grid-template-columns: minmax(160px, 1fr) 18px minmax(160px, 1fr) 34px; }
@media (max-width: 900px) {
    .booking-map-row,
    .booking-map-row.is-match { grid-template-columns: 1fr; }
    .booking-map-row > i { transform: rotate(90deg); }
}
.booking-share-settings > .dashboard-section-head > i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 6px;
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary) 10%, var(--app-surface));
}
.calendar-command-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-page) 55%, var(--app-surface));
}
.calendar-mail-warning {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .5rem 1rem;
    border-bottom: 1px solid color-mix(in srgb, #b7791f 32%, var(--app-border));
    color: color-mix(in srgb, #8a5a12 82%, var(--app-text));
    font-size: .7rem;
    background: color-mix(in srgb, #f6c453 12%, var(--app-surface));
}
.calendar-mail-warning a {
    margin-left: auto;
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
}
.calendar-command-tabs > button,
.calendar-entry-modes > button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    min-width: 0;
    padding: .65rem .75rem;
    border: 1px solid var(--app-border);
    border-radius: 7px;
    color: var(--app-text);
    text-align: left;
    background: var(--app-surface);
}
.calendar-command-tabs > button > i:first-child,
.calendar-entry-modes > button > i:first-child {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 6px;
    color: var(--app-muted);
    background: color-mix(in srgb, var(--app-page) 70%, var(--app-surface));
}
.calendar-command-tabs strong,
.calendar-command-tabs small,
.calendar-entry-modes strong,
.calendar-entry-modes small {
    display: block;
}
.calendar-command-tabs small,
.calendar-entry-modes small {
    color: var(--app-muted);
    font-size: .68rem;
    line-height: 1.3;
}
.calendar-command-tabs > button.active,
.calendar-entry-modes > button.active {
    border-color: color-mix(in srgb, var(--app-primary) 62%, var(--app-border));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary) 18%, transparent);
    background: color-mix(in srgb, var(--app-primary) 6%, var(--app-surface));
}
.calendar-command-tabs > button.active > i:first-child,
.calendar-entry-modes > button.active > i:first-child {
    color: var(--app-primary-contrast);
    background: var(--app-primary);
}
.calendar-entry-modes > button > i:last-child { visibility: hidden; color: var(--app-primary); }
.calendar-entry-modes > button.active > i:last-child { visibility: visible; }
.calendar-direct-shell {
    display: grid;
    gap: 1rem;
}
.calendar-direct-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
}
.calendar-direct-select {
    display: grid;
    gap: .35rem;
    min-width: 0;
}
.calendar-direct-select .form-label { margin: 0; }
.calendar-direct-select > * { max-width: 100%; }
.calendar-direct-calendar-note {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    min-height: 42px;
    padding: .6rem .7rem;
    border-radius: 6px;
    color: var(--app-muted);
    background: color-mix(in srgb, var(--app-page) 65%, var(--app-surface));
}
.calendar-entry-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}
.calendar-direct-section-head {
    margin-bottom: .75rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--app-border);
}
.calendar-direct-section-head strong,
.calendar-direct-section-head small { display: block; }
.calendar-direct-section-head small { color: var(--app-muted); font-size: .7rem; }
.internal-calendar-slots {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-height: 42px;
    align-items: center;
}
.internal-calendar-slots label { cursor: pointer; }
.internal-calendar-slots input { position: absolute; opacity: 0; pointer-events: none; }
.internal-calendar-slots span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: .35rem .65rem;
    border: 1px solid var(--app-border);
    border-radius: 5px;
    color: var(--app-text);
    background: var(--app-surface);
}
.internal-calendar-slots input:checked + span {
    border-color: var(--app-primary);
    color: var(--app-primary-contrast);
    background: var(--app-primary);
}
.internal-booking-fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .75rem;
}
.internal-booking-field { min-width: 0; }
.internal-booking-field.width-25 { --internal-booking-span: 3; }
.internal-booking-field.width-33 { --internal-booking-span: 4; }
.internal-booking-field.width-50 { --internal-booking-span: 6; }
.internal-booking-field.width-67 { --internal-booking-span: 8; }
.internal-booking-field.width-75 { --internal-booking-span: 9; }
.internal-booking-field.width-100 { --internal-booking-span: 12; }
.internal-booking-field[class*="width-"] { grid-column: span var(--internal-booking-span, 12); }
.internal-booking-field.starts-row { grid-column: 1 / span var(--internal-booking-span, 12); }
.internal-booking-field > span {
    display: block;
    margin-bottom: .3rem;
    font-size: .73rem;
    font-weight: 700;
}
.internal-booking-field > span b { color: var(--bs-danger); }
.internal-booking-check {
    display: flex;
    min-height: 42px;
    gap: .5rem;
    align-items: center;
    padding: .55rem .65rem;
    border: 1px solid var(--app-border);
    border-radius: 5px;
}
.calendar-meeting-people .role-tags,
.calendar-meeting-people .role-tags-control {
    width: 100%;
}
.calendar-meeting-people .role-tags-control {
    min-height: 42px;
    max-height: 42px;
    overflow: hidden;
}
.calendar-meeting-people .role-tags-control [data-role-tags-summary] {
    display: flex;
    min-width: 0;
    gap: .3rem;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
}
.calendar-meeting-people .role-tags-chip {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 1050px) {
    .calendar-stat-strip { grid-template-columns: repeat(5, minmax(80px, 1fr)); }
    .calendar-stat-brief { grid-column: 1 / -1; }
    .calendar-booking-queue-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-form-field { grid-template-columns: 20px 1fr 1fr; }
    .booking-form-field > :nth-child(4),
    .booking-form-field > :nth-child(5) { grid-column: span 1; }
}
@media (max-width: 700px) {
    .calendar-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-stat-brief { grid-column: 1 / -1; }
    .calendar-booking-queue-list,
    .calendar-settings-grid,
    .calendar-source-settings,
    .booking-question-grid { grid-template-columns: 1fr; }
    .calendar-record-field-settings,
    .calendar-record-date-settings,
    .booking-question { grid-column: 1 / -1; }
    .calendar-record-date-grid { grid-template-columns: 1fr; }
    .calendar-date-title-builder,
    .calendar-date-detail-fields { grid-column: 1; }
    .booking-form-field { grid-template-columns: 20px minmax(0, 1fr) 32px; }
    .booking-form-field > input,
    .booking-form-field > select,
    .booking-form-field > label { grid-column: 2; }
    .booking-form-field > button { grid-column: 3; grid-row: 1; }
    .dashboard-calendar-primary { align-items: flex-start; flex-direction: column; }
    .dashboard-calendar-primary-actions { width: 100%; flex-wrap: wrap; }
    .dashboard-calendar-controls .calendar-add-command { width: 100%; margin-left: 0; }
    .calendar-command-tabs,
    .calendar-entry-modes { grid-template-columns: 1fr; }
    .booking-layout-preview { grid-template-columns: 1fr; }
    .booking-layout-preview-field,
    .internal-booking-field.width-25,
    .internal-booking-field.width-33,
    .internal-booking-field.width-50,
    .internal-booking-field.width-67,
    .internal-booking-field.width-75,
    .internal-booking-field.width-100 { grid-column: 1 / -1; }
    .calendar-booking-detail-grid { grid-template-columns: 1fr; }
    .calendar-booking-detail-wide { grid-column: 1; }
    .calendar-booking-response-grid { grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr) !important; }
    .calendar-booking-detail-schedule { grid-template-columns: 38px minmax(0, 1fr); }
    .calendar-booking-detail-schedule > .badge { grid-column: 2; justify-self: start; }
}
/* Operations control center */
.operations-center{max-width:1600px;margin:0 auto;padding:1rem 1.15rem 3rem;color:var(--app-text,#243746)}
.operations-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 0 1rem}
.operations-hero h1{font-size:1.65rem;margin:.12rem 0 .25rem;letter-spacing:0}
.operations-hero p,.operations-panel-head p{margin:0;color:var(--app-muted,#657786)}
.operations-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.65rem;margin-bottom:1rem}
.operations-kpis>div{display:flex;align-items:center;gap:.7rem;padding:.78rem .85rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff);min-width:0}
.operations-kpis i{display:grid;place-items:center;width:2rem;height:2rem;border-radius:5px;background:color-mix(in srgb,var(--app-primary,#176b87) 12%,white);color:var(--app-primary,#176b87);font-size:1rem}
.operations-kpis span{display:flex;flex-direction:column;min-width:0}.operations-kpis strong{font-size:1.18rem;line-height:1}.operations-kpis small{margin-top:.25rem;color:var(--app-muted,#657786);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.operations-tabs{display:flex;align-items:center;gap:.25rem;border-bottom:1px solid var(--app-border,#dce4e8);margin-bottom:1rem;overflow-x:auto}
.operations-tabs a{display:flex;align-items:center;gap:.42rem;padding:.72rem .85rem;color:var(--app-muted,#657786);text-decoration:none;border-bottom:2px solid transparent;white-space:nowrap}
.operations-tabs a:hover,.operations-tabs a.active{color:var(--app-primary,#176b87);border-bottom-color:var(--app-primary,#176b87)}
.operations-panel{border:1px solid var(--app-border,#dce4e8);border-radius:7px;background:var(--app-surface,#fff);overflow:visible}
.operations-panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--app-border,#dce4e8)}
.operations-panel-head h2{font-size:1rem;margin:0 0 .18rem;letter-spacing:0}.operations-panel-head>i{font-size:1.5rem;color:var(--app-primary,#176b87)}
.operations-panel .table{--bs-table-bg:transparent;margin:0}.operations-panel .table th{font-size:.72rem;text-transform:uppercase;color:var(--app-muted,#657786);font-weight:700;padding:.65rem .85rem;white-space:nowrap}
.operations-panel .table td{padding:.7rem .85rem;vertical-align:middle}.operations-panel td strong,.operations-panel td small{display:block}.operations-panel td small{color:var(--app-muted,#657786);font-size:.76rem;margin-top:.15rem}
.operations-trigger{display:inline-flex;align-items:center;gap:.35rem;padding:.28rem .45rem;background:color-mix(in srgb,var(--app-primary,#176b87) 8%,transparent);border-radius:4px;white-space:nowrap}
.operations-status,.operations-run-status{display:inline-flex;align-items:center;justify-content:center;padding:.22rem .48rem;border-radius:4px;font-size:.72rem;font-weight:700;text-transform:capitalize;background:#edf1f3;color:#52626d;white-space:nowrap}
.operations-status.status-published,.operations-run-status.completed,.operations-run-status.delivered{background:#e3f4eb;color:#197047}.operations-status.status-applied{background:#e9efff;color:#3458a3}.operations-status.status-draft,.operations-status.status-proposed{background:#fff2d9;color:#8a5a00}.operations-run-status.failed{background:#fde8e8;color:#a12b2b}.operations-run-status.running,.operations-run-status.queued{background:#e6f3fb;color:#176b87}
.operations-row-actions{display:flex;justify-content:flex-end;gap:.25rem}.operations-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;padding:2.5rem;color:var(--app-muted,#657786)}.operations-empty i{font-size:1.65rem}.operations-empty strong{color:var(--app-text,#243746)}
.operations-ai-layout,.operations-two-column{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:1rem}.operations-ai-builder form{padding:1rem}.operations-ai-actions{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1rem}.operations-ai-actions span{color:var(--app-muted,#657786);font-size:.82rem}
.operations-proposals{padding:.55rem}.operations-proposals>button{display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:.7rem;border:0;border-bottom:1px solid var(--app-border,#dce4e8);background:transparent;text-align:left}.operations-proposals>button:hover{background:color-mix(in srgb,var(--app-primary,#176b87) 6%,transparent)}.operations-proposals>button strong{margin:.35rem 0 .12rem}.operations-proposals>button small{color:var(--app-muted,#657786)}
.operations-rule-section{margin-top:1rem;padding:.9rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:color-mix(in srgb,var(--app-primary,#176b87) 2%,var(--app-surface,#fff))}
.operations-schedule-panel{margin-top:1rem;padding:.9rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 30%,var(--app-border,#dce4e8));border-radius:6px;background:color-mix(in srgb,var(--app-primary,#176b87) 4%,var(--app-surface,#fff))}.operations-schedule-heading{display:flex;align-items:center;gap:.65rem;margin-bottom:.8rem}.operations-schedule-heading>span{display:grid;place-items:center;width:34px;height:34px;border-radius:5px;background:var(--app-primary,#176b87);color:#fff}.operations-schedule-heading>div{display:flex;flex-direction:column}.operations-schedule-heading small{color:var(--app-muted,#657786)}.operations-schedule-example{display:flex;align-items:center;gap:.4rem;margin-top:.75rem;padding:.5rem .6rem;border-radius:5px;background:var(--app-surface,#fff);color:var(--app-muted,#657786);font-size:.78rem}.operations-payload-builder{margin-top:1rem;padding:.85rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-payload-builder>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.7rem}.operations-payload-builder>header>div{display:flex;flex-direction:column}.operations-payload-builder>header small{color:var(--app-muted,#657786)}.operations-payload-row{display:grid;grid-template-columns:24px minmax(170px,1fr) 24px minmax(220px,1.2fr) 34px;align-items:center;gap:.45rem;margin-bottom:.45rem}.operations-payload-arrow{text-align:center;color:var(--app-muted,#657786)}.operations-payload-preview{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.35rem .6rem;margin-top:.7rem;padding:.55rem .65rem;border:1px dashed var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff)}.operations-payload-preview>span{font-weight:700;font-size:.74rem;text-transform:uppercase;color:var(--app-muted,#657786)}.operations-payload-preview code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.operations-payload-preview small{grid-column:1/-1;color:var(--app-muted,#657786)}
.operations-delivery-evidence summary{cursor:pointer;color:var(--app-primary,#176b87);font-size:.76rem;font-weight:700;white-space:nowrap}.operations-delivery-evidence>div{position:absolute;right:1rem;z-index:20;width:min(720px,calc(100vw - 3rem));padding:.7rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff);box-shadow:0 12px 30px rgba(20,35,45,.16)}.operations-delivery-evidence label{display:block;margin:.2rem 0;font-size:.7rem;font-weight:700;text-transform:uppercase;color:var(--app-muted,#657786)}.operations-delivery-evidence pre{max-height:300px;margin:0 0 .5rem;padding:.65rem;overflow:auto;border-radius:5px;background:#17232d;color:#dce9ef;font-size:.7rem;white-space:pre-wrap}
.operations-rule-section>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.65rem}.operations-rule-section>header>div{display:flex;align-items:center;gap:.55rem}.operations-rule-section>header span{display:grid;place-items:center;width:1.55rem;height:1.55rem;border-radius:50%;background:var(--app-primary,#176b87);color:#fff;font-size:.75rem}.operations-rule-section>header select{width:auto}
.operations-rule-row{display:grid;grid-template-columns:28px minmax(150px,1fr) minmax(160px,1fr) minmax(150px,1fr) 34px;gap:.45rem;align-items:center;margin-bottom:.5rem}.operations-drag{color:#9aa8b1;text-align:center;cursor:grab}.operations-rule-row .form-select,.operations-rule-row .form-control{min-width:0}
.operations-form-footer{display:flex;justify-content:flex-end;padding:.8rem 1rem;border-top:1px solid var(--app-border,#dce4e8)}.operations-list{padding:.45rem}.operations-list>div:not(.operations-empty){display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;align-items:center;gap:.6rem;padding:.65rem;border-bottom:1px solid var(--app-border,#dce4e8)}.operations-list span:nth-child(2){display:flex;flex-direction:column;min-width:0}.operations-list small{color:var(--app-muted,#657786)}.operations-list code{font-size:.7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.operations-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:5px;background:color-mix(in srgb,var(--app-primary,#176b87) 10%,transparent);color:var(--app-primary,#176b87)}
.operations-evidence-table{min-width:1080px}.operations-evidence-table th:nth-child(1){width:14%}.operations-evidence-table th:nth-child(2){width:20%}.operations-evidence-table th:nth-child(3){width:40%}.operations-evidence-table th:nth-child(4){width:14%}.operations-evidence-table th:nth-child(5){width:12%}.operations-evidence-table tbody tr{border-color:var(--app-border,#dce4e8)}.operations-evidence-event strong{margin-top:.4rem;font-size:.82rem}.operations-evidence-context>strong{font-size:.86rem}.operations-record-link{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:.5rem;color:var(--app-text,#24313a);text-decoration:none}.operations-record-link>span:first-child{display:grid;place-items:center;width:30px;height:30px;border-radius:5px;background:color-mix(in srgb,var(--app-primary,#176b87) 11%,var(--app-surface,#fff));color:var(--app-primary,#176b87)}.operations-record-link strong{font-size:.86rem;line-height:1.25}.operations-record-link:hover strong{color:var(--app-primary,#176b87);text-decoration:underline}.operations-record-identifiers{display:flex;flex-wrap:wrap;gap:.28rem;margin-top:.45rem}.operations-record-identifiers span{display:inline-flex;gap:.25rem;padding:.18rem .38rem;border:1px solid var(--app-border,#dce4e8);border-radius:4px;background:var(--app-surface-muted,#f5f7f8);color:var(--app-muted,#657786);font-size:.68rem}.operations-record-identifiers b{color:var(--app-text,#24313a);font-weight:700}.operations-change-list{display:flex;flex-direction:column;gap:.38rem}.operations-change-row{display:grid;grid-template-columns:minmax(105px,.75fr) minmax(80px,1fr) 16px minmax(80px,1fr);align-items:center;gap:.38rem;font-size:.74rem}.operations-change-row>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--app-text,#24313a)}.operations-change-row>i{color:var(--app-muted,#657786);text-align:center}.operations-change-old,.operations-change-new{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.27rem .4rem;border-radius:4px;border:1px solid transparent}.operations-change-old{background:color-mix(in srgb,#c33 8%,var(--app-surface,#fff));border-color:color-mix(in srgb,#c33 17%,var(--app-border,#dce4e8));color:color-mix(in srgb,#8f2525 82%,var(--app-text,#24313a))}.operations-change-new{background:color-mix(in srgb,#198754 9%,var(--app-surface,#fff));border-color:color-mix(in srgb,#198754 19%,var(--app-border,#dce4e8));color:color-mix(in srgb,#146c43 82%,var(--app-text,#24313a))}.operations-change-details{margin-top:.45rem}.operations-change-details summary{width:max-content;cursor:pointer;color:var(--app-primary,#176b87);font-size:.72rem;font-weight:700}.operations-change-details[open] summary{margin-bottom:.5rem}.operations-change-details .operations-change-list{max-height:310px;overflow:auto;padding:.5rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface-muted,#f7f9fa)}.operations-metadata-list{display:flex;flex-wrap:wrap;gap:.3rem}.operations-metadata-list span{padding:.22rem .4rem;border-radius:4px;background:var(--app-surface-muted,#f5f7f8);font-size:.72rem;color:var(--app-muted,#657786)}.operations-no-change{display:inline-flex;align-items:center;gap:.35rem;color:var(--app-muted,#657786);font-size:.74rem}.operations-evidence-user code{display:block;max-width:145px;margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.66rem;color:var(--app-muted,#657786)}.operations-evidence-time{white-space:nowrap;font-size:.78rem;color:var(--app-muted,#657786)}
.operations-token{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,2fr) auto;gap:.75rem;align-items:center}.operations-token div{display:flex;flex-direction:column}.operations-token code{padding:.5rem;background:#fff;border-radius:4px;overflow:auto}
.operations-scope-list{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;padding:.7rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px}.operations-proposal-summary{display:flex;gap:.75rem;padding:.8rem;background:color-mix(in srgb,var(--app-primary,#176b87) 8%,transparent);border-radius:6px;margin-bottom:1rem}.operations-proposal-summary i{color:var(--app-primary,#176b87);font-size:1.2rem}.operations-proposal-summary p{margin:0}.operations-proposal-grid{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin-bottom:1rem}.operations-proposal-grid section{padding:.7rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px}.operations-proposal-grid h3,#proposalModal .modal-body>h3{font-size:.83rem;text-transform:uppercase;color:var(--app-muted,#657786);margin:0 0 .4rem}
.operations-field-policy{position:relative}.operations-field-policy summary{cursor:pointer;color:var(--app-primary,#176b87);white-space:nowrap}.operations-field-policy>div{position:absolute;z-index:30;right:0;top:calc(100% + .35rem);width:260px;max-height:280px;overflow:auto;padding:.65rem;background:var(--app-surface,#fff);border:1px solid var(--app-border,#dce4e8);border-radius:6px;box-shadow:0 12px 30px rgba(20,40,55,.18)}.operations-field-policy label{padding:.2rem;margin:0}
.operations-builder-intro{display:flex;align-items:center;gap:.7rem;margin-bottom:1rem;padding:.7rem .8rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 24%,var(--app-border,#dce4e8));border-radius:6px;background:color-mix(in srgb,var(--app-primary,#176b87) 5%,var(--app-surface,#fff))}.operations-builder-intro>i{display:grid;place-items:center;width:36px;height:36px;border-radius:5px;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff);font-size:1rem}.operations-builder-intro>div{display:flex;flex-direction:column}.operations-builder-intro small{color:var(--app-muted,#657786)}
.operations-auth-panel{padding:.8rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-auth-panel>[data-auth-none]{display:flex;align-items:center;gap:.45rem;color:var(--app-muted,#657786);font-size:.82rem}.operations-auth-panel>[data-auth-none] i{color:#198754}
.operations-header-row{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(260px,1.3fr) 34px;gap:.5rem;margin-bottom:.5rem}.operations-signature-row{margin-top:1rem;padding:.75rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px}.operations-signature-row>[data-signature-settings]{margin-top:.55rem}
.operations-job-stage{margin-top:1rem;padding:.85rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-job-stage>header{display:flex;align-items:center;gap:.6rem;margin-bottom:.75rem}.operations-job-stage>header>span{display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff);font-size:.75rem;font-weight:700}.operations-job-stage>header>div{display:flex;flex-direction:column}.operations-job-stage>header small{color:var(--app-muted,#657786)}
.operations-event-filter{display:grid;grid-template-columns:34px minmax(220px,1fr) 24px minmax(220px,1fr);align-items:end;gap:.55rem;padding:.7rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 25%,var(--app-border,#dce4e8));border-radius:6px;background:var(--app-surface,#fff)}.operations-event-filter>i{align-self:center;text-align:center;color:var(--app-primary,#176b87)}.operations-event-filter>label{display:flex;flex-direction:column;gap:.28rem;margin:0}.operations-event-filter>label>span{font-size:.72rem;font-weight:700;color:var(--app-muted,#657786)}
.operations-selected-api{display:flex;flex:0 0 auto;flex-direction:column;min-width:190px;padding:.42rem .6rem;border-left:3px solid var(--app-primary,#176b87);background:var(--app-surface,#fff)}.operations-selected-api span{color:var(--app-muted,#657786);font-size:.65rem;font-weight:700;text-transform:uppercase}.operations-selected-api strong{font-size:.8rem;color:var(--app-text,#243746)}
.operations-connection-list>div:not(.operations-empty){grid-template-columns:42px minmax(230px,1.2fr) minmax(240px,1fr) auto auto;padding:.8rem}.operations-connection-schedule{display:flex;flex-direction:column;min-width:0;padding-left:1rem;border-left:1px solid var(--app-border,#dce4e8)}.operations-connection-schedule>small{font-size:.65rem;font-weight:700;text-transform:uppercase}.operations-connection-schedule>strong{display:flex;align-items:center;gap:.35rem;color:var(--app-text,#243746);font-size:.8rem}.operations-connection-schedule>strong i{color:var(--app-primary,#176b87)}.operations-connection-schedule>em{overflow:hidden;color:var(--app-muted,#657786);font-size:.72rem;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.operations-connection-actions{display:flex!important;flex-direction:row!important;align-items:center;gap:.25rem}.operations-connection-identity code{max-width:560px}@media(max-width:850px){.operations-connection-list>div:not(.operations-empty){grid-template-columns:38px minmax(0,1fr) auto}.operations-connection-schedule{grid-column:2;padding:.55rem 0 0;border-top:1px solid var(--app-border,#dce4e8);border-left:0}.operations-connection-list .operations-run-status{grid-column:2}.operations-connection-actions{grid-column:3;grid-row:1}}
.operations-panel-actions{display:flex;align-items:center;gap:.45rem}.operations-run-filters{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(135px,.75fr) minmax(150px,.85fr) minmax(135px,.7fr) minmax(135px,.7fr) auto;align-items:end;gap:.55rem;padding:.75rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-run-filters>label{display:flex;flex-direction:column;gap:.25rem}.operations-run-filters>label>span{font-size:.68rem;font-weight:700;color:var(--app-muted,#657786);text-transform:uppercase}.operations-run-summary{display:flex;align-items:center;gap:.45rem;padding:.7rem .2rem;color:var(--app-muted,#657786)}.operations-run-summary>i{color:var(--app-primary,#176b87)}.operations-run-summary small{margin-left:auto}.operations-runs-table{max-height:58vh;border:1px solid var(--app-border,#dce4e8)}.operations-runs-table thead{position:sticky;top:0;z-index:2;background:var(--app-surface,#fff)}.operations-runs-table td>strong,.operations-runs-table td>small{display:block}.operations-run-trigger{display:inline-flex;align-items:center;gap:.3rem;font-weight:700}.operations-run-trigger i{color:var(--app-primary,#176b87)}@media(max-width:900px){.operations-run-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.operations-run-filters>button{justify-self:start}.operations-run-summary{align-items:flex-start;flex-wrap:wrap}.operations-run-summary small{width:100%;margin-left:0}}
.operations-event-window{padding:.75rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 18%,var(--app-border,#dce4e8));border-radius:6px;background:color-mix(in srgb,var(--app-primary,#176b87) 3%,var(--app-surface,#fff))}.operations-window-switch{display:flex;align-items:flex-start;gap:.55rem;margin:0;padding:.65rem .75rem!important;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff)}.operations-window-switch>.form-check-input{flex:0 0 auto;margin:.16rem 0 0!important}.operations-window-switch>span{display:flex;flex-direction:column}.operations-window-switch small{color:var(--app-muted,#657786);font-size:.72rem}.operations-event-window>[data-window-settings]{margin-top:.65rem}.operations-window-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;padding:.7rem;border-left:3px solid var(--app-primary,#176b87);background:var(--app-surface,#fff)}.operations-window-settings>label{display:flex;flex-direction:column;gap:.28rem}.operations-window-settings>label>span{font-size:.72rem;font-weight:700;color:var(--app-muted,#657786)}@media(max-width:800px){.operations-window-settings{grid-template-columns:1fr}.operations-selected-api{width:100%;margin-left:0!important}}
.operations-mapping-head,.operations-mapping-row{display:grid;grid-template-columns:minmax(145px,.75fr) 20px minmax(145px,.75fr) minmax(180px,1fr) minmax(135px,.68fr) minmax(105px,.55fr) 34px;align-items:center;gap:.45rem}.operations-mapping-head{padding:0 .1rem .35rem;color:var(--app-muted,#657786);font-size:.68rem;font-weight:700;text-transform:uppercase}.operations-mapping-row{margin-bottom:.5rem}.operations-mapping-row>i{text-align:center;color:var(--app-muted,#657786)}.operations-mapping-value{min-width:0}.operations-generated-value{display:flex;align-items:center;gap:.35rem;min-height:38px;padding:.45rem .55rem;border:1px dashed var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff);color:var(--app-muted,#657786);font-size:.73rem}.operations-generated-value i{color:var(--app-primary,#176b87)}.operations-request-preview{display:grid;grid-template-columns:120px minmax(0,1fr);gap:.6rem;margin-top:.75rem;padding:.65rem;border:1px dashed var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff)}.operations-request-preview>span{font-size:.72rem;font-weight:700;text-transform:uppercase;color:var(--app-muted,#657786)}.operations-request-preview pre{max-height:180px;margin:0;overflow:auto;font-size:.72rem;color:var(--app-text,#243746);white-space:pre-wrap}
.operations-trigger-guide{display:flex;align-items:center;justify-content:center;gap:.65rem;margin-top:1rem;padding:.65rem .8rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa);color:var(--app-muted,#657786);font-size:.78rem}.operations-trigger-guide>span{display:inline-flex;align-items:center;gap:.32rem}.operations-trigger-guide>span i{color:var(--app-primary,#176b87)}.operations-trigger-guide b{color:var(--app-text,#243746)}
.operations-condition-builder>header>div:first-child>div,.operations-action-builder>header>div:first-child>div{display:flex;flex-direction:column}.operations-condition-builder>header small,.operations-action-builder>header small{color:var(--app-muted,#657786);font-weight:400}.operations-condition-group{margin:.65rem 0;padding:.65rem;border-left:4px solid color-mix(in srgb,var(--app-primary,#176b87) 42%,var(--app-border,#dce4e8));border-radius:4px;background:color-mix(in srgb,var(--app-primary,#176b87) 3%,var(--app-surface,#fff))}.operations-condition-group.root{border:1px solid var(--app-border,#dce4e8);border-left-width:4px}.operations-condition-group>.operations-condition-group{margin-left:1rem}.operations-condition-group>header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.55rem}.operations-condition-group>header>div{display:flex;align-items:center;gap:.38rem}.operations-condition-group>header>div:first-child>i{color:var(--app-primary,#176b87)}.operations-condition-group>header select{width:auto;min-width:145px}.operations-condition-row{display:grid;grid-template-columns:24px minmax(145px,1fr) minmax(135px,.85fr) minmax(130px,.8fr) 90px minmax(130px,.85fr) minmax(250px,1.4fr) 34px;align-items:center;gap:.4rem;margin-bottom:.5rem;padding:.48rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff)}.operations-condition-right{display:grid;grid-template-columns:minmax(110px,.65fr) minmax(145px,1fr);gap:.4rem;min-width:0}.operations-condition-right>[data-right-control]{min-width:0}.operations-condition-right select[multiple]{min-height:64px}.operations-offset-control{display:grid;grid-template-columns:minmax(70px,.65fr) minmax(90px,1fr);gap:.35rem}.operations-no-value,.operations-expression-token{display:flex;align-items:center;min-height:38px;padding:.4rem .55rem;border:1px dashed var(--app-border,#dce4e8);border-radius:5px;color:var(--app-muted,#657786);font-size:.75rem}
.operations-action-card{margin-bottom:.65rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff);overflow:hidden}.operations-action-row{display:grid;grid-template-columns:26px minmax(180px,.9fr) minmax(180px,1fr) minmax(180px,1.1fr) 34px;align-items:center;gap:.45rem;padding:.58rem}.operations-action-details{padding:.7rem .8rem;border-top:1px solid var(--app-border,#dce4e8);background:var(--app-surface-muted,#f7f9fa)}.operations-action-details:empty{display:none}.operations-action-detail-head{display:flex;justify-content:space-between;margin-bottom:.6rem}.operations-action-detail-head>div{display:flex;flex-direction:column}.operations-action-detail-head small{color:var(--app-muted,#657786)}.operations-expression-base{display:grid;grid-template-columns:minmax(180px,.45fr) minmax(260px,1fr);gap:.5rem}.operations-action-details [data-calculation-area]{margin-top:.65rem;padding:.6rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff)}.operations-action-details [data-calculation-area]>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}.operations-calculation-step{display:grid;grid-template-columns:minmax(120px,.6fr) minmax(130px,.7fr) minmax(180px,1fr) minmax(100px,.55fr) 34px;gap:.4rem;margin-bottom:.4rem}.operations-activity-config{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.operations-activity-config>label{display:flex;flex-direction:column;gap:.25rem}.operations-activity-config>label>span{font-size:.72rem;font-weight:700;color:var(--app-muted,#657786)}
.operations-conversion-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.operations-conversion-options>label:not(.form-check),.operations-conversion-match>label:not(.form-check){display:grid;gap:.25rem}.operations-conversion-options label>span:first-child,.operations-conversion-match label>span:first-child{font-size:.72rem;font-weight:700;color:var(--app-muted,#657786)}.operations-conversion-options>.form-check{align-self:end;min-height:42px;margin:0;padding:.55rem .65rem .55rem 2rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px;background:var(--app-surface,#fff)}.operations-conversion-options>.form-check small{display:block;color:var(--app-muted,#657786)}.operations-conversion-match{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) minmax(180px,.8fr);align-items:end;gap:.55rem;margin-top:.65rem;padding:.65rem;border:1px solid color-mix(in srgb,var(--app-primary,#465fff) 22%,var(--app-border,#dce4e8));border-radius:6px;background:color-mix(in srgb,var(--app-primary,#465fff) 4%,var(--app-surface,#fff))}.operations-conversion-match>i{align-self:center;color:var(--app-primary,#465fff)}.operations-conversion-match>.form-check{margin:0 0 .55rem}.operations-conversion-mappings{margin-top:.75rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface,#fff);overflow:hidden}.operations-conversion-mappings>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .75rem;border-bottom:1px solid var(--app-border,#dce4e8)}.operations-conversion-mappings>header div{display:grid}.operations-conversion-mappings>header small{color:var(--app-muted,#657786)}.operations-conversion-map-head,.operations-conversion-map-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,.75fr) minmax(220px,1.2fr) 34px;gap:.45rem;align-items:center;padding:.45rem .65rem}.operations-conversion-map-head{font-size:.68rem;font-weight:800;text-transform:uppercase;color:var(--app-muted,#657786);background:var(--app-surface-muted,#f7f9fa)}.operations-conversion-map-row{border-top:1px solid color-mix(in srgb,var(--app-border,#dce4e8) 70%,transparent)}.operations-conversion-map-row [data-conversion-source]{min-width:0}.operations-conversion-map-row .operations-expression-token{min-height:38px}
@media(max-width:1100px){.operations-kpis{grid-template-columns:repeat(3,1fr)}.operations-ai-layout,.operations-two-column{grid-template-columns:1fr}.operations-rule-row{grid-template-columns:24px 1fr 1fr 34px}.operations-rule-row .form-control{grid-column:2/4}}
@media(max-width:680px){.operations-center{padding:.75rem}.operations-hero{align-items:flex-start;flex-direction:column}.operations-kpis{grid-template-columns:repeat(2,1fr)}.operations-rule-row{grid-template-columns:22px 1fr 34px}.operations-rule-row .form-select:nth-of-type(2),.operations-rule-row .form-control{grid-column:2/3}.operations-ai-actions,.operations-panel-head{align-items:flex-start;flex-direction:column}.operations-token{grid-template-columns:1fr}.operations-scope-list,.operations-proposal-grid{grid-template-columns:1fr}}
@media(max-width:680px){.operations-header-row,.operations-mapping-row{grid-template-columns:1fr 34px}.operations-mapping-head{display:none}.operations-header-row .form-control,.operations-mapping-row>.form-control,.operations-mapping-row>.form-select,.operations-mapping-row>.operations-mapping-value{grid-column:1}.operations-header-row .icon-btn,.operations-mapping-row .icon-btn{grid-column:2;grid-row:1}.operations-mapping-row>i{display:none}.operations-request-preview{grid-template-columns:1fr}}
@media(max-width:680px){.operations-event-filter{grid-template-columns:28px minmax(0,1fr)}.operations-event-filter>i.bi-chevron-right{display:none}.operations-event-filter>label{grid-column:2}}
@media(max-width:1100px){.operations-condition-row{grid-template-columns:24px repeat(2,minmax(0,1fr)) 34px}.operations-condition-right{grid-column:2/4}.operations-condition-row>[data-left-operand],.operations-condition-row>[data-left-unit]{grid-column:auto}.operations-action-row{grid-template-columns:24px 1fr 1fr 34px}.operations-action-row>[name="action_value[]"]{grid-column:2/4}.operations-activity-config{grid-template-columns:repeat(2,minmax(0,1fr))}.operations-conversion-match{grid-template-columns:1fr auto 1fr}.operations-conversion-match>.form-check{grid-column:1/-1}}
@media(max-width:680px){.operations-trigger-guide{align-items:flex-start;flex-direction:column}.operations-trigger-guide>i{transform:rotate(90deg);align-self:center}.operations-condition-builder>header{align-items:flex-start;flex-direction:column}.operations-condition-row{grid-template-columns:22px minmax(0,1fr) 34px}.operations-condition-row>.form-select,.operations-condition-right{grid-column:2}.operations-condition-row>[data-rule-remove]{grid-column:3;grid-row:1}.operations-condition-right{grid-template-columns:1fr}.operations-condition-group>.operations-condition-group{margin-left:.35rem}.operations-action-row{grid-template-columns:22px minmax(0,1fr) 34px}.operations-action-row>.form-select,.operations-action-row>[name="action_value[]"]{grid-column:2}.operations-action-row>[data-rule-remove]{grid-column:3;grid-row:1}.operations-expression-base,.operations-calculation-step,.operations-activity-config,.operations-conversion-options,.operations-conversion-match,.operations-conversion-map-row{grid-template-columns:1fr}.operations-conversion-match>i,.operations-conversion-map-head{display:none}.operations-conversion-match>.form-check{grid-column:auto}.operations-conversion-map-row>.icon-btn{justify-self:end}.operations-calculation-step>[data-calc-remove]{justify-self:end}}

/* Compact typed automation expressions keep every operand visible without toolbar overlap. */
.operations-condition-row{grid-template-columns:24px minmax(135px,1fr) minmax(145px,1fr) minmax(120px,.8fr) minmax(240px,1.45fr) 34px}
.operations-left-expression{display:flex;align-items:center;gap:.35rem;min-width:0}
.operations-left-expression>[data-left-operation]{min-width:135px}
.operations-left-expression>[data-left-operand]{min-width:125px}
.operations-left-expression>[data-left-unit]{min-width:82px}
.operations-condition-right{grid-template-columns:minmax(110px,.65fr) minmax(130px,1fr)}
.operations-action-row{grid-template-columns:26px minmax(180px,.9fr) minmax(180px,1fr) minmax(180px,1.1fr) 106px}
.operations-action-order{display:flex;align-items:center;justify-content:flex-end;gap:.2rem}
@media(max-width:1100px){.operations-condition-row{grid-template-columns:24px repeat(2,minmax(0,1fr)) 34px}.operations-left-expression{grid-column:2/4}.operations-condition-row>[data-condition-operator]{grid-column:2}.operations-condition-right{grid-column:3}.operations-action-row{grid-template-columns:24px 1fr 1fr 106px}}
@media(max-width:680px){.operations-left-expression{grid-column:2;flex-wrap:wrap}.operations-left-expression>.form-select{flex:1 1 130px}.operations-condition-row>[data-condition-operator],.operations-condition-right{grid-column:2}.operations-action-row{grid-template-columns:22px minmax(0,1fr) 106px}.operations-action-order{grid-column:3;grid-row:1}}
.operations-oauth-field-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(145px,.8fr) minmax(180px,1fr) 82px 34px;align-items:center;gap:.45rem;margin-bottom:.5rem}.operations-oauth-secret{display:flex;align-items:center;gap:.3rem;margin:0;font-size:.78rem}.operations-oauth-builder{border-color:color-mix(in srgb,var(--app-primary,#176b87) 35%,var(--app-border,#dce4e8))}@media(max-width:760px){.operations-oauth-field-row{grid-template-columns:1fr 34px}.operations-oauth-field-row>:not(.icon-btn){grid-column:1}.operations-oauth-field-row>.icon-btn{grid-column:2;grid-row:1}}
.operations-oauth-credentials{display:grid;grid-template-columns:minmax(210px,1fr) repeat(3,minmax(170px,1fr)) auto;align-items:end;gap:.65rem}.operations-oauth-credentials>div,.operations-oauth-credentials>label{display:flex;flex-direction:column;gap:.2rem;margin:0}.operations-oauth-credentials span,.operations-oauth-credentials label{font-size:.72rem}.operations-oauth-credentials code{display:block;max-width:100%;padding:.42rem .5rem;overflow:auto;border:1px solid rgba(0,0,0,.1);border-radius:4px;background:var(--app-surface,#fff);color:var(--app-text,#243746);white-space:nowrap}
.operations-inbound-auth-note{display:flex;align-items:center;gap:.7rem;padding:.7rem .8rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 22%,var(--app-border,#dce4e8));border-radius:6px;background:color-mix(in srgb,var(--app-primary,#176b87) 5%,var(--app-surface,#fff))}.operations-inbound-auth-note>i{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:5px;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff)}.operations-inbound-auth-note>span{display:flex;flex-direction:column}.operations-inbound-auth-note small{color:var(--app-muted,#657786)}
.operations-credential-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;max-height:210px;padding:.6rem;overflow:auto;border:1px solid var(--app-border,#dce4e8);border-radius:6px;background:var(--app-surface-muted,#f7f9fa)}.operations-credential-modules .form-check{display:grid;grid-template-columns:18px minmax(0,1fr);margin:0;padding:.38rem .4rem .38rem 1.8rem;border-radius:4px;background:var(--app-surface,#fff)}.operations-credential-modules .form-check>span{display:flex;flex-direction:column}.operations-credential-modules small{color:var(--app-muted,#657786);font-size:.65rem}
.operations-api-guide{display:flex;flex-direction:column;gap:1rem}.operations-api-contract,.operations-api-fields,.operations-api-sample,.operations-api-guide-grid>section{border:1px solid var(--app-border,#dce4e8);border-radius:7px;background:var(--app-surface,#fff)}.operations-api-contract{padding:.85rem}.operations-api-contract>header{display:grid;grid-template-columns:36px minmax(0,1fr) 34px;align-items:center;gap:.65rem;margin-bottom:.65rem}.operations-api-contract>header>span{display:grid;place-items:center;width:36px;height:36px;border-radius:5px;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff)}.operations-api-contract>header>div{display:flex;flex-direction:column}.operations-api-contract>header small,.operations-api-section-head small,.operations-api-guide-grid small{color:var(--app-muted,#657786)}.operations-api-contract>code{display:block;padding:.65rem;border-radius:5px;background:var(--app-surface-muted,#f5f7f8);color:var(--app-primary,#176b87);overflow:auto}.operations-api-meta{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.65rem}.operations-api-meta span{padding:.3rem .45rem;border:1px solid var(--app-border,#dce4e8);border-radius:4px;color:var(--app-muted,#657786);font-size:.72rem}.operations-api-meta b{color:var(--app-text,#243746)}.operations-api-guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.operations-api-guide-grid>section{padding:.8rem}.operations-api-guide-grid h3,.operations-api-section-head h3{margin:0;font-size:.88rem}.operations-api-guide-grid h3 i{margin-right:.3rem;color:var(--app-primary,#176b87)}.operations-api-guide-grid p{margin:.55rem 0}.operations-api-guide-grid code{display:block;padding:.45rem;border-radius:4px;background:var(--app-surface-muted,#f5f7f8);overflow:auto;color:var(--app-text,#243746)}.operations-api-section-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem .85rem;border-bottom:1px solid var(--app-border,#dce4e8)}.operations-api-section-head>div{display:flex;flex-direction:column}.operations-api-fields .table{margin:0}.operations-api-type{display:inline-flex;padding:.2rem .38rem;border-radius:4px;background:color-mix(in srgb,var(--app-primary,#176b87) 9%,var(--app-surface,#fff));color:var(--app-primary,#176b87);font-size:.7rem;font-weight:700}.operations-api-sample pre{max-height:360px;margin:0;padding:.85rem;overflow:auto;background:#17232b;color:#eaf3f6;font-size:.75rem;white-space:pre-wrap}.operations-api-guide>.alert{margin:0}.operations-api-guide>.alert i{margin-right:.35rem}
.operations-api-row-actions{display:flex;align-items:center;gap:.25rem}.operations-composite-intro{display:flex;align-items:center;gap:.75rem;padding:.8rem;border:1px solid color-mix(in srgb,var(--app-primary,#176b87) 25%,var(--app-border,#dce4e8));border-radius:7px;background:color-mix(in srgb,var(--app-primary,#176b87) 5%,var(--app-surface,#fff))}.operations-composite-intro>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:5px;background:var(--app-primary,#176b87);color:var(--app-primary-contrast,#fff)}.operations-composite-intro>div{display:flex;flex-direction:column}.operations-composite-intro small{color:var(--app-muted,#657786)}.operations-composite-legend{display:flex;flex-wrap:wrap;gap:.45rem;margin:.7rem 0}.operations-composite-legend span{padding:.3rem .48rem;border:1px solid var(--app-border,#dce4e8);border-radius:4px;color:var(--app-muted,#657786);font-size:.7rem}.operations-composite-legend i{margin-right:.22rem;color:var(--app-primary,#176b87)}.operations-composite-row{margin-bottom:.6rem;border:1px solid var(--app-border,#dce4e8);border-radius:7px;background:var(--app-surface,#fff);overflow:hidden}.operations-composite-row.enabled{border-color:color-mix(in srgb,var(--app-primary,#176b87) 38%,var(--app-border,#dce4e8))}.operations-composite-row>header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.68rem .8rem;background:var(--app-surface-muted,#f7f9fa)}.operations-composite-row>header .form-check{display:flex;align-items:center;gap:.65rem;margin:0;padding-left:2.5rem}.operations-composite-row>header .form-check>span{display:flex;flex-direction:column}.operations-composite-row>header small{color:var(--app-muted,#657786);font-size:.7rem}.operations-cardinality{display:inline-flex;align-items:center;gap:.3rem;color:var(--app-muted,#657786);font-size:.72rem}.operations-composite-settings{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(185px,1fr) minmax(190px,1.1fr) 115px;align-items:end;gap:.65rem;padding:.75rem .8rem}.operations-composite-settings>label:not(.form-check){display:flex;flex-direction:column;gap:.25rem;margin:0}.operations-composite-settings>label>span,.operations-related-fields summary{font-size:.7rem;font-weight:700;color:var(--app-muted,#657786)}.operations-match-fields select{min-height:74px}.operations-relation-required{align-self:center;margin:0}.operations-related-fields{grid-column:1/-1;border-top:1px solid var(--app-border,#dce4e8);padding-top:.65rem}.operations-related-fields summary{cursor:pointer;color:var(--app-primary,#176b87)}.operations-related-fields summary span{display:inline-flex;margin-left:.3rem;padding:.05rem .3rem;border-radius:8px;background:color-mix(in srgb,var(--app-primary,#176b87) 10%,var(--app-surface,#fff))}.operations-related-fields>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem .65rem;max-height:240px;margin-top:.55rem;overflow:auto}.operations-related-fields .form-check{display:grid;grid-template-columns:18px minmax(0,1fr);margin:0;padding:.3rem .35rem .3rem 1.8rem;border-radius:4px}.operations-related-fields .form-check:hover{background:var(--app-surface-muted,#f7f9fa)}.operations-related-fields .form-check span{font-size:.75rem}.operations-related-fields .form-check small{grid-column:2;color:var(--app-muted,#657786);font-size:.64rem}
@media(max-width:1000px){.operations-composite-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.operations-related-fields>div{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.operations-composite-settings,.operations-related-fields>div{grid-template-columns:1fr}.operations-composite-row>header{align-items:flex-start;flex-direction:column}}
@media(max-width:1000px){.operations-oauth-credentials{grid-template-columns:1fr 1fr}.operations-oauth-credentials>div{grid-column:1/-1}.operations-credential-modules{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.operations-oauth-credentials,.operations-api-guide-grid,.operations-credential-modules{grid-template-columns:1fr}.operations-api-contract>header{grid-template-columns:36px minmax(0,1fr)}.operations-api-contract>header>.icon-btn{grid-column:2}.operations-api-section-head{align-items:flex-start;flex-direction:column}}
.operations-cardinality.not-ready{color:#a15c00}
.operations-contract-section{margin-top:.75rem;border:1px solid var(--app-border,#dce4e8);border-radius:7px;background:var(--app-surface,#fff);overflow:hidden}.operations-contract-section>header,.operations-contract-subhead{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.68rem .8rem;background:var(--app-surface-muted,#f7f9fa)}.operations-contract-section>header>div,.operations-contract-subhead{display:flex;flex-direction:column}.operations-contract-section>header small,.operations-contract-subhead small{color:var(--app-muted,#657786);font-size:.7rem}.operations-contract-section>header>span{padding:.2rem .4rem;border-radius:4px;background:color-mix(in srgb,var(--app-primary,#176b87) 10%,var(--app-surface,#fff));color:var(--app-primary,#176b87);font-size:.7rem;font-weight:700}.operations-root-parameter-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem;max-height:320px;padding:.65rem;overflow:auto}.operations-root-parameter{display:grid;grid-template-columns:18px minmax(130px,1fr) minmax(140px,.85fr);align-items:center;gap:.45rem;padding:.42rem;border:1px solid var(--app-border,#dce4e8);border-radius:5px}.operations-root-parameter>span{display:flex;flex-direction:column;min-width:0}.operations-root-parameter small{overflow:hidden;color:var(--app-muted,#657786);font-size:.64rem;text-overflow:ellipsis;white-space:nowrap}.operations-contract-subhead{margin-top:.75rem;border:1px solid var(--app-border,#dce4e8);border-radius:6px}.operations-related-fields .form-check{grid-template-columns:18px minmax(0,1fr) minmax(125px,.75fr)}.operations-related-fields .form-check small{grid-column:2}.operations-related-fields .form-check>.form-control{grid-column:3;grid-row:1/3;align-self:center}.operations-related-fields .form-check>input.form-check-input{grid-column:1;grid-row:1/3}
@media(max-width:850px){.operations-root-parameter-list{grid-template-columns:1fr}}@media(max-width:560px){.operations-root-parameter{grid-template-columns:18px minmax(0,1fr)}.operations-root-parameter>.form-control{grid-column:2}.operations-related-fields .form-check{grid-template-columns:18px minmax(0,1fr)}.operations-related-fields .form-check>.form-control{grid-column:2;grid-row:auto}}
.activity-automation-bridge {
    align-items: center;
    background: color-mix(in srgb, var(--app-primary, #176b87) 7%, var(--app-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--app-primary, #176b87) 22%, var(--app-border, #dce4e8));
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 16px 0;
    padding: 14px 16px;
}

.activity-automation-bridge-icon {
    align-items: center;
    background: var(--app-primary, #176b87);
    color: var(--app-primary-contrast, #fff);
    display: flex;
    font-size: 18px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.activity-automation-bridge strong,
.activity-automation-bridge span,
.activity-automation-bridge small {
    display: block;
}

.activity-automation-bridge span {
    color: var(--app-primary, #176b87);
    font-size: 13px;
    font-weight: 700;
}

.activity-automation-bridge small {
    color: var(--app-muted, #657786);
}

@media (max-width: 767.98px) {
    .activity-automation-bridge {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .activity-automation-bridge form {
        grid-column: 1 / -1;
    }
}

/* Secure external document requests */
.document-request-link-banner {
    display: grid;
    grid-template-columns: auto minmax(180px, .65fr) minmax(260px, 1fr);
    align-items: center;
    gap: 14px;
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--app-primary) 28%, var(--app-border));
    background: color-mix(in srgb, var(--app-primary) 6%, var(--app-surface));
    border-radius: 8px;
}
.document-request-link-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; color:#fff; background:#198754; font-size:19px; }
.document-request-link-banner > div:nth-child(2) { display:grid; }
.document-request-link-banner small { color:var(--bs-secondary-color); }
.document-request-folder-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:22px 0 10px; }
.document-request-recipient-empty { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px dashed var(--app-border); border-radius:7px; background:color-mix(in srgb, var(--app-surface) 92%, var(--app-page)); }
.document-request-recipient-empty > i { color:var(--bs-secondary-color); font-size:18px; }
.document-request-recipient-empty span { display:grid; }
.document-request-recipient-empty small { color:var(--bs-secondary-color); }
.document-request-folder-head > div { display:grid; }
.document-request-folder-head small { color:var(--bs-secondary-color); }
.document-request-folder-list { display:grid; gap:8px; }
.document-request-folder-option {
    display:grid;
    grid-template-columns:auto auto minmax(150px, 1fr) minmax(220px, .9fr);
    align-items:center;
    gap:12px;
    padding:11px 12px;
    border:1px solid var(--app-border);
    border-radius:7px;
    background:var(--app-surface);
    cursor:pointer;
}
.document-request-folder-option.is-selected { border-color:color-mix(in srgb, var(--app-primary) 62%, var(--app-border)); box-shadow:inset 3px 0 var(--app-primary); }
.document-request-folder-mark { color:var(--request-folder-color); font-size:25px; line-height:1; }
.document-request-folder-copy, .document-request-folder-name { display:grid; }
.document-request-folder-copy small, .document-request-folder-name small { color:var(--bs-secondary-color); font-size:11px; }
.document-request-security-note { display:flex; align-items:flex-start; gap:11px; margin-top:16px; padding:12px 14px; color:#31546b; background:#eef7fb; border:1px solid #cfe5ef; border-radius:7px; }
.document-request-security-note > i { margin-top:2px; font-size:20px; }
.document-request-security-note > span { display:grid; }
.document-request-activity-config { display:grid; grid-template-columns:minmax(190px,.8fr) minmax(220px,1fr) minmax(220px,1fr); align-items:end; gap:12px; padding:12px 0; border-top:1px solid var(--app-border); }
.document-request-activity-config:first-of-type { border-top:0; }
.document-request-activity-config > strong { align-self:center; }
.document-request-activity-config label { display:grid; gap:4px; }
.document-request-activity-config label > span { color:var(--bs-secondary-color); font-size:11px; font-weight:700; }
.document-request-log-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.document-request-log-summary > span { display:grid; padding:12px 14px; border:1px solid var(--app-border); border-radius:7px; background:var(--app-surface); color:var(--bs-secondary-color); font-size:12px; }
.document-request-log-summary strong { color:var(--app-text); font-size:22px; }
.document-request-log-summary .is-awaiting { border-color:#e6cf8e; background:#fffaf0; }
.document-request-log-summary .is-received { border-color:#acd4bd; background:#f2faf5; }
.document-request-log-list { display:grid; gap:8px; }
.document-request-log-item { display:grid; grid-template-columns:155px minmax(250px,1fr) minmax(220px,.75fr) auto; align-items:center; gap:14px; padding:13px 14px; border:1px solid var(--app-border); border-left:4px solid #8ba0ad; border-radius:7px; background:var(--app-surface); }
.document-request-log-item.is-awaiting { border-left-color:#d6a527; }
.document-request-log-item.is-received { border-left-color:#34815a; }
.document-request-log-item.is-expired,.document-request-log-item.is-revoked { opacity:.78; }
.document-request-log-state { display:flex; align-items:center; gap:9px; }
.document-request-log-state > i { color:#718895; font-size:21px; }
.document-request-log-item.is-awaiting .document-request-log-state > i { color:#b88400; }
.document-request-log-item.is-received .document-request-log-state > i { color:#34815a; }
.document-request-log-state > span,.document-request-log-main,.document-request-log-dates { display:grid; min-width:0; }
.document-request-log-item small { color:var(--bs-secondary-color); }
.document-request-log-main > strong,.document-request-log-main > small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-request-log-recipients { overflow:hidden; margin-top:5px; color:var(--bs-secondary-color); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.document-request-log-recipients i { margin-right:6px; }

.document-request-portal { width:min(1180px, calc(100% - 32px)); margin:0 auto 45px; color:#183247; }
.document-request-intro { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:18px; align-items:start; margin:24px 0 18px; padding:24px; border:1px solid #dbe5eb; border-radius:8px; background:#fff; box-shadow:0 8px 26px rgba(24,50,71,.06); }
.document-request-intro-icon { display:grid; place-items:center; width:50px; height:50px; color:#176b87; background:#e8f4f7; border-radius:8px; font-size:23px; }
.document-request-intro h1 { margin:2px 0 8px; font-size:clamp(24px, 3vw, 34px); letter-spacing:0; }
.document-request-intro p { max-width:760px; margin:0; color:#506879; line-height:1.65; }
.document-request-expiry { display:grid; min-width:145px; padding-left:18px; border-left:1px solid #dbe5eb; }
.document-request-expiry small, .document-request-expiry span { color:#647987; font-size:12px; }
.document-request-expiry strong { margin:3px 0; }
.document-request-success { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding:13px 16px; border:1px solid #a8d5bc; color:#245d3c; background:#edf8f1; border-radius:7px; }
.document-request-success > i { font-size:21px; }
.document-request-success > span { display:grid; }
.document-request-folder-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
.external-request-folder { overflow:hidden; border:1px solid #d7e2e8; border-radius:8px; background:#fff; box-shadow:0 8px 22px rgba(24,50,71,.055); }
.external-request-folder-head { display:flex; align-items:center; gap:12px; padding:16px 18px; border-bottom:1px solid #e0e8ed; background:linear-gradient(90deg, color-mix(in srgb, var(--request-folder-color) 8%, #fff), #fff 65%); }
.external-request-folder-icon { color:var(--request-folder-color); font-size:29px; line-height:1; }
.external-request-folder-head > div { display:grid; min-width:0; }
.external-request-folder-head h2 { overflow:hidden; margin:0; font-size:17px; text-overflow:ellipsis; white-space:nowrap; }
.external-request-folder-head small { color:#6a7e8c; }
.external-request-folder-complete { margin-left:auto; color:#347652; font-size:12px; font-weight:700; }
.external-request-folder-upload { padding:18px; }
.external-request-dropzone { display:grid; justify-items:center; gap:3px; margin-bottom:12px; padding:22px 14px; border:1.5px dashed #9cb5c3; border-radius:7px; color:#37566a; background:#f7fafb; cursor:pointer; transition:border-color .16s, background .16s, transform .16s; }
.external-request-dropzone:hover, .external-request-dropzone.is-dragging { border-color:#176b87; background:#edf7fa; transform:translateY(-1px); }
.external-request-dropzone input { position:absolute; width:1px; height:1px; opacity:0; }
.external-request-dropzone-icon { font-size:26px; color:#176b87; }
.external-request-dropzone span:not(.external-request-dropzone-icon) { color:#557080; font-size:13px; }
.external-request-dropzone small { color:#7b8d98; }
.external-request-file-queue, .external-request-received-list { display:grid; gap:6px; margin:0 0 12px; }
.external-request-file-queue div, .external-request-received-list div { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; padding:7px 9px; border:1px solid #e1e8ec; border-radius:5px; font-size:12px; }
.external-request-file-queue i, .external-request-received-list i { color:#31815a; }
.external-request-file-queue span, .external-request-received-list span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.external-request-file-queue em, .external-request-received-list em { color:#718492; font-style:normal; }
.external-request-received-list { padding:0 18px 18px; }
.external-request-received-list > small { color:#718492; font-weight:700; }
.external-request-submit-bar { position:sticky; bottom:12px; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:16px; padding:14px 16px; border:1px solid #cbdbe3; border-radius:8px; background:rgba(255,255,255,.96); box-shadow:0 12px 34px rgba(24,50,71,.16); backdrop-filter:blur(8px); }
.external-request-submit-bar > span { display:grid; grid-template-columns:auto 1fr; column-gap:9px; align-items:center; }
.external-request-submit-bar > span > i { grid-row:1 / 3; color:#176b87; font-size:22px; }
.external-request-submit-bar small { color:#6b7f8d; }
.document-request-portal-footer { display:flex; justify-content:center; align-items:center; gap:8px; margin-top:20px; color:#647987; font-size:12px; text-align:center; }
.document-request-invalid { max-width:620px; margin:60px auto; padding:48px 30px; text-align:center; border:1px solid #dbe5eb; border-radius:8px; background:#fff; }
.document-request-invalid > i { font-size:42px; color:#8aa0ae; }

@media (max-width: 767.98px) {
    .document-request-link-banner { grid-template-columns:auto 1fr; }
    .document-request-link-banner .input-group { grid-column:1 / -1; }
    .document-request-folder-option { grid-template-columns:auto auto 1fr; }
    .document-request-folder-name { grid-column:2 / -1; }
    .document-request-portal { width:min(100% - 20px, 1180px); }
    .document-request-intro { grid-template-columns:auto 1fr; padding:18px; }
    .document-request-expiry { grid-column:1 / -1; padding:12px 0 0; border-top:1px solid #dbe5eb; border-left:0; }
    .document-request-folder-grid { grid-template-columns:1fr; }
    .document-request-activity-config { grid-template-columns:1fr; }
    .document-request-log-summary { grid-template-columns:1fr; }
    .document-request-log-item { grid-template-columns:1fr auto; }
    .document-request-log-main,.document-request-log-dates { grid-column:1 / -1; }
    .external-request-submit-bar { bottom:6px; align-items:stretch; flex-direction:column; }
    .external-request-submit-bar .btn { width:100%; }
}

/* OPERIGENT shared interface system. Keep this layer last so every feature follows Theme Studio. */
:root {
    --operigent-radius-xs: 4px;
    --operigent-radius-sm: 6px;
    --operigent-radius-md: 8px;
    --operigent-control-height: 40px;
    --operigent-shadow-sm: 0 1px 2px rgba(18, 38, 52, .05), 0 5px 16px rgba(18, 38, 52, .035);
    --operigent-shadow-md: 0 14px 36px rgba(18, 38, 52, .12);
}

html { background: var(--app-page, #f4f7fa); scrollbar-color: color-mix(in srgb, var(--app-text, #1f3447) 28%, transparent) transparent; scrollbar-width: thin; }
body {
    background: var(--app-page, #f4f7fa);
    color: var(--app-text, #1f3447);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--app-primary, #176b87) 22%, transparent); color: var(--app-text, #1f3447); }
* { scrollbar-color: color-mix(in srgb, var(--app-text, #1f3447) 25%, transparent) transparent; scrollbar-width: thin; }
*:focus-visible { outline: 2px solid color-mix(in srgb, var(--app-primary, #176b87) 72%, #fff); outline-offset: 2px; }

body:not(.auth-route) > main.container-fluid { padding: clamp(1rem, 2.2vw, 1.65rem) clamp(.85rem, 2.25vw, 2rem) !important; }

.clinical-settings-page{max-width:1400px;margin:0 auto}.clinical-settings-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:26px 28px;background:linear-gradient(120deg,#073b4c,#0b5966);color:#fff;border-radius:8px;margin-bottom:18px}.clinical-settings-hero h1{font-size:30px;margin:3px 0 6px}.clinical-settings-hero p{margin:0;color:#cbe2e3}.clinical-pack-state{display:flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid #ffffff35;border-radius:7px;color:#d9e9ea}.clinical-pack-state.is-on{background:#25a18e;color:#fff;border-color:#25a18e}.clinical-settings-band{background:var(--app-surface,#fff);border:1px solid var(--app-border,#dbe4ea);padding:22px;border-radius:8px}.clinical-settings-band .form-switch{display:flex;align-items:flex-start;gap:10px;padding:0 0 18px 42px;border-bottom:1px solid var(--app-border,#dbe4ea)}.clinical-settings-band .form-switch small{display:block;color:#64748b;margin-top:3px}.clinical-base-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:18px}.clinical-base-grid label>span{display:block;font-weight:700;font-size:13px;margin-bottom:7px}.clinical-capability-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:16px}.clinical-capability-card{display:grid;grid-template-columns:auto 42px 1fr;gap:11px;align-items:start;background:var(--app-surface,#fff);border:1px solid var(--app-border,#dbe4ea);border-radius:8px;padding:16px;cursor:pointer;min-height:118px}.clinical-capability-card:has(input:checked){border-color:var(--app-primary,#176b87);box-shadow:inset 3px 0 var(--app-primary,#176b87)}.clinical-capability-card input{margin-top:6px}.clinical-capability-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:7px;background:color-mix(in srgb,var(--app-primary,#176b87) 12%,#fff);color:var(--app-primary,#176b87)}.clinical-capability-card strong,.clinical-capability-card small,.clinical-capability-card em{display:block}.clinical-capability-card small{color:#64748b;line-height:1.45;margin-top:4px}.clinical-capability-card em{font-size:11px;color:#b45309;font-style:normal;font-weight:700;margin-top:7px}.clinical-settings-actions{position:sticky;bottom:12px;display:flex;justify-content:flex-end;padding:14px 0;z-index:5}@media(max-width:1050px){.clinical-base-grid{grid-template-columns:repeat(2,1fr)}.clinical-capability-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.clinical-settings-hero{align-items:flex-start;flex-direction:column}.clinical-base-grid,.clinical-capability-grid{grid-template-columns:1fr}}
main h1 { color: var(--app-text, #1f3447); font-size: clamp(1.42rem, 2vw, 1.85rem); font-weight: 720; line-height: 1.2; }
main h2 { color: var(--app-text, #1f3447); font-weight: 690; }
.eyebrow { color: var(--app-primary, #176b87); font-size: .67rem; font-weight: 760; letter-spacing: .085em; text-transform: uppercase; }
.text-muted,.form-text { color: color-mix(in srgb, var(--app-text, #1f3447) 61%, transparent) !important; }

.app-navbar {
    backdrop-filter: saturate(1.08);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--app-nav-text, #fff) 12%, transparent), 0 8px 24px color-mix(in srgb, var(--app-nav, #153b52) 13%, transparent);
    min-height: 58px;
    position: sticky;
    top: 0;
    z-index: 1040;
}
.app-navbar .container-fluid { min-height: 44px; padding-left: clamp(.8rem, 1.8vw, 1.5rem); padding-right: clamp(.8rem, 1.8vw, 1.5rem); }
.app-brand-lockup { font-size: .98rem; gap: .62rem; letter-spacing: 0; }
.app-brand-lockup img,.app-brand-mark { border-radius: var(--operigent-radius-sm); height: 32px; width: 34px; }
.app-primary-menu { gap: .15rem; }
.app-navbar .navbar-nav .nav-link { align-items: center; border-radius: var(--operigent-radius-sm); display: flex; font-size: .82rem; font-weight: 590; min-height: 36px; padding: .45rem .65rem; }
.app-navbar .navbar-nav .nav-link:hover,.app-navbar .navbar-nav .nav-link:focus,.app-navbar .navbar-nav .show > .nav-link { background: color-mix(in srgb, var(--app-nav-text, #fff) 10%, transparent); }
.navbar-workspace-search-trigger { border-radius: var(--operigent-radius-sm); min-height: 36px; }
.notification-button,.profile-menu-button { border-radius: var(--operigent-radius-sm); min-height: 36px; }
.profile-avatar { border-radius: var(--operigent-radius-sm); }

.btn {
    align-items: center;
    border-radius: var(--operigent-radius-sm);
    display: inline-flex;
    font-size: .8rem;
    font-weight: 650;
    gap: .4rem;
    justify-content: center;
    letter-spacing: 0;
    min-height: 38px;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}
.btn-sm { font-size: .73rem; min-height: 32px; }
.btn-lg { font-size: .9rem; min-height: 46px; }
.btn-primary { box-shadow: 0 4px 12px color-mix(in srgb, var(--app-primary, #176b87) 18%, transparent); color: var(--app-primary-contrast, #fff); }
.btn-primary:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--app-primary, #176b87) 24%, transparent); transform: translateY(-1px); }
.btn:active { box-shadow: none; transform: translateY(0); }
.btn-light,.btn-outline-secondary { background: var(--app-surface, #fff); border-color: var(--app-border, #d9e3eb); color: var(--app-text, #1f3447); }
.btn-light:hover,.btn-outline-secondary:hover { background: color-mix(in srgb, var(--app-primary, #176b87) 6%, var(--app-surface, #fff)); border-color: color-mix(in srgb, var(--app-primary, #176b87) 25%, var(--app-border, #d9e3eb)); color: var(--app-primary, #176b87); }
.btn-link { color: var(--app-primary, #176b87); text-decoration: none; }
.icon-btn {
    align-items: center;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-sm);
    color: color-mix(in srgb, var(--app-text, #1f3447) 72%, transparent);
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.icon-btn:hover,.icon-btn:focus { background: color-mix(in srgb, var(--app-primary, #176b87) 8%, var(--app-surface, #fff)); border-color: color-mix(in srgb, var(--app-primary, #176b87) 30%, var(--app-border, #d9e3eb)); color: var(--app-primary, #176b87); }
.icon-btn:active { transform: scale(.96); }

.form-label { color: color-mix(in srgb, var(--app-text, #1f3447) 82%, transparent); font-size: .74rem; font-weight: 680; margin-bottom: .38rem; }
.form-control,.form-select,.input-group-text {
    background-color: var(--app-form-background, var(--app-surface, #fff));
    border-color: var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-sm);
    color: var(--app-form-text, var(--app-text, #1f3447));
    min-height: var(--operigent-control-height);
}
.form-control::placeholder { color: color-mix(in srgb, var(--app-form-text, var(--app-text, #1f3447)) 43%, transparent); }
.form-control:hover,.form-select:hover { border-color: color-mix(in srgb, var(--app-primary, #176b87) 26%, var(--app-border, #d9e3eb)); }
.form-control:focus,.form-select:focus { background-color: var(--app-form-background, var(--app-surface, #fff)); border-color: var(--app-primary, #176b87); box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-primary, #176b87) 13%, transparent); color: var(--app-form-text, var(--app-text, #1f3447)); }
.form-check-input { border-color: color-mix(in srgb, var(--app-text, #1f3447) 28%, var(--app-border, #d9e3eb)); }
.form-check-input:checked { background-color: var(--app-primary, #176b87); border-color: var(--app-primary, #176b87); }
.form-switch .form-check-input { min-height: 20px; width: 36px; }

.card,.config-panel,.dashboard-section,.workspace-search-head,.workspace-search-results,
.report-builder-panel,.module-builder-panel,.record-view-block {
    background: var(--app-surface, #fff);
    border-color: var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-md);
    box-shadow: var(--operigent-shadow-sm);
    color: var(--app-text, #1f3447);
}
.card-header,.card-footer { background: color-mix(in srgb, var(--app-page, #f4f7fa) 45%, var(--app-surface, #fff)); border-color: var(--app-border, #d9e3eb); }
.card-header:first-child { border-radius: var(--operigent-radius-md) var(--operigent-radius-md) 0 0; }

.table-responsive { border-radius: var(--operigent-radius-sm); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--app-text, #1f3447); --bs-table-border-color: var(--app-border, #d9e3eb); color: var(--app-text, #1f3447); margin-bottom: 0; }
.table > :not(caption) > * > * { border-bottom-color: var(--app-border, #d9e3eb); padding: .7rem .75rem; vertical-align: middle; }
.table thead th { background: color-mix(in srgb, var(--app-page, #f4f7fa) 62%, var(--app-surface, #fff)); color: color-mix(in srgb, var(--app-text, #1f3447) 75%, transparent); font-size: .66rem; font-weight: 760; letter-spacing: .045em; text-transform: uppercase; }
.table tbody tr { transition: background-color .13s ease; }
.table tbody tr:hover > * { background: color-mix(in srgb, var(--app-primary, #176b87) 4.5%, var(--app-surface, #fff)); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: color-mix(in srgb, var(--app-page, #f4f7fa) 40%, transparent); color: var(--app-text, #1f3447); }

.nav-tabs { border-bottom-color: var(--app-border, #d9e3eb); gap: .15rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: color-mix(in srgb, var(--app-text, #1f3447) 62%, transparent); font-size: .78rem; font-weight: 650; padding: .68rem .78rem; }
.nav-tabs .nav-link:hover { background: color-mix(in srgb, var(--app-primary, #176b87) 5%, transparent); color: var(--app-primary, #176b87); }
.nav-tabs .nav-link.active { background: transparent; border-bottom-color: var(--app-primary, #176b87); color: var(--app-primary, #176b87); }
.nav-pills { background: color-mix(in srgb, var(--app-page, #f4f7fa) 72%, var(--app-surface, #fff)); border: 1px solid var(--app-border, #d9e3eb); border-radius: var(--operigent-radius-sm); gap: .2rem; padding: .25rem; }
.nav-pills .nav-link { border-radius: var(--operigent-radius-xs); color: color-mix(in srgb, var(--app-text, #1f3447) 68%, transparent); font-size: .76rem; font-weight: 650; }

.dropdown-menu {
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-md);
    box-shadow: var(--operigent-shadow-md);
    color: var(--app-text, #1f3447);
    padding: .4rem;
}
.dropdown-item { border-radius: var(--operigent-radius-xs); color: var(--app-text, #1f3447); font-size: .78rem; min-height: 34px; padding: .48rem .6rem; }
.dropdown-item:hover,.dropdown-item:focus { background: color-mix(in srgb, var(--app-primary, #176b87) 8%, var(--app-surface, #fff)); color: var(--app-primary, #176b87); }
.dropdown-divider { border-color: var(--app-border, #d9e3eb); margin: .35rem 0; }
.dropdown-header { color: color-mix(in srgb, var(--app-text, #1f3447) 55%, transparent); font-size: .64rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }

.modal-backdrop.show { opacity: .38; }
.modal-content { background: var(--app-surface, #fff); border: 1px solid var(--app-border, #d9e3eb); border-radius: var(--operigent-radius-md); box-shadow: 0 28px 80px rgba(12, 28, 40, .24); color: var(--app-text, #1f3447); overflow: hidden; }
.modal-header,.modal-footer { background: color-mix(in srgb, var(--app-page, #f4f7fa) 45%, var(--app-surface, #fff)); border-color: var(--app-border, #d9e3eb); padding: .9rem 1rem; }
.modal-body { padding: 1rem; }
.modal-title { color: var(--app-text, #1f3447); font-weight: 700; }
.btn-close { border-radius: var(--operigent-radius-xs); }

.alert { align-items: flex-start; border-radius: var(--operigent-radius-sm); font-size: .78rem; }
.badge { border-radius: 999px; font-size: .64rem; font-weight: 720; letter-spacing: .015em; padding: .32rem .5rem; }
.pagination { gap: .2rem; }
.page-link { background: var(--app-surface, #fff); border-color: var(--app-border, #d9e3eb); border-radius: var(--operigent-radius-xs) !important; color: var(--app-text, #1f3447); font-size: .75rem; min-width: 34px; text-align: center; }
.page-link:hover { background: color-mix(in srgb, var(--app-primary, #176b87) 8%, var(--app-surface, #fff)); border-color: color-mix(in srgb, var(--app-primary, #176b87) 25%, var(--app-border, #d9e3eb)); color: var(--app-primary, #176b87); }

.dashboard-command-header {
    border: 1px solid var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-md);
    padding: 1rem 1.1rem;
}
.dashboard-command-title { min-width: 0; }
.dashboard-command-title h1 { margin-bottom: .18rem; }
.dashboard-command-title p { max-width: 760px; }
.dashboard-toolbar { flex-shrink: 0; }
@media (max-width: 767.98px) {
    .dashboard-command-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .8rem;
        padding: .9rem;
    }
    .dashboard-toolbar {
        flex-wrap: wrap;
        width: 100%;
    }
}
.dashboard-context-bar,.dashboard-space-tabs,.dashboard-lens-switcher { border-radius: var(--operigent-radius-md); }
.dashboard-space-tabs a,.dashboard-lens-switcher button { border-radius: var(--operigent-radius-sm); }
.dashboard-ai-brief { border-radius: var(--operigent-radius-md); box-shadow: 0 10px 28px color-mix(in srgb, var(--app-nav, #153b52) 16%, transparent); }
.dashboard-ai-command,.dashboard-ai-response,.dashboard-adaptive-strip,.dashboard-next-actions,.dashboard-attention-board,.dashboard-calendar,.dashboard-flow-lane,.dashboard-widget,.dashboard-decision-widget { border-radius: var(--operigent-radius-md); box-shadow: var(--operigent-shadow-sm); }
.dashboard-widget,.dashboard-decision-widget { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.dashboard-widget:hover,.dashboard-decision-widget:hover { border-color: color-mix(in srgb, var(--app-primary, #176b87) 22%, var(--app-border, #d9e3eb)); box-shadow: 0 8px 24px color-mix(in srgb, var(--app-text, #1f3447) 8%, transparent); }
.dashboard-widget-head { background: color-mix(in srgb, var(--app-page, #f4f7fa) 42%, var(--app-surface, #fff)); border-color: var(--app-border, #d9e3eb); }
.dashboard-kpi { color: var(--app-text, #1f3447); font-weight: 740; letter-spacing: 0; }
.record-list-header { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.record-list-header > div:first-child { min-width: 0; }
.record-list-header-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

/* Consistent form rhythm across operational, admin, record, and modal screens. */
.form-control:not(.form-control-color),
.form-select {
    padding-block: max(.48rem, calc(var(--app-form-padding, 10px) * .65));
    padding-inline: max(.7rem, var(--app-form-padding, 10px));
}
.form-control-sm:not(.form-control-color),
.form-select-sm {
    min-height: 34px;
    padding-block: max(.36rem, calc(var(--app-form-padding, 10px) * .5));
    padding-inline: max(.58rem, calc(var(--app-form-padding, 10px) * .75));
}
textarea.form-control { line-height: 1.5; padding-block: max(.62rem, calc(var(--app-form-padding, 10px) * .75)); }
.input-group-text { padding: .48rem .72rem; }
.form-text { line-height: 1.45; margin-top: .38rem; }
.form-check-label,
label.form-check > span:not(.form-check-input) {
    line-height: 1.4;
    padding-inline-start: .14rem;
}
.form-check-input {
    height: 1rem;
    min-height: 1rem;
    width: 1rem;
}
.form-switch { min-height: 24px; }
.form-switch .form-check-input { margin-top: .1rem; }
body[data-form-style="notebook"] .form-control:not(.form-control-color),
body[data-form-style="notebook"] .form-select {
    padding-inline: 0;
}

/* Weekly availability is a working control, so its label needs a real hit area. */
.booking-hours > .dashboard-section-head { margin: 0 !important; padding: .85rem 1rem; }
.booking-hours-row { min-height: 58px; padding: .55rem .85rem; }
.booking-hours-row .form-switch {
    align-items: center;
    background: color-mix(in srgb, var(--app-page, #f4f7fa) 48%, var(--app-surface, #fff));
    border: 1px solid var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-sm);
    display: flex;
    gap: .6rem;
    margin: 0;
    min-height: 40px;
    padding: .45rem .65rem;
}
.booking-hours-row .form-switch .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}
.booking-hours-row .form-check-label {
    font-size: .76rem;
    font-weight: 680;
    padding: 0;
}
@media (max-width: 575.98px) {
    .booking-hours-row {
        grid-template-columns: 1fr minmax(90px, 1fr) auto minmax(90px, 1fr);
        padding: .65rem;
    }
    .booking-hours-row .form-switch { grid-column: 1 / -1; }
}
@media (max-width: 1450px) {
    .work-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .work-view-tabs {
        max-width: 100%;
        overflow-x: auto;
    }
    .work-filters {
        min-width: 0;
        width: 100%;
    }
}

/* Large view designer navigation and space management. */
.view-record-preview {
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.designer-position-control {
    align-items: end;
    background: color-mix(in srgb, var(--app-primary, #176b87) 4%, var(--app-surface, #fff));
    border: 1px solid var(--app-border, #d9e3eb);
    border-radius: var(--operigent-radius-sm);
    display: grid;
    gap: .45rem;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(94px, .55fr) minmax(170px, 1.45fr) auto;
    padding: .65rem;
}
.designer-position-control > span {
    align-self: center;
    color: color-mix(in srgb, var(--app-text, #1f3447) 66%, transparent);
    font-size: .68rem;
    font-weight: 760;
    text-transform: uppercase;
}
.designer-header-compact-toggle {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 38px;
    padding-inline: .55rem;
    gap: .4rem;
}
.view-designer-modal.is-header-compact .view-designer-settings,
.view-designer-modal.is-header-compact .record-title-builder {
    display: none;
}
.view-designer-modal.is-header-compact .view-designer-header {
    min-height: 48px;
    padding-block: .45rem;
}
.view-designer-modal.is-header-compact .view-designer-header .eyebrow { display: none; }
.view-designer-modal.is-header-compact .view-designer-header .h4 { font-size: .9rem; }
.view-designer-modal.is-header-compact .view-designer-actions { padding-block: .42rem; }
@media (max-width: 720px) {
    .designer-position-control {
        grid-template-columns: 1fr 1fr;
    }
    .designer-position-control > span { grid-column: 1 / -1; }
}

body[data-theme-mode="dark"] { color-scheme: dark; }
body[data-theme-mode="dark"] .btn-close { filter: invert(1) grayscale(1); }
body[data-theme-mode="dark"] .card-header,body[data-theme-mode="dark"] .card-footer,
body[data-theme-mode="dark"] .modal-header,body[data-theme-mode="dark"] .modal-footer,
body[data-theme-mode="dark"] .table thead th,body[data-theme-mode="dark"] .dashboard-widget-head {
    background: color-mix(in srgb, var(--app-surface, #162033) 82%, #000);
}
body[data-theme-mode="dark"] .btn-light,body[data-theme-mode="dark"] .btn-outline-secondary,body[data-theme-mode="dark"] .icon-btn,
body[data-theme-mode="dark"] .page-link { background: var(--app-surface, #162033); color: var(--app-text, #e6edf7); }
body[data-theme-mode="dark"] .table tbody tr:hover > * { background: color-mix(in srgb, var(--app-primary, #68a9ff) 8%, var(--app-surface, #162033)); }

@media (max-width: 991.98px) {
    .app-navbar { position: relative; }
    .app-navbar .navbar-collapse { padding: .6rem 0 .75rem; }
    .app-primary-menu { gap: .2rem; }
    .app-navbar .navbar-nav .nav-link { padding-left: .55rem; }
}
@media (min-width: 992px) and (max-width: 1500px) {
    .app-navbar .container-fluid { padding-left: .7rem; padding-right: .7rem; }
    .app-primary-menu { gap: 0; }
    .app-navbar .navbar-nav .nav-link { font-size: .75rem; gap: .35rem; padding: .4rem .48rem; }
    .navbar-workspace-search { flex: 0 0 38px; margin-left: .35rem; margin-right: .45rem; width: 38px; }
    .navbar-workspace-search-trigger { justify-content: center; padding: 0; width: 38px; }
    .navbar-workspace-search-panel { right: -96px; }
    .profile-menu-button { padding-left: .42rem; padding-right: .42rem; }
    .profile-menu-button .profile-name,.profile-menu-button > .bi-chevron-down { display: none; }
}
@media (max-width: 767.98px) {
    body:not(.auth-route) > main.container-fluid { padding: .85rem .7rem 1.25rem !important; }
    main h1 { font-size: 1.35rem; }
    .table > :not(caption) > * > * { padding: .58rem .6rem; }
    .modal-dialog { margin: .55rem; }
    .modal-header,.modal-footer,.modal-body { padding: .8rem; }
    .btn { min-height: 36px; }
    .record-list-header { align-items: stretch; flex-direction: column; gap: .75rem; }
    .record-list-header-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .record-list-header-actions .btn { font-size: .7rem; min-width: 0; padding-left: .45rem; padding-right: .45rem; }
}
/* Inbound email routing */
.inbound-email-admin{display:grid;gap:18px}.inbound-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:4px 2px}.inbound-head h1{margin:2px 0 4px;font-size:1.75rem}.inbound-head p{margin:0;color:var(--muted-color,#667085);max-width:760px}.inbound-head-actions{display:flex;gap:8px;flex-wrap:wrap}.inbound-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.inbound-stats article{display:flex;align-items:center;gap:12px;background:var(--card-bg,#fff);border:1px solid var(--border-color,#e4e7ec);padding:14px 16px;border-radius:8px;box-shadow:0 3px 12px rgba(16,24,40,.04)}.inbound-stats article>i{display:grid;place-items:center;width:36px;height:36px;border-radius:7px;background:color-mix(in srgb,var(--primary-color,#465fff) 12%,transparent);color:var(--primary-color,#465fff);font-size:1.05rem}.inbound-stats b,.inbound-stats small{display:block}.inbound-stats b{font-size:1.25rem;line-height:1.1}.inbound-stats small{color:var(--muted-color,#667085);margin-top:3px}.inbound-panel{background:var(--card-bg,#fff);border:1px solid var(--border-color,#e4e7ec);border-radius:8px;overflow:hidden}.inbound-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;border-bottom:1px solid var(--border-color,#e4e7ec)}.inbound-panel-head h2{font-size:1rem;margin:0 0 3px}.inbound-panel-head p{font-size:.84rem;color:var(--muted-color,#667085);margin:0}.inbound-mailbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}.inbound-mailbox{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;border:1px solid var(--border-color,#e4e7ec);border-radius:7px;padding:14px}.inbound-mailbox.is-muted{opacity:.66}.inbound-mailbox-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:7px;background:color-mix(in srgb,var(--primary-color,#465fff) 10%,var(--card-bg,#fff));color:var(--primary-color,#465fff)}.inbound-mailbox h3{font-size:.94rem;margin:0}.inbound-mailbox p{margin:3px 0;color:var(--body-color,#344054)}.inbound-mailbox small,.inbound-mailbox em{display:block;color:var(--muted-color,#667085);font-size:.77rem;font-style:normal}.inbound-mailbox em{margin-top:7px}.inbound-cron{display:flex;align-items:center;gap:10px;border-top:1px solid var(--border-color,#e4e7ec);padding:10px 18px;background:color-mix(in srgb,var(--body-bg,#f7f8fa) 75%,transparent)}.inbound-cron span,.inbound-cron small{display:block}.inbound-cron small{color:var(--muted-color,#667085)}.inbound-empty{display:grid;justify-items:center;text-align:center;padding:30px 20px;color:var(--muted-color,#667085)}.inbound-empty>i{font-size:1.6rem;color:var(--primary-color,#465fff);margin-bottom:8px}.inbound-empty strong,.inbound-empty span{display:block}.inbound-empty.compact{padding:20px}.inbound-table{margin:0}.inbound-table th{font-size:.72rem;text-transform:uppercase;color:var(--muted-color,#667085);background:color-mix(in srgb,var(--body-bg,#f7f8fa) 75%,transparent);white-space:nowrap}.inbound-table td{font-size:.84rem}.inbound-table td strong,.inbound-table td small{display:block}.inbound-table td small{color:var(--muted-color,#667085);margin-top:3px}.inbound-action-chips{display:flex;gap:4px;flex-wrap:wrap}.inbound-action-chips span{font-size:.72rem;padding:3px 6px;border:1px solid var(--border-color,#e4e7ec);border-radius:4px;background:var(--body-bg,#f7f8fa)}.inbound-log-filters{display:flex;gap:6px}.inbound-token-alert{display:flex;align-items:center;justify-content:space-between;gap:20px}.inbound-token-alert small{display:block;margin-top:3px}.inbound-token-alert .input-group{max-width:430px}.inbound-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}.inbound-form-grid .span-2{grid-column:1/-1}.inbound-form-grid .form-label{margin:0;font-size:.78rem;font-weight:600}.inbound-form-grid .form-label small{display:block;font-weight:400;color:var(--muted-color,#667085);margin-top:4px}.inbound-form-grid .form-check{margin:5px 0}.inbound-rule-step{display:grid;grid-template-columns:32px 1fr;gap:14px;padding:5px 2px 20px}.inbound-rule-step+section{border-top:1px solid var(--border-color,#e4e7ec);padding-top:20px}.inbound-rule-step>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--primary-color,#465fff);color:#fff;font-weight:700;font-size:.78rem}.inbound-rule-step h3{font-size:1rem;margin:3px 0}.inbound-rule-step>div>p{font-size:.82rem;color:var(--muted-color,#667085);margin:0 0 14px}.inbound-action-config{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.inbound-action-config article{border:1px solid var(--border-color,#e4e7ec);border-radius:7px;padding:12px}.inbound-action-config .form-check>span{display:grid;grid-template-columns:auto 1fr;gap:0 8px}.inbound-action-config .form-check i{grid-row:1/3;color:var(--primary-color,#465fff)}.inbound-action-config .form-check strong,.inbound-action-config .form-check small{display:block}.inbound-action-config .form-check small{font-size:.75rem;color:var(--muted-color,#667085);font-weight:400}.inbound-action-config [data-action-panel]{border-top:1px solid var(--border-color,#e4e7ec);margin-top:10px;padding-top:10px}.inbound-action-config .nested{margin:10px 0}.inbound-action-config [hidden]{display:none!important}
@media(max-width:900px){.inbound-stats{grid-template-columns:repeat(2,1fr)}.inbound-mailbox-grid,.inbound-action-config{grid-template-columns:1fr}.inbound-head{align-items:flex-start;flex-direction:column}.inbound-token-alert{align-items:stretch;flex-direction:column}.inbound-token-alert .input-group{max-width:none}}
@media(max-width:575px){.inbound-stats,.inbound-form-grid{grid-template-columns:1fr}.inbound-form-grid .span-2{grid-column:auto}.inbound-head-actions{width:100%}.inbound-head-actions .btn{flex:1}.inbound-log-filters{width:100%;flex-wrap:wrap}.inbound-panel-head{align-items:flex-start;flex-direction:column}}
.inbound-webhook-setup{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid color-mix(in srgb,var(--primary-color,#465fff) 25%,var(--border-color,#e4e7ec));border-radius:7px;background:color-mix(in srgb,var(--primary-color,#465fff) 5%,var(--card-bg,#fff))}.inbound-webhook-setup>i{font-size:1.25rem;color:var(--primary-color,#465fff)}.inbound-webhook-setup p{margin:3px 0 9px;color:var(--muted-color,#667085);font-size:.8rem}.inbound-webhook-setup[hidden],[data-imap-settings][hidden]{display:none!important}
.report-runtime-sort{display:flex;align-items:center;justify-content:space-between;gap:8px;color:inherit;text-decoration:none;white-space:nowrap}.report-runtime-sort i{font-size:.72rem;opacity:.55}.report-runtime-sort:hover,.report-runtime-sort:focus{color:var(--primary-color,#465fff)}.report-runtime-sort:hover i,.report-runtime-sort:focus i,.report-runtime-sort-table th[aria-sort]:not([aria-sort="none"]) i{opacity:1;color:var(--primary-color,#465fff)}.report-runtime-sort-table th:has(.report-runtime-sort):hover{background:color-mix(in srgb,var(--primary-color,#465fff) 7%,var(--body-bg,#f7f8fa))}
[data-report-client-sort] thead th[role="button"]{cursor:pointer;user-select:none}[data-report-client-sort] thead th[role="button"]:hover,[data-report-client-sort] thead th[role="button"]:focus{color:var(--primary-color,#465fff);background:color-mix(in srgb,var(--primary-color,#465fff) 7%,var(--body-bg,#f7f8fa));outline:none}.report-client-sort-icon{font-size:.72rem;margin-left:7px;opacity:.55}[data-report-client-sort] th[aria-sort]:not([aria-sort="none"]) .report-client-sort-icon{opacity:1;color:var(--primary-color,#465fff)}
.report-column-head{display:flex;align-items:center;gap:4px;min-width:max-content}.report-column-head .report-runtime-sort{flex:1}.report-column-filter-toggle{display:inline-grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border:1px solid color-mix(in srgb,var(--border-color,#dce1e8) 76%,transparent);border-radius:5px;background:color-mix(in srgb,var(--primary-color,#465fff) 4%,var(--surface-color,#fff));color:var(--muted-color,#697386);opacity:.78;transition:background .15s ease,color .15s ease,opacity .15s ease}.report-column-head:hover .report-column-filter-toggle,.report-column-filter-toggle:focus,.report-column-filter-toggle.is-active,[data-report-client-sort] th:hover>.report-column-filter-toggle,[data-report-client-filter] th:hover>.report-column-filter-toggle{opacity:1}.report-column-filter-toggle:hover,.report-column-filter-toggle:focus,.report-column-filter-toggle.is-active{border-color:color-mix(in srgb,var(--primary-color,#465fff) 30%,var(--border-color,#dce1e8));background:color-mix(in srgb,var(--primary-color,#465fff) 11%,transparent);color:var(--primary-color,#465fff);outline:none}.report-column-filter-menu{position:fixed;z-index:1095;max-height:min(420px,calc(100vh - 24px));overflow:auto;padding:14px;background:var(--surface-color,#fff);color:var(--text-color,#172033);border:1px solid var(--border-color,#dce1e8);border-radius:7px;box-shadow:0 16px 42px rgba(20,31,53,.2);text-align:left;font-weight:400;white-space:normal}.report-column-filter-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.report-column-filter-title strong{font-size:.88rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-column-filter-menu .form-label{font-size:.72rem;font-weight:700;color:var(--muted-color,#697386);text-transform:uppercase}.report-column-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border-color,#e5e8ee)}.report-client-filter-toggle{margin-left:5px;vertical-align:middle}.report-client-filter-popover{width:290px}.report-client-filter-values{max-height:210px;overflow:auto;border:1px solid var(--border-color,#e5e8ee);border-radius:5px;padding:4px}.report-client-filter-choice{display:flex;align-items:center;gap:8px;min-height:31px;margin:0;padding:5px 7px;border-radius:4px;font-size:.82rem;font-weight:500;cursor:pointer}.report-client-filter-choice:hover{background:color-mix(in srgb,var(--primary-color,#465fff) 7%,transparent)}.report-client-filter-choice input{margin:0}.report-client-filter-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-mission-strip{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:16px 18px;border:1px solid color-mix(in srgb,var(--primary-color,#465fff) 22%,var(--border-color,#dbe3ee));border-left:4px solid var(--primary-color,#465fff);border-radius:var(--operigent-radius-md,8px);background:color-mix(in srgb,var(--primary-color,#465fff) 5%,var(--card-bg,#fff));box-shadow:var(--operigent-shadow-sm)}.dashboard-mission-identity{display:flex;align-items:flex-start;gap:13px;min-width:0}.dashboard-mission-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:7px;background:var(--primary-color,#465fff);color:#fff}.dashboard-mission-identity h2{margin:2px 0 3px;font-size:1rem;line-height:1.35}.dashboard-mission-identity small{display:block;color:var(--muted-color,#667085)}.dashboard-mission-state{display:flex;align-items:stretch;border:1px solid var(--border-color,#dbe3ee);border-radius:7px;overflow:hidden;background:var(--card-bg,#fff)}.dashboard-mission-state>span{display:grid;align-content:center;min-width:105px;padding:8px 12px;border-left:1px solid var(--border-color,#dbe3ee)}.dashboard-mission-state>span:first-child{border-left:0}.dashboard-mission-state small{font-size:.65rem;text-transform:uppercase;color:var(--muted-color,#667085);font-weight:700}.dashboard-mission-state strong{font-size:.82rem}.dashboard-mission-state strong b{font-size:.65rem;color:var(--muted-color,#667085)}.dashboard-mission-evidence{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:8px}.dashboard-goal-progress,.dashboard-pulse-stat{display:grid;gap:5px;padding:10px 12px;border:1px solid var(--border-color,#dbe3ee);border-radius:7px;background:var(--card-bg,#fff);color:inherit;text-decoration:none}.dashboard-goal-progress{grid-template-columns:minmax(0,1fr) auto}.dashboard-goal-progress>span{grid-column:1/-1}.dashboard-goal-progress strong,.dashboard-goal-progress small,.dashboard-pulse-stat small,.dashboard-pulse-stat strong,.dashboard-pulse-stat span{display:block}.dashboard-goal-progress small,.dashboard-pulse-stat small,.dashboard-pulse-stat span{font-size:.68rem;color:var(--muted-color,#667085)}.dashboard-goal-progress>div{height:5px;border-radius:4px;background:var(--body-bg,#eef1f5);overflow:hidden}.dashboard-goal-progress>div i{display:block;height:100%;background:var(--primary-color,#465fff)}.dashboard-goal-progress>b{font-size:.72rem}.dashboard-pulse-stat{grid-template-columns:1fr auto}.dashboard-pulse-stat strong{font-size:1.25rem}.dashboard-pulse-stat span{grid-column:1/-1}.dashboard-pulse-stat span.is-up{color:#15803d}.dashboard-pulse-stat span.is-down{color:#b42318}.dashboard-attention-item{border-bottom:1px solid var(--border-color,#edf2f7)}.dashboard-attention-item>a{border-bottom:0}.dashboard-attention-item details{margin:0 4px 7px 48px;font-size:.7rem;color:var(--muted-color,#64748b)}.dashboard-attention-item details div{display:flex;flex-wrap:wrap;gap:5px 12px;padding-top:5px}.dashboard-attention-item details span{display:flex;gap:4px}.dashboard-mission-settings{display:grid}.dashboard-mission-goals-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:20px 0 9px}.dashboard-mission-goals-head small{display:block;color:var(--muted-color,#667085);font-size:.72rem}.dashboard-mission-goals{display:grid;gap:8px}.dashboard-mission-goal-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(210px,1.35fr) 105px 90px 34px;gap:7px;align-items:center}.dashboard-mission-scoring{margin-top:16px;padding:11px 13px;border:1px solid var(--border-color,#dbe3ee);border-radius:7px}.dashboard-mission-scoring summary{font-weight:700;cursor:pointer}.dashboard-mission-scoring summary i{margin-right:7px;color:var(--primary-color,#465fff)}
.modal-dialog-scrollable .dashboard-config-modal{display:flex;flex-direction:column;max-height:calc(100vh - 2rem);overflow:hidden}.modal-dialog-scrollable .dashboard-config-modal>form{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden}.modal-dialog-scrollable .dashboard-config-modal>form>.modal-header{flex:0 0 auto}.modal-dialog-scrollable .dashboard-config-modal>form>.modal-body{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.modal-dialog-scrollable .dashboard-config-modal>.modal-footer{flex:0 0 auto;background:var(--card-bg,#fff)}

/* Clinic edition: bright, calm and high-contrast operational theme. */
body[data-theme-key="clinical_calm"] {
    --clinic-blue: #316f91;
    --clinic-green: #34765d;
    --clinic-coral: #c85f4c;
    --clinic-gold: #9a7427;
    --app-muted: #61757a;
    --app-surface-muted: #f7faf9;
    background: var(--app-page);
    color: var(--app-text);
}

body[data-theme-key="clinical_calm"] .app-navbar {
    border-bottom: 1px solid #d6e5e2;
    box-shadow: 0 4px 18px rgb(28 69 73 / 8%);
}

body[data-theme-key="clinical_calm"] .app-brand-lockup {
    color: #173f45 !important;
}

body[data-theme-key="clinical_calm"] .app-brand-mark {
    border-color: color-mix(in srgb, var(--app-primary) 25%, white);
    background: color-mix(in srgb, var(--app-primary) 10%, white);
    color: var(--app-primary);
}

body[data-theme-key="clinical_calm"] .app-navbar .navbar-nav .nav-link:hover,
body[data-theme-key="clinical_calm"] .app-navbar .navbar-nav .nav-link:focus,
body[data-theme-key="clinical_calm"] .app-navbar .navbar-nav .show > .nav-link {
    background: #edf7f5;
    color: #075f5b !important;
}

body[data-theme-key="clinical_calm"] .app-navbar .profile-menu-button,
body[data-theme-key="clinical_calm"] .app-navbar .notification-button,
body[data-theme-key="clinical_calm"] .app-navbar .navbar-workspace-search-trigger {
    border-color: #d2e2df;
    background: #f6faf9;
}

body[data-theme-key="clinical_calm"] main.container-fluid {
    padding-left: clamp(1rem, 2.2vw, 2rem);
    padding-right: clamp(1rem, 2.2vw, 2rem);
}

body[data-theme-key="clinical_calm"] .dashboard-command-header {
    border: 1px solid #d4e4e1;
    border-left: 4px solid var(--app-primary);
    background: #fff;
    box-shadow: 0 6px 20px rgb(31 77 78 / 6%);
}

body[data-theme-key="clinical_calm"] .dashboard-command-header .eyebrow,
body[data-theme-key="clinical_calm"] .eyebrow {
    color: #08746f;
}

body[data-theme-key="clinical_calm"] .dashboard-space-tabs a.active {
    border-color: #0a716d;
    background: #e4f2f0;
    color: #16484d;
}

body[data-theme-key="clinical_calm"] .dashboard-space-tabs a.active small {
    background: #cce5e1;
    color: #24585b;
}

body[data-theme-key="clinical_calm"] .dashboard-lens-switcher {
    border-color: #d3e3e0;
    background: #fff;
    box-shadow: 0 3px 12px rgb(30 71 74 / 5%);
}

body[data-theme-key="clinical_calm"] .dashboard-lens-switcher button.active {
    background: var(--app-primary);
    color: #fff;
}

body[data-theme-key="clinical_calm"] .dashboard-lens-switcher button.active > i,
body[data-theme-key="clinical_calm"] .dashboard-lens-switcher button.active span,
body[data-theme-key="clinical_calm"] .dashboard-lens-switcher button.active small {
    color: #fff;
}

body[data-theme-key="clinical_calm"] .dashboard-kpi-strip > * {
    border-color: #d9e7e4;
    background: #fff;
}

body[data-theme-key="clinical_calm"] .dashboard-kpi-strip > :nth-child(4n + 1) i { color: var(--app-primary); background: #e7f3f1; }
body[data-theme-key="clinical_calm"] .dashboard-kpi-strip > :nth-child(4n + 2) i { color: var(--clinic-blue); background: #eaf2f7; }
body[data-theme-key="clinical_calm"] .dashboard-kpi-strip > :nth-child(4n + 3) i { color: var(--clinic-green); background: #eaf4ef; }
body[data-theme-key="clinical_calm"] .dashboard-kpi-strip > :nth-child(4n + 4) i { color: var(--clinic-coral); background: #faeeeb; }

body[data-theme-key="clinical_calm"] .dashboard-calendar,
body[data-theme-key="clinical_calm"] .dashboard-widget,
body[data-theme-key="clinical_calm"] .dashboard-flow-lane,
body[data-theme-key="clinical_calm"] .workspace-section,
body[data-theme-key="clinical_calm"] .config-panel,
body[data-theme-key="clinical_calm"] .record-pinned-summary {
    border-color: #d5e4e1;
    box-shadow: 0 6px 22px rgb(31 70 74 / 6%);
}

body[data-theme-key="clinical_calm"] .dashboard-calendar-toolbar,
body[data-theme-key="clinical_calm"] .external-booking-queue > header {
    background: #f8fbfa;
}

body[data-theme-key="clinical_calm"] .form-control,
body[data-theme-key="clinical_calm"] .form-select,
body[data-theme-key="clinical_calm"] .select2-selection {
    border-color: #cbdedb;
    background-color: #fff;
}

body[data-theme-key="clinical_calm"] .form-control:hover,
body[data-theme-key="clinical_calm"] .form-select:hover {
    border-color: #91bcb7;
}

body[data-theme-key="clinical_calm"] .form-control:focus,
body[data-theme-key="clinical_calm"] .form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgb(8 124 119 / 13%);
}

body[data-theme-key="clinical_calm"] .btn-primary {
    border-color: #08716d;
    background: #087c77;
    box-shadow: 0 3px 9px rgb(8 124 119 / 16%);
}

body[data-theme-key="clinical_calm"] .btn-primary:hover,
body[data-theme-key="clinical_calm"] .btn-primary:focus {
    border-color: #065c59;
    background: #066b67;
}

body[data-theme-key="clinical_calm"] .badge.text-bg-warning {
    background: #fff1d6 !important;
    color: #7a5310 !important;
}

body[data-theme-key="clinical_calm"] .record-page-header h1,
body[data-theme-key="clinical_calm"] .dashboard-command-header h1,
body[data-theme-key="clinical_calm"] .dashboard-command-header h2 {
    color: #193b42;
}

body[data-theme-key="clinical_calm"] .table > thead > tr > th {
    border-bottom-color: #bfd6d2;
    background: #edf6f4;
    color: #244a50;
}

.booking-public-page {
    background: #f1f7f6;
}

.booking-public-shell {
    border-color: #ccdedb;
    box-shadow: 0 22px 54px rgb(28 69 73 / 13%);
}

.booking-public-intro {
    border-top: 5px solid #e48a73;
    background: #0b6f6b;
}

.booking-public-intro .eyebrow,
.booking-public-intro dt {
    color: #cfe9e5;
}

.booking-public-picker {
    background: #fff;
}

.booking-public-picker .form-control,
.booking-public-picker .form-select {
    border-color: #c9dcda;
    background: #fbfdfd;
}

.booking-public-picker .form-control:focus,
.booking-public-picker .form-select:focus {
    border-color: #087c77;
    box-shadow: 0 0 0 3px rgb(8 124 119 / 13%);
}

.booking-slot-card span {
    color: #0a6b67;
}

@media (max-width: 767px) {
    body[data-theme-key="clinical_calm"] main.container-fluid { padding-left: .75rem; padding-right: .75rem; }
    body[data-theme-key="clinical_calm"] .dashboard-command-header { border-left-width: 3px; }
}
@media(max-width:900px){.dashboard-mission-strip{grid-template-columns:1fr}.dashboard-mission-state{width:100%}.dashboard-mission-state>span{flex:1;min-width:0}.dashboard-mission-goal-row{grid-template-columns:1fr 1fr}.dashboard-mission-goal-row .icon-btn{justify-self:end}}@media(max-width:575px){.dashboard-mission-state{display:grid;grid-template-columns:1fr}.dashboard-mission-state>span{border-left:0;border-top:1px solid var(--border-color,#dbe3ee)}.dashboard-mission-state>span:first-child{border-top:0}.dashboard-mission-goal-row{grid-template-columns:1fr}.dashboard-mission-goal-row .icon-btn{justify-self:start}}
.clinical-dental-chart{border:1px solid var(--border-color,#d7e4e1);background:var(--surface,#fff);border-radius:8px;overflow:hidden;margin-bottom:1rem}.clinical-dental-chart>header{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:12px 14px;background:#edf7f4;border-bottom:1px solid #d3e7e1}.clinical-dental-chart>header small{display:block;color:#4d716b;font-size:.68rem;font-weight:700}.clinical-dental-chart>header h3{font-size:1rem;margin:2px 0 0;color:#173f3a}.clinical-chart-legend{display:flex;gap:10px;flex-wrap:wrap;font-size:.72rem}.clinical-chart-legend span:before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;background:#cbd8d5}.clinical-chart-legend .is-alert:before{background:#d76a5f}.clinical-chart-legend .is-planned:before{background:#d9a73b}.clinical-chart-legend .is-complete:before{background:#3b9a7e}.clinical-dental-chart-body{padding:14px;overflow-x:auto}.clinical-dental-arch{display:grid;grid-template-columns:repeat(16,minmax(34px,1fr));gap:5px;min-width:650px}.clinical-tooth{position:relative;border:1px solid #d7e3e0;background:#fff;color:#4a625e;border-radius:6px;padding:6px 2px 5px;display:grid;place-items:center;gap:2px}.clinical-tooth-shape{font-size:1.15rem;color:#a4b8b4}.clinical-tooth strong{font-size:.68rem}.clinical-tooth.is-alert{background:#fff4f2;border-color:#e5a29b}.clinical-tooth.is-alert .clinical-tooth-shape{color:#c9574e}.clinical-tooth.is-planned{background:#fff9e9;border-color:#e4c16d}.clinical-tooth.is-planned .clinical-tooth-shape{color:#b88418}.clinical-tooth.is-complete{background:#eff9f5;border-color:#8ecab8}.clinical-tooth.is-complete .clinical-tooth-shape{color:#268369}.clinical-tooth.is-muted{background:#f1f3f3;border-style:dashed}.clinical-tooth-dot{position:absolute;right:2px;top:2px;min-width:14px;height:14px;border-radius:7px;background:#173f3a;color:#fff;font-size:.58rem;display:grid;place-items:center}.clinical-bite-line{display:flex;align-items:center;gap:8px;min-width:650px;margin:8px 0;color:#78908c;font-size:.6rem}.clinical-bite-line i{height:1px;background:#d6e3e0;flex:1}.clinical-arch-label{text-align:center;color:#68817c;font-size:.7rem;margin:4px 0}.clinical-dental-chart>footer{display:flex;justify-content:space-between;gap:1rem;padding:9px 14px;background:#fafcfc;border-top:1px solid #e1eae8;color:#667d79;font-size:.72rem}@media(max-width:720px){.clinical-dental-chart>header,.clinical-dental-chart>footer{align-items:flex-start;flex-direction:column}}
.clinical-channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.clinical-channel-grid>article{border:1px solid var(--border-color,#d5e0e4);background:var(--surface,#fff);padding:14px;border-radius:8px;display:grid;gap:10px}.clinical-channel-grid label:not(.form-check){display:grid;gap:4px;font-size:.78rem;font-weight:600}@media(max-width:900px){.clinical-channel-grid{grid-template-columns:1fr}}

/* Client dental forms and interactive odontogram. */
.odontogram-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;border-bottom:1px solid #e1eae8;background:#fbfdfd}.odontogram-arch{display:grid;grid-template-columns:repeat(16,minmax(42px,1fr));gap:4px;min-width:760px;align-items:end}.odontogram-arch[data-dentition="primary"]{grid-template-columns:repeat(10,minmax(48px,1fr));max-width:720px;margin:auto;min-width:560px}.odontogram-tooth{border:0;background:transparent;padding:3px;display:flex;flex-direction:column;align-items:center;gap:2px;color:#48615d}.odontogram-number{font-size:.7rem;font-weight:700}.odontogram-glyph{position:relative;display:block;width:42px;height:59px}.odontogram-glyph svg{width:100%;height:100%;overflow:visible}.odontogram-glyph .tooth-crown{fill:#fff;stroke:#9db3af;stroke-width:1.5;transition:.18s ease}.odontogram-glyph .tooth-line{fill:none;stroke:#d4dfdd;stroke-width:1}.odontogram-tooth:hover .tooth-crown,.odontogram-tooth:focus .tooth-crown{stroke:#1e7468;stroke-width:2}.odontogram-glyph.is-alert .tooth-crown{fill:#ffe4e0;stroke:#d15b50}.odontogram-glyph.is-planned .tooth-crown{fill:#fff1bd;stroke:#ba8416}.odontogram-glyph.is-complete .tooth-crown{fill:#d8f1e8;stroke:#2e8b71}.odontogram-glyph.is-muted .tooth-crown{fill:#ecefef;stroke:#8c9997;stroke-dasharray:3 2}.odontogram-glyph.is-existing .tooth-crown{fill:#e5effb;stroke:#5d82af}.odontogram-glyph i{position:absolute;width:8px;height:8px;border-radius:50%;right:1px;top:1px;background:#173f3a;border:2px solid #fff}.odontogram-dialog{border:0;border-radius:12px;padding:0;box-shadow:0 20px 70px rgba(15,47,43,.3);width:min(760px,calc(100vw - 24px))}.odontogram-dialog::backdrop{background:rgba(16,38,35,.55)}.odontogram-dialog-shell>header,.odontogram-dialog-shell>footer{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#edf7f4;border-bottom:1px solid #d3e7e1}.odontogram-dialog-shell>footer{justify-content:flex-end;gap:8px;border:0;border-top:1px solid #d3e7e1}.odontogram-dialog-shell h4{margin:2px 0 0}.odontogram-dialog-shell small{color:#4d716b;font-weight:700}.odontogram-dialog-body{display:flex;gap:24px;padding:20px}.odontogram-surface-picker{position:relative;width:170px;min-width:170px;height:170px;border-radius:50%;background:#f7fbfa;border:1px solid #dce9e6}.odontogram-surface-picker label{position:absolute}.odontogram-surface-picker input{position:absolute;opacity:0}.odontogram-surface-picker span{display:grid;place-items:center;width:46px;height:46px;border-radius:10px;border:1px solid #aac1bc;background:#fff;font-weight:700;cursor:pointer}.odontogram-surface-picker input:checked+span{background:#287e70;color:#fff;border-color:#287e70}.surface-b{top:8px;left:61px}.surface-l{bottom:8px;left:61px}.surface-m{left:8px;top:61px}.surface-d{right:8px;top:61px}.surface-o{left:61px;top:61px}.odontogram-feedback{min-height:22px;margin:0;padding:0 20px 8px}
.client-clinical-form,.orthodontic-exam{border:1px solid #d7e4e1;border-radius:9px;background:#fff;overflow:hidden}.client-form-header{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 16px;background:#edf7f4;border-bottom:1px solid #d3e7e1}.client-form-header small{display:block;color:#4d716b;font-size:.68rem;font-weight:700}.client-form-header h3{font-size:1.05rem;margin:2px 0 0;color:#173f3a}.client-form-tabs{display:flex;gap:3px;overflow-x:auto;padding:10px 12px 0;border-bottom:1px solid #dae7e4;background:#fafcfc}.client-form-tabs button{white-space:nowrap;border:0;border-bottom:3px solid transparent;background:transparent;padding:10px 13px;color:#647b77;font-weight:600}.client-form-tabs button.is-active{border-bottom-color:#26796d;color:#17574e}.client-form-panel{display:none;padding:18px}.client-form-panel.is-active{display:block}.client-form-panel h4,.orth-section-title{font-size:.9rem;color:#285e56;font-weight:700;margin:3px 0 12px}.client-chip-grid{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.client-chip-grid input{position:absolute;opacity:0}.client-chip-grid span{display:inline-flex;border:1px solid #bed3ce;border-radius:18px;padding:6px 11px;color:#42615d;background:#fff;cursor:pointer}.client-chip-grid input:checked+span{background:#287e70;border-color:#287e70;color:#fff}.client-clinical-form>form>footer,.orthodontic-footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;background:#fafcfc;border-top:1px solid #e1eae8}.client-form-table{font-size:.82rem}.client-form-table th{color:#42615d;background:#f7faf9}.client-repeat-card{position:relative;border:1px solid #dce8e5;border-radius:8px;padding:16px;margin-bottom:12px}.client-repeat-number{position:absolute;right:10px;top:8px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#e7f3f0;color:#27675d;font-weight:700}.client-repeat-remove{margin-top:10px}.orthodontic-summary{padding:16px;background:#fcfefe}.orthodontic-tabs{padding-bottom:0}.orth-empty-state{text-align:center;padding:36px 20px;color:#647b77}.orth-empty-state i{font-size:2.4rem;color:#4f9187}.orth-empty-state h4{margin:10px 0 6px;color:#285e56}@media(max-width:720px){.odontogram-dialog-body{flex-direction:column}.odontogram-surface-picker{margin:auto}.client-form-header{align-items:flex-start;flex-direction:column}}

/* Bestosys-style side-by-side dental chart. */
.bestosys-chart-workspace{display:grid;grid-template-columns:100px 430px minmax(430px,1fr);min-width:980px;background:#fbfdfd}
.odontogram-tool-palette{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:10px 8px;background:#f4f8f7;border-right:1px solid #d6e4e1}
.odontogram-tool-palette>strong{text-align:center;text-transform:uppercase;color:#57726d;font-size:.66rem;letter-spacing:.08em;margin-bottom:3px}
.odontogram-tool-palette button{border:1px solid transparent;border-radius:7px;background:transparent;color:#536b67;padding:4px 2px;min-height:44px;display:grid;grid-template-columns:28px 1fr;align-items:center;text-align:left;gap:3px}
.odontogram-tool-palette button:hover,.odontogram-tool-palette button.is-active{background:#fff;border-color:#83b9af;color:#175d52;box-shadow:0 2px 7px rgba(25,92,82,.1)}
.odontogram-tool-palette button span{display:grid;place-items:center;width:27px;height:27px;border-radius:5px;background:#fff;border:1px solid #a9bfbb;font-size:.67rem;font-weight:800}
.odontogram-tool-palette button small{font-size:.57rem;line-height:1.05;overflow-wrap:anywhere}
.odontogram-chart-panel{min-width:0;border-right:1px solid #d9e5e3;background:#fff}
.odontogram-chart-panel:last-child{border-right:0}
.odontogram-chart-panel>header{height:62px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 14px;border-bottom:1px solid #e0e9e7;background:#fff}
.odontogram-chart-panel>header small{display:block;color:#79908c;font-size:.59rem;font-weight:700;letter-spacing:.06em}
.odontogram-chart-panel>header h4{font-size:1rem;color:#294d47;margin:2px 0 0}
.odontogram-chart-panel>header>span{font-size:.68rem;color:#738985}
.odontogram-treatment-area{min-width:0;overflow:hidden;background:#f7faf9}
.odontogram-treatment-area>header{height:62px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;border-bottom:1px solid #d9e5e3;background:#edf7f4}
.odontogram-treatment-area>header small{display:block;color:#607b76;font-size:.59rem;font-weight:700;letter-spacing:.06em}.odontogram-treatment-area>header h4{font-size:1rem;color:#294d47;margin:2px 0 0}
.odontogram-add-treatment{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.odontogram-add-treatment i{font-size:1rem}
.odontogram-treatment-strip{display:flex;align-items:stretch;gap:10px;overflow-x:auto;overflow-y:hidden;padding:10px;scrollbar-color:#86aaa3 #e5eeec;scroll-snap-type:x proximity}
.odontogram-treatment-strip>.odontogram-chart-panel{flex:0 0 430px;border:1px solid #d9e5e3;border-radius:8px;overflow:hidden;scroll-snap-align:start;box-shadow:0 2px 8px rgba(31,80,72,.06)}
.odontogram-treatment-strip>.odontogram-chart-panel>header{display:none}
.odontogram-empty-treatment{flex:0 0 430px;min-height:470px;border:1px dashed #aec5c0;border-radius:8px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#718985;text-align:center;padding:30px}
.odontogram-empty-treatment i{font-size:2rem;color:#4b9286;margin-bottom:8px}.odontogram-empty-treatment span{font-size:.72rem;margin-top:4px}
.bestosys-mouth{position:relative;width:min(100%,430px);aspect-ratio:420/470;margin:8px auto 4px}
.bestosys-mouth-guide{position:absolute;inset:4%;width:92%;height:92%;overflow:visible}
.bestosys-mouth-guide ellipse,.bestosys-mouth-guide path{fill:none;stroke:#e3ecea;stroke-width:1}
.bestosys-mouth-guide path{stroke:#edf2f1}
.bestosys-tooth{position:absolute;left:var(--tooth-x);top:var(--tooth-y);transform:translate(-50%,-50%);border:0;background:transparent;width:36px;height:60px;padding:0;color:#617773;z-index:1}
.bestosys-tooth:hover,.bestosys-tooth:focus{z-index:3;outline:0}
.bestosys-tooth-glyph{position:absolute;left:2px;top:0;width:32px;height:44px}
.bestosys-tooth-glyph svg{width:32px;height:44px;overflow:visible;transform:rotate(var(--tooth-rotation));transform-origin:50% 50%}
.bestosys-tooth-glyph .tooth-body{fill:#fff;stroke:#8fa8a3;stroke-width:1.5;transition:.16s ease}
.bestosys-tooth-glyph .tooth-detail{fill:none;stroke:#bdcbc8;stroke-width:1}
.bestosys-tooth:hover .bestosys-tooth-glyph .tooth-body,.bestosys-tooth:focus .bestosys-tooth-glyph .tooth-body{stroke:#197466;stroke-width:2.3;filter:drop-shadow(0 2px 3px rgba(20,94,83,.18))}
.bestosys-tooth-number{position:absolute;left:calc(50% + var(--number-x));top:calc(50% + var(--number-y));transform:translate(-50%,-50%);display:block;min-width:20px;text-align:center;font-size:.55rem;line-height:1;font-weight:700;color:#526b66;background:rgba(255,255,255,.96);border-radius:3px;padding:2px 3px;z-index:3;box-shadow:0 0 0 1px rgba(220,232,229,.65)}
.tooth-tool-tag{position:absolute;left:50%;top:11px;transform:translateX(-50%);z-index:2;display:grid;place-items:center;min-width:18px;height:15px;padding:0 2px;border-radius:4px;background:#214f48;color:#fff;border:1px solid #fff;font-size:.46rem;line-height:1;font-weight:800;box-shadow:0 1px 3px rgba(20,55,50,.22)}
.bestosys-tooth-glyph.is-alert .tooth-body{fill:#f7c5bf;stroke:#c24f46}.bestosys-tooth-glyph.is-alert .tooth-detail{stroke:#c24f46}.bestosys-tooth-glyph.is-alert .tooth-tool-tag{background:#b64038}
.bestosys-tooth-glyph.is-planned .tooth-body{fill:#fff0b5;stroke:#b9871e}.bestosys-tooth-glyph.is-planned .tooth-detail{stroke:#b9871e}.bestosys-tooth-glyph.is-planned .tooth-tool-tag{background:#9b6d0e}
.bestosys-tooth-glyph.is-complete .tooth-body{fill:#cef0e5;stroke:#27866d}.bestosys-tooth-glyph.is-complete .tooth-detail{stroke:#27866d}.bestosys-tooth-glyph.is-complete .tooth-tool-tag{background:#20735d}
.bestosys-tooth-glyph.is-existing .tooth-body{fill:#dfeafb;stroke:#527dad}.bestosys-tooth-glyph.is-existing .tooth-detail{stroke:#527dad}.bestosys-tooth-glyph.is-existing .tooth-tool-tag{background:#456b96}
.bestosys-tooth-glyph.is-muted .tooth-body{fill:#eef1f0;stroke:#7f8e8b;stroke-dasharray:3 2}.bestosys-tooth-glyph.is-muted .tooth-detail{stroke:#6f7d7a;stroke-width:2}.bestosys-tooth-glyph.is-muted .tooth-tool-tag{background:#687673}
.mouth-orientation{position:absolute;top:49%;font-size:.65rem;font-weight:800;color:#8aa09c}.mouth-orientation.is-right{left:2%}.mouth-orientation.is-left{right:2%}
.odontogram-chart-panel>footer{text-align:center;min-height:34px;padding:8px 12px;border-top:1px solid #e4ecea;color:#607975;font-size:.7rem;background:#fbfdfd}
.bestosys-odontogram>.odontogram-toolbar>span{color:#607975;font-size:.72rem}
@media(max-width:1100px){.bestosys-chart-workspace{grid-template-columns:100px 430px minmax(430px,1fr)}}
@media(max-width:720px){.bestosys-chart-workspace{grid-template-columns:100px 410px minmax(410px,1fr);min-width:920px}.odontogram-treatment-strip>.odontogram-chart-panel{flex-basis:390px}.odontogram-tool-palette{padding-left:5px;padding-right:5px}.odontogram-tool-palette button{grid-template-columns:25px 1fr}.odontogram-tool-palette button span{width:24px;height:24px}}
.orth-history-control{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;justify-content:flex-end}.orth-history-control label{display:grid;gap:3px;font-size:.7rem;font-weight:700;color:#4d716b}.orth-history-control select{min-width:190px}.orth-tooth-select{border:1px solid #dce8e5;border-radius:8px;padding:10px 12px}.orth-tooth-select legend{float:none;width:auto;margin:0 0 8px;padding:0 4px;font-size:.78rem;font-weight:700;color:#42615d}.orth-tooth-grid{display:grid;grid-template-columns:repeat(16,minmax(31px,1fr));gap:4px;overflow-x:auto}.orth-tooth-grid label{position:relative;min-width:31px}.orth-tooth-grid input{position:absolute;opacity:0}.orth-tooth-grid span{display:grid;place-items:center;min-height:31px;border:1px solid #bed3ce;border-radius:5px;background:#fff;color:#42615d;font-size:.69rem;cursor:pointer}.orth-tooth-grid input:checked+span{background:#287e70;border-color:#287e70;color:#fff}@media(max-width:720px){.orth-history-control{justify-content:flex-start}.orth-history-control select{min-width:0;width:100%}.orth-tooth-grid{grid-template-columns:repeat(8,minmax(31px,1fr));min-width:360px}}
