
.practice-review-table{border:1px solid var(--line,#e1e5ea);border-radius:10px;overflow:hidden}
.practice-review-row{display:grid;grid-template-columns:1.05fr 1fr 1fr 70px;align-items:start;border-top:1px solid var(--line,#e1e5ea);font-size:13px;line-height:1.45}
.practice-review-row:first-child{border-top:0}.practice-review-row>*{padding:10px;min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}.practice-review-head{background:var(--surface-soft,#f1f3f6);font-size:12px;color:var(--muted,#667085)}.practice-review-row input{width:18px;height:18px;accent-color:var(--ink,#202832)}
#practice-review-form .practice-form-footer{gap:10px;flex-wrap:wrap}
@media(max-width:600px){.practice-review-head{display:none}.practice-review-row{grid-template-columns:1fr 1fr auto;gap:2px}.practice-review-row strong{grid-column:1/-1;padding-bottom:0}.practice-review-row span[data-label]::before{content:attr(data-label);display:block;color:var(--muted,#667085);font-size:11px;margin-bottom:3px}.practice-review-row>*{padding:8px}.practice-review-row span:last-child{align-self:center}}
.texts-workspace{display:grid;gap:20px}.texts-workspace>p,.texts-editors p{color:var(--muted,#667085);margin:0}.texts-editors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.texts-editors section,.texts-library{padding:20px;border:1px solid var(--line,#e1e5ea);border-radius:12px;background:var(--paper,#fff)}.texts-editors h3,.texts-library h3{margin:0 0 10px}.texts-editors .btn{margin-top:18px}.texts-filters{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.texts-filters label{display:grid;gap:6px;flex:1;min-width:170px;font-size:13px}.texts-filters input,.texts-filters select{width:100%;min-height:40px}.texts-library-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid var(--line,#e1e5ea)}.texts-library-row[hidden]{display:none}.texts-library-row p{margin:4px 0 0;color:var(--muted,#667085);font-size:13px}@media(max-width:650px){.texts-editors{grid-template-columns:1fr}.texts-library-row{align-items:flex-start;flex-direction:column}}
/* Компоновка подготовки сообщения: получатель, текст и параметры рядом. */
@media(min-width:1100px){
 body.fidelity-cabinet .fclient-message-modal .fclient-client-workspace{display:block}
 body.fidelity-cabinet .fclient-message-modal .fclient-client-workspace>.fclient-client-roster{display:none}
 body.fidelity-cabinet .fclient-message-modal .fclient-client-main{width:100%;max-width:none;padding:16px}
 body.fidelity-cabinet .fclient-message-modal .fclient-message-composition{display:grid;grid-template-columns:minmax(190px,0.85fr) minmax(380px,2fr) minmax(230px,0.95fr);grid-template-areas:'recipient purpose options' 'recipient address options' 'recipient editor options' 'recipient extra options';gap:12px;align-items:start}
 body.fidelity-cabinet .fclient-message-modal .fclient-message-columns{display:contents}
 body.fidelity-cabinet .fclient-message-recipient{grid-area:recipient;align-self:stretch}
 body.fidelity-cabinet .fclient-message-purpose{grid-area:purpose}
 body.fidelity-cabinet .fclient-message-address{grid-area:address}
 body.fidelity-cabinet .fclient-message-editor{grid-area:editor}
 body.fidelity-cabinet .fclient-message-options{grid-area:options;align-self:stretch}
 body.fidelity-cabinet .fclient-message-extra{grid-area:extra}
 body.fidelity-cabinet .fclient-recipient-grid{display:block}
 body.fidelity-cabinet .fclient-recipient-person{display:flex;align-items:center;gap:12px}
 body.fidelity-cabinet .fclient-recipient-context{display:grid;grid-template-columns:1fr;gap:10px;margin-top:16px}
 body.fidelity-cabinet .fclient-message-option-fields{grid-template-columns:1fr}
 body.fidelity-cabinet .fclient-message-option-fields>.field{grid-column:auto}
 body.fidelity-cabinet .fclient-message-purpose .fclient-chip{flex:1 1 115px}
}
.selected-handout-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,0.85fr);align-items:start;gap:16px}.selected-handout-preview{position:sticky;top:12px;min-width:0}.selected-handout-preview h3{margin:0 0 12px}.selected-handout-preview .practice-handout{padding:22px;font-size:13px}.selected-handout-preview .practice-handout h2{font-size:24px}@media(max-width:850px){.selected-handout-layout{grid-template-columns:1fr}.selected-handout-preview{position:static}}
.texts-editors>.texts-editor{padding:20px;border:1px solid var(--line,#e1e5ea);border-radius:12px;background:var(--paper,#fff);min-width:0}.texts-editor h3{margin:0 0 8px}.texts-editor>p{color:var(--muted,#667085);margin:0 0 16px}.texts-editor .formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.texts-editor-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.texts-editor-actions .btn{margin:0}.texts-editor textarea{min-height:160px}.texts-editor [data-selected-apply]{margin-top:8px}@media(max-width:600px){.texts-editor .formgrid{grid-template-columns:1fr}.texts-editor-actions .btn{flex:1 1 auto}}
body.fidelity-cabinet #modal-root .fidelity-dialog:has(.texts-workspace)>.modal-body{display:block;padding:20px;background:var(--d-bg,#f3f5f7)}
body.fidelity-cabinet .fidelity-dialog:has(.texts-workspace) .fidelity-context{display:none}
body.fidelity-cabinet .texts-workspace{max-width:1320px;margin:auto}
body.fidelity-cabinet #modal-root .fidelity-dialog:has(#trash-purge-form)>.modal-body{display:block;max-width:760px;margin:auto;padding:24px}
body.fidelity-cabinet .fidelity-dialog:has(#trash-purge-form) .fidelity-context{display:none}

/* Personal handout: client information and three steps with a live preview. */
#practice-handout-form .selected-handout-layout>.formgrid{display:flex;flex-direction:column;gap:12px;min-width:0}
#practice-handout-form :is(.selected-handout-information,.selected-handout-steps){padding:18px;border:1px solid var(--d-line,#e4e9ef);border-radius:10px;background:var(--d-surface,#fff);min-width:0}
#practice-handout-form :is(.selected-handout-information,.selected-handout-steps)>h3{margin:0 0 14px;font-size:18px;color:var(--d-text,#1b2531)}
#practice-handout-form .selected-handout-information{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#practice-handout-form .selected-handout-information>h3,#practice-handout-form .selected-handout-information>.field:has([name=client_id]),#practice-handout-form .selected-handout-information>.field:has([name=client_notes]){grid-column:1/-1}
#practice-handout-form .selected-handout-information>.field{margin:0;min-width:0}
#practice-handout-form .selected-handout-steps .practice-step{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(140px,1fr) minmax(170px,1.3fr) auto;gap:10px;align-items:start;margin:0 0 10px;padding:12px;border:1px solid var(--d-line,#e4e9ef);border-radius:8px}
#practice-handout-form .selected-handout-steps .practice-step>.field{min-width:0;margin:0}
#practice-handout-form .selected-handout-steps .practice-step legend{padding:0 8px;font-weight:600}
#practice-handout-form .selected-handout-steps .practice-step .update-check{align-self:end}
#practice-handout-form .selected-handout-preview{padding:16px;border:1px solid var(--d-line,#e4e9ef);border-radius:10px;background:var(--d-surface,#fff)}
#practice-handout-preview .practice-handout{border:1px solid var(--d-line,#e4e9ef);border-radius:6px;background:#fff;box-shadow:0 4px 15px #1b25310d}
#practice-handout-preview .practice-handout ol{padding:0;list-style:none;counter-reset:care}
#practice-handout-preview .practice-handout li{counter-increment:care;position:relative;margin:10px 0;padding:12px 12px 12px 48px;background:#faf5ef;border-radius:5px}
#practice-handout-preview .practice-handout li:before{content:counter(care);position:absolute;left:10px;top:12px;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#e8d6c3;color:#1b2531}
#practice-handout-preview .practice-handout li h3{font-size:14px;margin:3px 0}#practice-handout-preview .practice-handout li p{margin:4px 0}
@media(max-width:900px){#practice-handout-form .selected-handout-steps .practice-step{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#practice-handout-form .selected-handout-information,#practice-handout-form .selected-handout-steps .practice-step{grid-template-columns:minmax(0,1fr)}#practice-handout-form .selected-handout-information>*{grid-column:auto!important}}
body.fidelity-cabinet #modal-root .modal:has(#practice-handout-form){width:min(1180px,calc(100vw - 32px));max-width:1180px}
#practice-handout-form .selected-handout-layout>.selected-handout-preview{grid-column:auto!important;width:auto!important;display:block;min-width:0;margin:0}
@media(max-width:850px){body.fidelity-cabinet #modal-root .modal:has(#practice-handout-form){width:100%;max-width:none}}
/* The handout editor keeps the saved version, exports and actual transfer together. */
#practice-handout-form .selected-handout-tabs{display:none}
#practice-handout-form .selected-handout-transfer,#practice-handout-form .selected-handout-actions{padding:16px;border:1px solid var(--d-line,#e4e9ef);border-radius:10px;background:var(--d-surface,#fff)}
#practice-handout-form .selected-handout-transfer h3,#practice-handout-form .selected-handout-actions h3{margin:0 0 12px;font-size:17px}
#practice-handout-form .selected-handout-transfer-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#practice-handout-form .selected-handout-transfer-fields .field{margin:0;min-width:0}
#practice-handout-form .selected-handout-transfer-fields .field:has(textarea){grid-column:1/-1}
#practice-handout-form .selected-handout-transfer>.btn{margin-top:12px}
#practice-handout-form .selected-handout-actions{margin-top:14px;padding:12px 0 0;border:0;border-top:1px solid var(--d-line,#e4e9ef)}
#practice-handout-form .selected-handout-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#practice-handout-form .selected-handout-action-grid button{white-space:normal}
#practice-handout-form .selected-handout-actions button:disabled,#practice-handout-form .selected-handout-transfer button:disabled{opacity:.48;cursor:not-allowed}
#practice-handout-preview .practice-eyebrow{color:#9b7a58;letter-spacing:.06em}
#practice-handout-preview .practice-handout h2{margin:.2em 0}
#practice-handout-preview .practice-handout footer{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;border-top:1px solid #dedee0;margin-top:20px;padding-top:14px}
#practice-handout-preview .practice-handout footer h3,#practice-handout-preview .practice-handout footer p{margin:0;font-size:12px}
@media(max-width:850px){
 #practice-handout-form .selected-handout-tabs{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;margin-bottom:12px;background:#edf0f3;border-radius:9px}
 #practice-handout-form .selected-handout-tabs button{padding:10px;border:0;border-radius:7px;background:transparent;color:#1c2631;font:inherit;cursor:pointer}
 #practice-handout-form .selected-handout-tabs button[aria-selected=true]{background:#202a34;color:#fff}
 #practice-handout-form[data-handout-tab=editor] .selected-handout-preview{display:none}
 #practice-handout-form[data-handout-tab=preview] .selected-handout-layout>.formgrid{display:none}
 #practice-handout-form[data-handout-tab=preview] .selected-handout-layout>.selected-handout-preview{display:block}
 #practice-handout-form[data-handout-tab=preview] .practice-form-footer{display:none}
}
@media(max-width:600px){#practice-handout-form .selected-handout-transfer-fields{grid-template-columns:1fr 1fr}#practice-handout-form .selected-handout-transfer-fields .field:has(textarea){grid-column:1/-1}}
#practice-link-form .selected-preferences-links{padding:15px;border:1px solid var(--d-line,#e4e9ef);border-radius:10px;background:var(--d-surface,#fff)}
#practice-link-form .selected-preferences-links h3{margin:0 0 10px;font-size:16px}
/* Personal preference form, links and consultant review share one workspace. */
body.fidelity-cabinet #modal-root .modal:has(.selected-preferences-workspace){width:min(1420px,calc(100vw - 32px));max-width:1420px}
.selected-preferences-workspace{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(220px,.72fr) minmax(310px,1fr);gap:14px;align-items:start}
.selected-preferences-workspace>section,.selected-preferences-workspace>#practice-link-form{padding:18px;min-width:0;border:1px solid var(--d-line,#e4e9ef);border-radius:10px;background:var(--d-surface,#fff)}
.selected-preferences-workspace h3{margin:0 0 12px;font-size:18px}
.selected-preferences-workspace #practice-link-form>.formgrid{display:flex;flex-direction:column;gap:12px}
.selected-preferences-workspace #practice-link-form>.formgrid>.field{margin:0;min-width:0}
.selected-preferences-workspace #practice-link-form>.practice-form-footer button{width:100%}
.selected-preferences-preview .practice-eyebrow{color:#957451;font-size:11px}
.selected-preferences-sample{display:grid;gap:8px;margin-top:18px}
.selected-preferences-sample>div{display:grid;grid-template-columns:minmax(90px,1fr) minmax(100px,1.5fr);gap:8px;align-items:center;font-size:12px;color:#273444}
.selected-preferences-sample-field{height:30px;border:1px solid #d9e0e7;border-radius:5px;background:#fafbfc}
.selected-preferences-review #practice-review-form>.formgrid{display:block}
.selected-preferences-review .practice-review-table{width:100%;overflow-x:auto}
.selected-preferences-review .practice-form-footer{display:grid;gap:8px;margin-top:12px}
.selected-preferences-review .practice-form-footer button{width:100%}
.selected-preferences-review>label{display:block;margin:0 0 10px}
.selected-preferences-review>label select{display:block;width:100%;margin-top:6px}
@media(max-width:1000px){.selected-preferences-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.selected-preferences-review{grid-column:1/-1}}
@media(max-width:650px){body.fidelity-cabinet #modal-root .modal:has(.selected-preferences-workspace){width:100%;max-width:none}.selected-preferences-workspace{grid-template-columns:1fr}.selected-preferences-review{grid-column:auto}.selected-preferences-sample>div{grid-template-columns:minmax(110px,1fr) minmax(130px,1.4fr)}}
