.workspace.is-clients .view-switcher,
.workspace.is-clients .control-bar,
.workspace.is-clients .status-jump,
.workspace.is-clients .applied-filters { display: none; }
.workspace.is-clients .topbar .create-button { display: none; }

.clients-view { min-height: 0; padding: 0 28px 28px; overflow: hidden; }
.clients-view.is-active { display: flex; }
.clients-shell { width: 100%; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 9px 28px rgba(31,49,62,.045); }
.clients-toolbar { min-height: 66px; display: grid; grid-template-columns: auto minmax(230px, 440px) auto; align-items: center; gap: 16px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.clients-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: #eaf0f2; }
.clients-tabs button { height: 40px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 8px; padding: 0 11px; background: transparent; color: #74818d; cursor: pointer; font-size: 11.5px; font-weight: 760; }
.clients-tabs button svg { width: 16px; height: 16px; }
.clients-tabs button em { min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 999px; padding: 0 6px; background: #dce5e9; color: #687682; font-style: normal; font-size: 9.5px; }
.clients-tabs button.is-active { background: #fff; color: var(--accent-dark); box-shadow: 0 2px 8px rgba(35,53,66,.1); }
.clients-tabs button.is-active em { background: var(--accent); color: #fff; }
.clients-search { height: 42px; display: grid; grid-template-columns: 18px minmax(0,1fr) 28px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 0 7px 0 12px; background: #fff; color: #8b97a2; }
.clients-search:focus-within { border-color: #7db4b7; box-shadow: 0 0 0 3px rgba(20,123,130,.1); }
.clients-search > svg { width: 17px; height: 17px; }
.clients-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12.5px; }
.clients-search button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #929da7; cursor: pointer; }
.clients-search button[hidden] { visibility: hidden; display: grid; }
.clients-search button:hover { background: #eef3f4; color: var(--ink); }
.clients-search button svg { width: 14px; height: 14px; }
.clients-add { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; padding: 0 14px; background: var(--accent); color: #fff; cursor: pointer; font-size: 11.5px; font-weight: 780; box-shadow: 0 5px 13px rgba(20,123,130,.16); }
.clients-add:hover { background: var(--accent-dark); }
.clients-add svg { width: 16px; height: 16px; }

.clients-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(580px, 1.35fr) minmax(370px, .85fr); }
.clients-list-panel { min-width: 0; min-height: 0; border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.clients-list-head { min-height: 39px; display: grid; align-items: center; gap: 12px; padding: 0 35px 0 61px; border-bottom: 1px solid #edf1f3; background: #f7f9fa; color: #929ca6; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.clients-list-head { grid-template-columns: minmax(210px,1.5fr) 74px minmax(130px,.85fr) 100px; }
.clients-list { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d4dde2 transparent; }
.client-list-row { width: 100%; min-height: 69px; display: grid; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #edf1f3; padding: 8px 12px; background: #fff; color: inherit; text-align: left; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.client-list-row.account-row { grid-template-columns: 37px minmax(210px,1.5fr) 74px minmax(130px,.85fr) 100px 15px; }
.client-list-row.contact-row { grid-template-columns: 37px minmax(210px,1.5fr) minmax(130px,.9fr) minmax(145px,1fr) 100px 15px; }
.client-list-row:hover { background: #f7fafb; }
.client-list-row.is-selected { background: #edf6f6; box-shadow: inset 3px 0 var(--accent); }
.client-list-row > svg { width: 15px; height: 15px; color: #a0aab3; }
.client-list-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #e2eaf3; color: #45627b; font-size: 10px; font-weight: 850; }
.client-list-avatar.is-company { border-radius: 10px; background: #dff0ed; color: #3d786c; }
.client-list-avatar svg { width: 17px; height: 17px; }
.client-list-main { min-width: 0; display: grid; gap: 4px; }
.client-list-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.client-list-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8b96a1; font-size: 9.5px; }
.client-list-contacts { display: grid; gap: 2px; text-align: center; }
.client-list-contacts strong { font-size: 13px; }
.client-list-contacts small { color: #929ca5; font-size: 8.5px; }
.client-list-phone, .client-list-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #63717f; font-size: 10.5px; }
.client-list-state { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 5px; }
.client-list-state em, .client-list-state small { color: #7f8c97; font-style: normal; font-size: 8.5px; white-space: nowrap; }
.client-list-state em { border-radius: 999px; padding: 4px 7px; background: #f0f3f5; color: #61707d; font-weight: 750; }
.sla-mark { border-radius: 999px; padding: 4px 7px; background: #e5f2eb; color: #43755c; font-style: normal; font-size: 8.5px; font-weight: 820; }
.clients-empty { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; color: #82909c; text-align: center; }
.clients-empty > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #eaf3f3; color: var(--accent); }
.clients-empty svg { width: 21px; height: 21px; }
.clients-empty h3 { margin: 3px 0 0; color: var(--ink); font-size: 15px; }
.clients-empty p { margin: 0; font-size: 10.5px; }

.client-detail { min-width: 0; min-height: 0; overflow: hidden; background: #fcfdfd; }
.client-detail-scroll { height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d4dde2 transparent; }
.client-profile-head { min-height: 110px; display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 19px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #fff 0 65%, #edf6f5 100%); }
.client-detail-back { display: none; }
.client-profile-avatar { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #e1eaf3; color: #45617a; font-size: 14px; font-weight: 850; }
.client-profile-avatar.is-company { border-radius: 14px; background: #dff0ed; color: #3e796d; }
.client-profile-avatar svg { width: 23px; height: 23px; }
.client-profile-head > div { min-width: 0; }
.client-profile-head p { margin: 0 0 4px; color: var(--accent); text-transform: uppercase; letter-spacing: .09em; font-size: 8px; font-weight: 850; }
.client-profile-head h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 18px; line-height: 1.16; letter-spacing: -.02em; }
.client-profile-head div > span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; color: #7e8995; font-size: 9.5px; }
.client-profile-head div > span i { border-radius: 999px; padding: 3px 6px; background: #e4f1e9; color: #43745b; font-style: normal; font-size: 8px; font-weight: 800; }
.client-profile-actions { display: flex; align-items: center; gap: 7px; }
.client-edit { height: 35px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; color: #65727f; cursor: pointer; font-size: 10px; font-weight: 750; }
.client-edit:hover { border-color: #8ab9bc; color: var(--accent-dark); }
.client-edit svg, .client-delete-request svg { width: 14px; height: 14px; }
.client-delete-request { height: 35px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e7c9c6; border-radius: 9px; padding: 0 10px; background: #fff7f6; color: #a6534e; cursor: pointer; font-size: 10px; font-weight: 750; }
.client-delete-request:hover { border-color: #d99e99; background: #fff1ef; }
.client-delete-request:disabled { cursor: wait; opacity: .62; }
.client-detail-tabs { min-height: 48px; display: flex; align-items: end; gap: 3px; padding: 7px 16px 0; border-bottom: 1px solid var(--line); background: #fff; overflow-x: auto; scrollbar-width: none; }
.client-detail-tabs button { height: 40px; border: 0; border-bottom: 2px solid transparent; padding: 0 10px; background: transparent; color: #84909b; cursor: pointer; white-space: nowrap; font-size: 10.5px; font-weight: 730; }
.client-detail-tabs button.is-active { border-bottom-color: var(--accent); color: var(--accent-dark); }
.client-detail-content { display: grid; gap: 13px; padding: 15px 17px 25px; }
.contact-detail-content { padding-top: 18px; }
.client-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.client-info-field { min-width: 0; min-height: 63px; display: grid; align-content: center; gap: 5px; border: 1px solid #e5eaed; border-radius: 10px; padding: 10px 11px; background: #fff; }
.client-info-field.is-wide { grid-column: 1 / -1; }
.client-info-field > span { color: #929ca6; font-size: 8.5px; }
.client-info-field strong { overflow-wrap: anywhere; color: #3c4b59; font-size: 10.5px; line-height: 1.45; }
.client-info-field strong.is-empty { color: #a6afb7; font-weight: 550; }
.client-employee-person { min-width: 0; display: flex; align-items: center; gap: 8px; }
.client-employee-person > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-employee-avatar { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dfe8ee; color: #516b7c; font-size: 7px; font-weight: 850; }
.client-employee-avatar > img { object-position: center 28%; }
.client-info-field ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.client-info-field li { padding-left: 13px; position: relative; }
.client-info-field li::before { content: ''; position: absolute; left: 0; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.client-sla-card { min-height: 73px; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid #cfe5d7; border-radius: 12px; padding: 11px 13px; background: linear-gradient(120deg, #f5fbf7, #edf7f1); }
.client-sla-card > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #dceee3; color: #4a7a5e; }
.client-sla-card svg { width: 17px; height: 17px; }
.client-sla-card div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; }
.client-sla-card small { color: #64806f; font-size: 8.5px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.client-sla-card strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #365f49; font-size: 14px; }
.client-sla-card em { color: #7d9284; font-style: normal; font-size: 8.5px; }
.client-detail-section { border: 1px solid #e4eaed; border-radius: 11px; background: #fff; overflow: hidden; }
.client-detail-section > header { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-bottom: 1px solid #edf1f3; }
.client-detail-section h3 { margin: 0; font-size: 10.5px; }
.client-detail-section header > span, .client-section-actions > span { min-width: 21px; height: 20px; display: grid; place-items: center; border-radius: 999px; padding: 0 6px; background: #e8f2f2; color: var(--accent-dark); font-size: 8.5px; font-weight: 800; }
.client-section-actions { display: flex; align-items: center; gap: 6px; }
.client-section-actions button { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #d7e4e5; border-radius: 7px; padding: 0; background: #f4f9f9; color: var(--accent); cursor: pointer; }
.client-section-actions button:hover { border-color: #a8cbcd; background: #e7f3f3; }
.client-section-actions button:focus-visible { outline: 2px solid rgba(37,122,128,.3); outline-offset: 2px; }
.client-section-actions button svg { width: 13px; height: 13px; }
.client-related-list, .client-task-list, .client-link-list { display: grid; }
.client-related-list button, .client-task-list button { min-height: 50px; display: grid; grid-template-columns: 31px minmax(0,1fr) 14px; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #edf1f3; padding: 7px 10px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.client-task-list button { grid-template-columns: minmax(0,1fr) auto 14px; }
.client-related-list button:last-child, .client-task-list button:last-child { border-bottom: 0; }
.client-related-list button:hover, .client-task-list button:hover { background: #f7fafb; }
.client-related-list button > svg, .client-task-list button > svg { width: 14px; height: 14px; color: #a1abb4; }
.client-related-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e2eaf3; color: #48647d; font-size: 8.5px; font-weight: 850; }
.client-related-avatar.is-company { border-radius: 8px; background: #dff0ed; color: #3e796d; }
.client-related-avatar svg { width: 14px; height: 14px; }
.client-related-list button > span:nth-child(2), .client-task-list button > span { min-width: 0; display: grid; gap: 3px; }
.client-related-list strong, .client-task-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.client-related-list small, .client-task-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8e99a3; font-size: 8.5px; }
.client-empty-copy { margin: 0; padding: 15px 12px; color: #8d98a2; font-size: 9.5px; }
.client-description { margin: 0; padding: 12px; color: #5f6c79; white-space: pre-wrap; line-height: 1.55; font-size: 10px; }
.client-link-list a, .client-link-list > span { min-height: 41px; display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: center; gap: 8px; border-bottom: 1px solid #edf1f3; padding: 7px 11px; color: var(--accent-dark); text-decoration: none; font-size: 9.5px; }
.client-link-list > :last-child { border-bottom: 0; }
.client-link-list svg { width: 14px; height: 14px; }
.client-link-list span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-detail-empty { height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; padding: 35px; color: #8a96a0; text-align: center; }
.client-detail-empty > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #e9f3f3; color: var(--accent); }
.client-detail-empty svg { width: 24px; height: 24px; }
.client-detail-empty h2 { margin: 4px 0 0; color: var(--ink); font-size: 16px; }
.client-detail-empty p { margin: 0; font-size: 10px; }

.client-dialog { width: min(820px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); border: 0; border-radius: 17px; padding: 0; color: var(--ink); box-shadow: 0 26px 80px rgba(20,35,48,.28); overflow: hidden; }
.client-dialog::backdrop { background: rgba(18,30,40,.48); backdrop-filter: blur(3px); }
.client-dialog form { height: min(760px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; background: #fff; }
.client-dialog-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.client-dialog-head h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.client-dialog-tabs { min-height: 50px; display: flex; align-items: end; gap: 4px; padding: 5px 15px 0; border-bottom: 1px solid var(--line); background: #f8fafb; overflow-x: auto; scrollbar-width: none; }
.client-dialog-tabs[hidden] { display: none; }
.client-dialog-tabs button { height: 44px; border: 0; border-bottom: 2px solid transparent; padding: 0 13px; background: transparent; color: #7f8b96; cursor: pointer; white-space: nowrap; font-size: 11px; font-weight: 750; }
.client-dialog-tabs button.is-active { border-bottom-color: var(--accent); color: var(--accent-dark); }
.client-form-error { min-height: 0; margin: 0; padding: 0 18px; background: #fff3f1; color: #a34f49; font-size: 10.5px; }
.client-form-error:not(:empty) { min-height: 38px; display: flex; align-items: center; border-bottom: 1px solid #efd2ce; padding-top: 8px; padding-bottom: 8px; }
.client-form-body { min-height: 0; overflow-y: auto; padding: 18px; scrollbar-width: thin; scrollbar-color: #d4dde2 transparent; }
.client-form-pane { display: none; }
.client-form-pane.is-active { display: block; }
.client-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.client-form-field { min-width: 0; display: grid; align-content: start; gap: 7px; color: #586674; font-size: 10.5px; font-weight: 720; }
.client-form-field.is-wide { grid-column: 1 / -1; }
.client-form-field > span > span { color: #bd5752; }
.client-form-field input, .client-form-field textarea { width: 100%; border: 1px solid #d5dde3; border-radius: 10px; outline: 0; padding: 0 11px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; transition: border .15s ease, box-shadow .15s ease; }
.client-form-field input { height: 43px; }
.client-form-field textarea { min-height: 82px; padding-top: 10px; line-height: 1.45; resize: vertical; }
.client-form-field input:focus, .client-form-field textarea:focus { border-color: #75b0b3; box-shadow: 0 0 0 3px rgba(20,123,130,.1); }
.client-form-field > small { color: #929da7; font-size: 8.5px; font-weight: 550; }
.client-inn-control { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.client-inn-control > input { min-width: 0; }
.client-inn-control > button { min-height: 43px; border: 1px solid #9fc9cc; border-radius: 10px; padding: 0 12px; background: #eaf5f5; color: var(--accent-dark); cursor: pointer; white-space: nowrap; font-size: 10px; font-weight: 780; }
.client-inn-control > button:hover { border-color: #75b0b3; background: #dff0f0; }
.client-inn-control > button:disabled { opacity: .58; cursor: wait; }
.client-switch-field { min-height: 56px; display: flex; align-items: center; gap: 11px; border: 1px solid #dce4e8; border-radius: 11px; padding: 9px 11px; background: #fafcfc; cursor: pointer; }
.client-switch-field.is-wide { grid-column: 1 / -1; }
.client-switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.client-switch-field > i { width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; padding: 3px; background: #cfd8de; transition: background .15s ease; }
.client-switch-field > i::after { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23,40,53,.22); transition: transform .15s ease; }
.client-switch-field input:checked + i { background: var(--accent); }
.client-switch-field input:checked + i::after { transform: translateX(16px); }
.client-switch-field input:focus-visible + i { outline: 3px solid rgba(20,123,130,.15); }
.client-switch-field > span { display: grid; gap: 3px; }
.client-switch-field strong { color: #4f5d6a; font-size: 10.5px; }
.client-switch-field small { color: #8f9aa4; font-size: 8.5px; }
.client-choice-field { min-width: 0; border: 0; margin: 0; padding: 0; }
.client-choice-field.is-wide { grid-column: 1 / -1; }
.client-choice-field legend { margin-bottom: 7px; color: #586674; font-size: 10.5px; font-weight: 720; }
.client-choice-field > div { display: flex; flex-wrap: wrap; gap: 6px; }
.client-choice-field button { min-height: 35px; border: 1px solid #d8e0e5; border-radius: 9px; padding: 0 11px; background: #fff; color: #71808c; cursor: pointer; font-size: 9.5px; font-weight: 680; }
.client-choice-field button:hover { background: #f5f8f9; }
.client-choice-field button.is-active { border-color: #86b9bc; background: #e9f4f4; color: var(--accent-dark); font-weight: 780; }
.client-account-editor { gap: 9px; }
.client-account-relations { display: grid; gap: 7px; }
.client-account-relations > p { margin: 0; border: 1px dashed #d5dee4; border-radius: 10px; padding: 13px; color: #929da7; font-size: 9.5px; font-weight: 550; }
.client-account-relation { min-height: 48px; display: grid; grid-template-columns: 31px minmax(150px,1fr) minmax(140px,.7fr) 31px; align-items: center; gap: 8px; border: 1px solid #e0e6ea; border-radius: 10px; padding: 6px 7px; background: #fff; }
.client-account-relation strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #43515e; font-size: 10px; }
.client-account-relation input { height: 34px; font-size: 10px; }
.client-account-relation > button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #8b97a2; cursor: pointer; }
.client-account-relation > button:hover { background: #fff0ee; color: #b5544f; }
.client-account-relation > button svg { width: 14px; height: 14px; }
.client-account-combo { position: relative; }
.client-account-combo > label { height: 42px; display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: center; gap: 8px; border: 1px solid #d5dde3; border-radius: 10px; padding: 0 11px; color: #8c98a3; }
.client-account-combo > label:focus-within { border-color: #75b0b3; box-shadow: 0 0 0 3px rgba(20,123,130,.1); }
.client-account-combo svg { width: 16px; height: 16px; }
.client-account-combo input { height: auto; border: 0; outline: 0; box-shadow: none; padding: 0; }
.client-account-options { max-height: 210px; display: none; position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 5px); border: 1px solid #d9e1e6; border-radius: 10px; background: #fff; box-shadow: 0 13px 35px rgba(28,46,59,.16); overflow-y: auto; }
.client-account-combo:focus-within .client-account-options { display: block; }
.client-account-options button { width: 100%; min-height: 46px; display: grid; gap: 3px; border: 0; border-bottom: 1px solid #edf1f3; padding: 7px 10px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.client-account-options button:hover { background: #f4f8f8; }
.client-account-options strong { font-size: 10px; }
.client-account-options small { color: #8e99a3; font-size: 8.5px; }
.client-account-options > p { margin: 0; padding: 12px; color: #8e99a3; font-size: 9.5px; font-weight: 550; }
.client-dialog-foot { min-height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--line); background: #f7f9fa; }
.client-dialog-foot button { height: 40px; border: 1px solid #d5dde2; border-radius: 9px; padding: 0 15px; background: #fff; color: #667480; cursor: pointer; font-size: 10.5px; font-weight: 760; }
.client-dialog-foot button.client-save { min-width: 112px; border-color: var(--accent); background: var(--accent); color: #fff; }
.client-dialog-foot button:disabled { opacity: .6; cursor: wait; }

@media (max-width: 1180px) {
  .clients-layout { grid-template-columns: minmax(520px, 1.15fr) minmax(340px,.85fr); }
  .client-list-row.account-row { grid-template-columns: 37px minmax(180px,1.4fr) 58px minmax(110px,.8fr) 90px 15px; }
  .client-list-row.contact-row { grid-template-columns: 37px minmax(185px,1.4fr) minmax(115px,.8fr) 90px 15px; }
  .client-list-email, .clients-list-head span:nth-child(3) { display: none; }
  .clients-list-head { grid-template-columns: minmax(185px,1.4fr) minmax(115px,.8fr) 90px; }
}

@media (max-width: 940px) {
  .clients-toolbar { grid-template-columns: 1fr auto; }
  .clients-search { grid-row: 2; grid-column: 1 / -1; }
  .clients-layout { grid-template-columns: minmax(460px,1fr) minmax(330px,.82fr); }
  .client-list-row.account-row { grid-template-columns: 37px minmax(170px,1fr) 55px 82px 15px; }
  .client-list-phone, .clients-list-head span:nth-child(3) { display: none; }
  .client-list-row.contact-row { grid-template-columns: 37px minmax(170px,1fr) 82px 15px; }
  .clients-list-head { grid-template-columns: minmax(170px,1fr) 82px; }
}

@media (max-width: 760px) {
  .workspace.is-clients .topbar { grid-template-columns: auto 1fr; }
  .workspace.is-clients .topbar .global-search { display: none; }
  .workspace.is-clients .topbar .top-actions { justify-self: end; }
  .workspace.is-clients .page-head { display: none; }
  .clients-view { padding: 0 0 72px; overflow: hidden; }
  .clients-shell { border: 0; border-radius: 0; box-shadow: none; }
  .clients-toolbar { min-height: 124px; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 10px 12px; position: sticky; top: 0; z-index: 3; }
  .clients-tabs { min-width: 0; }
  .clients-tabs button { min-width: 0; flex: 1; padding: 0 8px; }
  .clients-tabs button svg { display: none; }
  .clients-tabs button span { overflow: hidden; text-overflow: ellipsis; }
  .clients-add { display: none; }
  .clients-search { grid-row: 2; grid-column: 1 / -1; }
  .clients-layout { min-height: 0; display: block; position: relative; overflow: hidden; }
  .clients-list-panel { height: 100%; border-right: 0; }
  .clients-list-head { display: none; }
  .client-list-row, .client-list-row.account-row, .client-list-row.contact-row { min-height: 74px; grid-template-columns: 39px minmax(0,1fr) auto 14px; gap: 10px; padding: 8px 12px; }
  .client-list-contacts, .client-list-phone, .client-list-email { display: none; }
  .client-list-state { justify-content: flex-end; }
  .client-list-state small { display: none; }
  .client-detail { position: absolute; z-index: 4; inset: 0; transform: translateX(100%); transition: transform .2s ease; background: #fff; }
  .clients-view.is-detail-open .client-detail { transform: translateX(0); }
  .client-profile-head { min-height: 118px; grid-template-columns: 38px 47px minmax(0,1fr) auto; gap: 9px; padding: 15px 12px; }
  .client-detail-back { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: #eef3f4; color: #657480; }
  .client-detail-back svg { width: 18px; height: 18px; }
  .client-profile-avatar { width: 46px; height: 46px; }
  .client-profile-head h2 { font-size: 16px; }
  .client-profile-actions { gap: 5px; }
  .client-edit, .client-delete-request { width: 36px; padding: 0; justify-content: center; }
  .client-edit span, .client-delete-request span { display: none; }
  .client-detail-tabs { padding-left: 10px; }
  .client-detail-content { padding: 13px 12px 26px; }
  .client-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
  .client-dialog form { height: 100dvh; }
  .client-dialog-head { min-height: 68px; padding: 11px 13px; }
  .client-dialog-head h2 { font-size: 18px; }
  .client-dialog-tabs { padding-left: 8px; }
  .client-dialog-tabs button { padding: 0 10px; }
  .client-form-body { padding: 14px 12px; }
  .client-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .client-form-field.is-wide, .client-switch-field.is-wide, .client-choice-field.is-wide { grid-column: auto; }
  .client-account-relation { grid-template-columns: 31px minmax(0,1fr) 31px; }
  .client-account-relation input { grid-column: 2; }
  .client-account-relation > button { grid-column: 3; grid-row: 1; }
  .client-dialog-foot { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .client-detail { transition: none; }
}
