.team-workspace .employee-heading {align-items:center;margin-bottom:28px}
.team-workspace .team-card-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:16px}
.team-workspace .employee-card {display:flex;flex-direction:column;margin:0;padding:22px;border-radius:26px;background:var(--surface);border:1px solid var(--line)}
.team-workspace .employee-card-summary {display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;padding:0;align-items:start}
.team-workspace .employee-state {grid-column:2;display:flex;max-width:none;justify-content:flex-start;align-items:flex-start;flex-direction:row;flex-wrap:wrap;gap:6px}
.team-workspace .employee-summary-copy {min-width:0}
.team-workspace .employee-summary-copy strong {font-size:18px}
.team-workspace .employee-summary-copy small {line-height:1.5;overflow-wrap:anywhere}
.team-workspace .employee-rights-summary {margin-top:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.team-workspace .employee-access-chips {margin-top:12px}
.team-workspace .employee-card-footer {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:auto;padding-top:22px}
.team-workspace .employee-activity-count {font-size:12px;color:var(--muted)}
.team-workspace .employee-self-note {padding:0;margin:22px 0 0;font-size:12px}
.employee-editor-dialog {width:min(1020px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--line);border-radius:30px;background:var(--pearl);color:var(--ink);overflow:hidden}
.employee-editor-dialog[open] {display:flex;flex-direction:column;animation:employee-enter .2s ease-out}
.employee-editor-dialog::backdrop {background:#070e1699;backdrop-filter:blur(7px)}
.employee-editor-dialog>header {display:flex;flex:none;align-items:center;justify-content:space-between;gap:20px;padding:24px 30px;border-bottom:1px solid var(--line)}
.employee-editor-dialog h2 {font-size:26px}
.employee-editor-body {min-height:0;padding:0 30px;overflow:auto;overscroll-behavior:contain;scroll-padding:110px 0 100px}
.employee-editor-dialog .employee-form {display:block;padding:0}
.employee-steps {display:flex;gap:12px;padding:22px 0;position:sticky;top:0;background:var(--pearl);z-index:2}
.employee-steps button {display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;padding:8px 12px;border-radius:16px;min-height:44px;flex:1}
.employee-steps button span {display:grid;place-items:center;flex:none;width:29px;height:29px;border-radius:50%;background:var(--surface);border:1px solid var(--line)}
.employee-steps button[aria-current] {color:var(--ink);background:linear-gradient(100deg,#b6a3cf40,#9ed3da36)}
.employee-step-content {padding:10px 0 24px;min-height:280px}
.employee-step-content>h3 {font-size:24px;margin-bottom:8px}
.employee-step-content>p {color:var(--muted);font-size:14px;margin-bottom:26px}
.employee-step-content .employee-name-fields,.employee-step-content .employee-login-fields {display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}
.employee-wizard-footer {position:sticky;bottom:0;display:flex;align-items:center;gap:12px;padding:18px 0;background:var(--pearl);border-top:1px solid var(--line);z-index:3}
.employee-wizard-footer [data-employee-step-status] {margin-right:auto;color:var(--muted);font-size:12px}
.employee-wizard-footer .employee-form-actions {padding:0;margin:0;display:flex;gap:12px;align-items:center}
.employee-wizard-footer .employee-save {margin:0}
.employee-wizard-footer .employee-delete-trigger {font-size:12px}
.employee-permission-owner {width:max-content;max-width:100%;margin:0 auto 22px;display:grid;grid-template-columns:40px 1fr;gap:4px 12px;border:1px solid var(--line);padding:16px 22px;border-radius:20px;background:var(--surface)}
.employee-permission-owner>span {grid-row:span 2;align-self:center;font-size:30px;color:#a9c9db}
.employee-permission-owner small {font-size:12px;color:var(--muted)}
.employee-editor-dialog .employee-permissions {background:transparent;padding:0}
.employee-editor-dialog .employee-permissions>summary {padding:8px 0 0}
.employee-editor-dialog .employee-permissions>summary strong {font-size:14px}
.employee-editor-dialog .employee-permissions-body {padding:0}
.employee-editor-dialog .employee-permission-groups {gap:20px;padding-left:20px;border-left:1px solid var(--line);margin-left:9px}
.employee-editor-dialog .employee-permission-groups fieldset {position:relative}
.employee-editor-dialog .employee-permission-groups fieldset:before {content:'';position:absolute;width:10px;height:10px;border-radius:50%;border:1px solid #a8a9b5;background:var(--pearl);left:-26px;top:4px}
.employee-editor-dialog .employee-permission-groups fieldset:has(input:checked):before {background:#b6d6ee;border-color:#b6d6ee}
.employee-editor-dialog .employee-permission-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr))}
.employee-editor-dialog .employee-permission-option {position:relative;display:flex;align-items:flex-start;min-height:100px;padding:15px 15px 37px;border:1px solid var(--line);background:var(--surface);transition:background .18s,border-color .18s}
.employee-editor-dialog .employee-permission-option:has(input:checked) {background:linear-gradient(120deg,#bdb2df20,#b4d9db29);border-color:#9cb5cc88}
.employee-editor-dialog .employee-permission-option:after {content:'+ Подключить';position:absolute;bottom:12px;left:15px;color:var(--muted);font-size:11px}
.employee-editor-dialog .employee-permission-option:has(input:checked):after {content:'✓ Подключено';color:var(--ink)}
.employee-editor-dialog .employee-permission-option input {position:absolute;inset:0;z-index:1;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.employee-editor-dialog .employee-permission-option:focus-within {outline:2px solid #aa9bd2;outline-offset:3px}
.employee-editor-dialog .employee-permission-option strong {font-size:14px}
.employee-editor-dialog .employee-permission-option small {font-size:12px;line-height:1.5}
.team-workspace-overview {margin-bottom:28px}
.clinic-team-card {padding:28px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(115deg,var(--surface),var(--pearl));max-width:740px}
.clinic-team-card>header {display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:16px}
.clinic-team-card h2 {font-size:25px}
.clinic-team-avatars {display:flex;gap:18px;flex-wrap:wrap;margin-bottom:24px}
.clinic-team-person {position:relative;display:grid;justify-items:center;gap:8px;max-width:68px}
.clinic-team-person .employee-avatar {width:48px;height:48px}
.clinic-team-person b {position:absolute;top:34px;right:-3px;border:3px solid var(--pearl);border-radius:50%;min-width:24px;min-height:24px;padding:2px 5px;background:#c5d8e7;color:#203449;font-size:11px;font-weight:500;text-align:center}
.clinic-team-person small {max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px}
.clinic-team-spend {display:grid;grid-template-columns:1fr auto;gap:7px 18px;align-items:center}
.clinic-team-spend>span {font-size:14px;color:var(--muted)}
.clinic-team-spend>strong {grid-row:span 2;font-size:clamp(24px,3vw,36px);font-weight:500;letter-spacing:-1px}
.clinic-team-spend>small {color:var(--muted);font-size:12px}
.clinic-team-bar {display:flex;gap:5px;height:15px;margin:20px 0 17px;border-radius:20px;overflow:hidden}
.clinic-team-bar>span {flex:var(--team-share,1);min-width:3px;background:var(--team-color,var(--surface));border-radius:10px}
.clinic-team-legend {display:flex;flex-wrap:wrap;gap:10px 18px}
.clinic-team-legend>span {display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.clinic-team-legend i {width:8px;height:8px;border-radius:50%;background:var(--team-color)}
.clinic-team-legend strong {color:var(--ink);font-weight:500}
.clinic-team-card>footer {display:flex;flex-wrap:wrap;gap:16px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.clinic-team-card>footer strong {font-size:21px;color:var(--ink);font-weight:500;margin-right:5px}
.clinic-team-card>footer small {margin-left:auto;align-self:center;font-size:11px}
@keyframes employee-enter {from {opacity:0;transform:translateY(12px)} to {opacity:1;transform:none}}
@media(max-width:620px) {
 .employee-editor-dialog {width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:24px}
 .employee-editor-dialog>header {padding:18px}.employee-editor-body {padding:0 18px}
 .employee-steps {gap:5px;padding:14px 0}.employee-steps button {padding:8px 4px;gap:5px;flex-direction:column;font-size:10px;text-align:center}
 .employee-step-content .employee-name-fields,.employee-step-content .employee-login-fields {grid-template-columns:1fr}
 .employee-wizard-footer {flex-wrap:wrap}.employee-wizard-footer .employee-form-actions {flex-wrap:wrap;justify-content:flex-end}
 .employee-wizard-footer [data-employee-step-status] {font-size:11px}
 .clinic-team-card {padding:22px}.clinic-team-spend {grid-template-columns:1fr}.clinic-team-spend>strong {grid-row:auto;grid-row:2}
 .clinic-team-card>footer small {width:100%;margin:0}.team-workspace .employee-heading {align-items:flex-start}
}
@media(prefers-reduced-motion:reduce) {.employee-editor-dialog[open] {animation:none}.employee-permission-option {transition:none}}

.clinic-team-bar{display:block;width:100%}.clinic-team-bar .is-empty{fill:var(--line)}
.clinic-team-legend i[data-team-color="0"]{background:#b6d6ee}
.clinic-team-legend i[data-team-color="1"]{background:#e7c58f}
.clinic-team-legend i[data-team-color="2"]{background:#a8ccbb}
.clinic-team-legend i[data-team-color="3"]{background:#c3b7e5}
.clinic-team-legend i[data-team-color="4"]{background:#e4a5a1}
.clinic-team-legend i[data-team-color="5"]{background:#a9c9cb}
