/* Shared approved Overview language for dark and light Motion themes.
   The document never scrolls; named work regions own overflow. See /DESIGN.md. */
[data-design="motion"] .employee-create-dialog { width:min(820px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:24px;border:0; }
[data-design="motion"] .employee-create-dialog .dialog-head { padding-right:32px;margin-bottom:18px; }
[data-design="motion"] .employee-create-dialog .dialog-head h2 { font-size:24px; }
[data-design="motion"] .employee-create-dialog .form-grid { gap:12px 16px; }
[data-design="motion"] .employee-create-dialog .form-tip { margin:0;font-size:12px;background:rgba(var(--motion-control-rgb,240,247,247),.055);border:0;color:var(--muted); }
[data-design="motion"] .employee-create-dialog .form-tip strong { color:var(--text); }
[data-design="motion"] .employee-create-dialog .dialog-actions { padding-top:8px;margin:0; }
html[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) { height:100%;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body { height:100dvh;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .app-shell { height:100dvh;min-height:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main:has(.clients-viewport) { display:flex;height:100dvh;min-height:0;overflow:hidden;flex-direction:column; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main>.topbar { position:relative;top:auto;flex:0 0 64px;height:64px;min-height:64px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main>.content,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main:has(.clients-viewport)>.content { display:flex;flex-direction:column;justify-content:flex-start;flex:1 1 0;min-height:0;max-width:none;overflow:hidden;padding:8px var(--motion-gutter) 12px;gap:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main>.legal-footer { display:flex!important;flex:0 0 auto;margin:0;padding:8px var(--motion-gutter) 12px;font-size:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content :is(.page-head,.panel-head) { flex-shrink:0;margin:0 0 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content .page-head h1 { font-size:24px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content .panel-head h2 { font-size:14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content .panel-head :is(p,a) { font-size:11px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.panel,.card,.stat,.employee-card,.employee-command,.profile-identity-card,.profile-section,.profile-section-card,.insight-summary>article,.month-comparison,.finance-verdict,.dialog-pane,.conversation-pane,.chat-client-panel,.chat-inspector,.chat-assistant-panel,.notification-item) { background:var(--motion-glass);border:1px solid var(--motion-glass-border);border-radius:20px;box-shadow:var(--motion-shadow);backdrop-filter:blur(var(--motion-blur)) saturate(var(--motion-saturation));background-clip:padding-box; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.employee-card,.employee-command,.profile-identity-card)::before,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.employee-card,.employee-command,.profile-identity-card)::after { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,button,summary,[role="button"]) { cursor:pointer; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.row-actions a,.access-role-item,.dialog-row) { transition:background 180ms ease,outline-color 180ms ease,transform 180ms ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.access-role-item,.dialog-row):hover { background:rgba(var(--motion-control-rgb,240,247,247),.06);outline:1px solid rgba(var(--motion-control-rgb,240,247,247),.24);outline-offset:-1px;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .btn.primary { background:linear-gradient(135deg,rgba(103,169,255,.9),rgba(66,118,244,.78));border-color:transparent;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .btn.primary:hover { background:linear-gradient(135deg,rgba(123,183,255,.98),rgba(86,138,255,.88)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) button:disabled { cursor:not-allowed; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-page-panels,.motion-insight-details,.motion-finance-details,.employee-card-grid,.client-table,.client-grid-view,.calls-table-wrap,.permission-groups,.access-role-list nav) { scrollbar-width:thin;scrollbar-color:var(--motion-scrollbar,#91b4d54d) transparent;overscroll-behavior:contain; }
.motion-composed-page { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
.motion-page-panels { flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:2px 4px 8px 2px; }
.motion-page-panels>* { flex-shrink:0;min-width:0; }
.motion-page-panels>.panel { margin:0; }

/* One reusable animated search, matching the command-bar magnifier. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-search-host { min-width:0!important;width:auto;max-width:100%;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important; }
.motion-search-original-icon { display:none!important; }
.motion-local-search { position:relative;display:flex;align-items:center;width:40px;max-width:100%;height:40px;border:1px solid transparent;border-radius:14px;overflow:hidden;transition:width 320ms cubic-bezier(.2,.8,.2,1),background 180ms,border-color 180ms; }
.motion-local-search.is-open { width:420px;background:rgba(var(--motion-control-panel-rgb,20,38,50),.7);border-color:var(--border); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-local-search>input { width:0;min-width:0;min-height:38px;height:38px;flex:1;padding:0!important;opacity:0;border:0!important;background:transparent!important;box-shadow:none!important;transition:opacity 180ms; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-local-search.is-open>input { opacity:1; }
.motion-local-search-toggle,.motion-local-search-close { display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;min-height:0;padding:0;color:var(--text);background:transparent;border:0;border-radius:50%; }
.motion-local-search-toggle:hover { background:var(--motion-hover-tint,#edf7ff12);transform:scale(1.08); }
.motion-local-search-close { display:none;font-size:22px; }
.motion-local-search.is-open .motion-local-search-close { display:grid; }
.motion-local-search-toggle svg { width:18px;height:18px; }

/* Clients: fixed workspace, independent results and note regions. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport { display:flex;flex:1;flex-direction:column;min-height:0;height:100%;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-page-head { margin-bottom:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-toolbar { flex-shrink:0;padding:12px 16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { grid-template-columns:repeat(6,minmax(0,1fr));gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-search-control { grid-column:span 2;grid-row:1;display:flex;align-items:center; }
.motion-filter-footer { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-filter-footer .filter-chips { margin:0;padding:0;border:0;flex:1;min-width:0;flex-wrap:nowrap;overflow:auto;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-filter-footer .filter-chip { flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-filter-footer .clients-page-actions { display:flex;gap:8px;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bulk-panel { flex-shrink:0;margin:0;padding:10px 14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-view { flex:1;min-height:0;margin:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport :is(.client-list-view,.client-list-workspace) { height:100%;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-list-workspace { align-items:stretch!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-table { height:100%;max-height:none;min-height:0;overflow:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table th { position:sticky;top:0;z-index:2;background:var(--motion-table-header,#203342f0); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-grid-view { height:100%;min-height:0;overflow:auto;align-content:start; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-preview { overflow:hidden!important;min-height:0!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-preview-body] { height:100%;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-placeholder { height:100%;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-card { display:flex;flex-direction:column;height:100%;min-height:0;gap:10px;padding:16px;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-card>* { flex-shrink:0;margin-block:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-head { padding-bottom:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-status-line { padding:6px 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-profile-id { padding:6px 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-facts>div { padding:7px 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-card .client-preview-note { display:flex;flex-direction:column;flex:1 1 auto;min-height:60px;overflow:hidden;padding:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-note h3 { margin:0 0 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-scroll { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-access { padding-top:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-secret-row { padding:3px 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-open { margin-top:auto;flex-shrink:0; }
@media(min-width:1321px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport { display:grid;grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:auto auto auto minmax(0,1fr) auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-page-head { grid-column:1/-1; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-toolbar { grid-column:1;grid-row:2; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bulk-panel { grid-column:1;grid-row:3; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-view { grid-column:1;grid-row:4; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-list-workspace { display:block!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport>.client-preview { grid-column:2;grid-row:2/6; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-pagination { grid-column:1;grid-row:5; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-preview { position:relative!important;top:auto!important;height:100%!important;max-height:none!important; }
}
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-pagination { padding:6px 12px;min-height:44px;margin:0;font-size:12px;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-pagination .btn { min-height:30px;padding:4px 10px; }

/* Team, calls and permissions have stationary headings and scrollable records. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-command { flex-shrink:0;margin:0;padding:18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-card-grid { flex:1;min-height:0;overflow:auto;align-content:start;gap:16px;padding:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-card { height:auto;min-height:280px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-card:hover { transform:none;border-color:var(--border); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.calls-page,.access-center,.messaging-page) { flex:1;display:flex;flex-direction:column;min-height:0;height:100%;max-width:none;gap:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-page>* { flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-page .calls-history { flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-table-wrap { flex:1;min-height:0;overflow:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-filters { flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-stats { margin:0;padding:14px 18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-demo-strip { margin:0;background:var(--motion-subtle-tint,#bdcdd20a);border:1px solid var(--border-subtle);border-radius:12px;padding:8px 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .access-layout { flex:1;min-height:0;overflow:hidden;align-items:stretch; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .access-role-list { min-height:0;overflow:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .access-permissions { min-height:0;overflow:auto; }

/* Messaging retains its working four-pane structure and independent histories. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .messaging-workspace { flex:1;min-height:0;height:100%;max-height:none;gap:12px;background:transparent;border:0;box-shadow:none;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.dialog-pane,.conversation-pane,.chat-client-panel,.chat-inspector,.chat-assistant-panel) { min-height:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .conversation-pane { background:var(--motion-glass)!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel-scroll { flex:1;height:100%;overflow:hidden;padding:0 10px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-chat-filterbar { display:flex;align-items:center;min-height:58px;max-height:58px;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-chat-filter-list { display:flex;flex:1;min-width:0;flex-wrap:nowrap;overflow:auto;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-chat-filter { flex:0 0 145px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.conversation-head,.messaging-filterbar,.pane-title,.message-composer,.employee-chat-filterbar) { background:transparent;border-color:var(--border-subtle); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .dialog-row { border-bottom-color:var(--border-subtle);border-radius:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .thread-search { border-radius:14px;background:rgba(var(--motion-control-panel-rgb,20,38,50),.7);animation:motion-search-reveal 320ms cubic-bezier(.2,.8,.2,1); }
@keyframes motion-search-reveal { from { opacity:0;max-width:40px; } to { opacity:1;max-width:100%; } }

/* Insight pages: the same luminous chart marks as Overview, with real existing data. */
.motion-finance-panel { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page { flex:1;min-height:0;height:100%;width:100%;max-width:none;gap:16px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,1fr);grid-template-rows:auto auto minmax(0,1fr); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>.page-head { grid-column:1/-1;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-summary { grid-column:1/-1;margin:0;gap:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-summary>article { padding:18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-summary strong { font-size:30px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .analytics-panel { grid-column:1;grid-row:3;min-height:0;margin:0;display:flex;flex-direction:column;overflow:auto; }
.motion-insight-details { grid-column:2;grid-row:3;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .analytics-comparison { grid-template-columns:1fr;margin:0;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .month-comparison { padding:14px 18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .analytics-client-grid { display:flex;flex-direction:column;gap:16px;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart { flex:1;min-height:210px;max-height:600px;height:auto;align-items:stretch;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--border-subtle) calc(25% - 1px),var(--border-subtle) 25%); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-column { display:flex;flex-direction:column;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-stack { flex:1;min-height:0;height:auto;gap:16px;align-items:flex-end; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .finance-summary-simple { background:transparent;border:0;box-shadow:none;padding:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .finance-summary-simple>article::before { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-bars :is(.bar-new,.bar-renewal) { width:3px;max-width:3px;min-width:3px;border:0;border-radius:2px;background:linear-gradient(to top,#8de8db08,var(--motion-chart-new,#8de8db));position:relative; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-bars .bar-renewal { background:linear-gradient(to top,#c5a7ff08,var(--motion-chart-renewal,#c5a7ff)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-bars :is(.bar-new,.bar-renewal)::after { content:"";position:absolute;top:-5px;left:-4px;width:11px;height:11px;border-radius:50%;background:var(--motion-chart-new-dot,#b7fff1);box-shadow:0 0 0 7px #8de8db18,0 0 12px #8de8db66; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-bars .bar-renewal::after { background:var(--motion-chart-renewal-dot,#dec9ff);box-shadow:0 0 0 7px #c5a7ff18,0 0 12px #c5a7ff66; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-new,[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .legend-new { background-color:var(--motion-chart-new,#8de8db); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-renewal,[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .legend-renewal { background-color:var(--motion-chart-renewal,#c5a7ff); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-line .bar-new { color:var(--motion-chart-new,#8de8db); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bar-chart.mode-line .bar-renewal { color:var(--motion-chart-renewal,#c5a7ff); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .finance-workspace { grid-template-rows:auto auto auto minmax(0,1fr); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .finance-verdict { grid-column:1/-1;margin:0;padding:12px 18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-finance-panel { display:flex;flex-direction:column;min-height:0;grid-column:1;grid-row:4;margin:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-finance-panel .motion-chart { flex:1;height:auto;min-height:0;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-finance-panel svg { max-height:380px; }
.motion-finance-details { grid-column:2;grid-row:4;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px; }
.motion-finance-details>* { flex-shrink:0;margin:0; }

/* Overview remains the reference. Move branding upward, preserving card geometry. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main:has(.overview-v2)>.content { justify-content:center; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2 { min-height:0;max-height:100%;overflow:auto;scrollbar-width:thin;padding:0 2px 2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-overview-brand { margin-bottom:40px; }
@media(min-width:2200px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { grid-template-columns:repeat(12,minmax(0,1fr)); }
}
@media(min-width:1180px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-today-body { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-attention { margin-top:0; }
}
@media(min-width:1180px) and (max-height:1100px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2[data-compact="true"] .motion-team-stage { height:300px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2[data-compact="true"] .motion-team-card { height:260px;width:180px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2[data-compact="true"] .motion-team-card[data-center="true"] { height:285px;width:215px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2 .motion-chart { height:250px; }
}
@media(max-width:1700px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
@media(max-width:1320px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-preview { top:64px!important;bottom:36px!important;height:calc(100dvh - 100px)!important;max-height:none!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page { grid-template-columns:minmax(0,1fr) minmax(300px,.85fr); }
}
@media(min-width:1100px) and (max-width:1380px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-table { background:var(--motion-glass);border:1px solid var(--motion-glass-border);backdrop-filter:blur(30px); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table table { display:table!important;min-width:1100px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table thead { display:table-header-group!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table tbody { display:table-row-group!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table tr { display:table-row!important;padding:0;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;background:transparent; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table td { display:table-cell!important;position:static!important;height:auto;padding:10px!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table td::before { display:none; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table td[data-label="Клиент"] { position:sticky!important;left:0;z-index:3;min-width:210px;max-width:240px;background:var(--motion-table-cell,#142430); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table thead th:first-child:not(.select-col),
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table thead th.select-col+th { left:0;z-index:4;background:var(--motion-table-surface,#203342); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-table .client-row:hover { background:var(--active); }
}
@media(max-height:900px) and (min-width:761px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel .client-preview-card { gap:4px;padding:8px 0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel .client-preview-head { min-height:48px;padding:0 0 4px;margin:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel .client-preview-profile-id { padding:3px 0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel .client-preview-status-line { padding:3px 0;margin:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .chat-client-panel .client-preview-open { min-height:34px;padding:6px;margin:0;font-size:11px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-card { gap:6px;padding:12px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-facts>div { padding:3px 0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-access { padding-top:4px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-access h3 { margin:0 0 4px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-secret-row { font-size:11px;min-height:22px;padding:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-secret-row .btn { min-height:24px;padding:2px 6px; }
}
@media(max-width:1000px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>.page-head { order:-4; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>.finance-verdict { order:-3; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>.insight-summary { order:-2; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>:is(.analytics-panel,.motion-finance-panel) { order:-1; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-filter-footer { flex-wrap:wrap; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { grid-template-columns:repeat(4,minmax(0,1fr)); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page { display:flex;flex-direction:column;overflow:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .insight-page>* { flex-shrink:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .analytics-panel { height:400px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-finance-panel { height:340px; }
  .motion-insight-details,.motion-finance-details { overflow:visible; }
}
@media(max-width:760px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .main>.legal-footer { padding:4px 12px calc(66px + env(safe-area-inset-bottom));gap:4px 12px;font-size:9px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content .page-head h1 { font-size:21px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-toolbar { max-height:30dvh;overflow:auto;padding:10px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .bulk-panel { max-height:100px;overflow:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-filter-footer .clients-page-actions { width:auto;flex-wrap:wrap; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-preview { top:0!important;bottom:0!important;height:100dvh!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-page { overflow:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-page .calls-history { flex:none;min-height:400px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .access-layout { overflow:auto;display:flex;flex-direction:column; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .access-layout>* { flex-shrink:0;overflow:visible; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .employee-command { padding:12px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-overview-brand { margin-bottom:24px; }
}
@media(prefers-reduced-motion:reduce) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.access-role-item,.dialog-row) { transition:none!important; }
  .motion-local-search,.motion-local-search>input,.motion-local-search-toggle { transition:none!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .thread-search { animation:none; }
}
[data-reduced-motion="true"] :is(.motion-local-search,.motion-local-search>input,.motion-local-search-toggle) { transition:none!important; }
[data-reduced-motion="true"] .thread-search { animation:none!important; }
[data-reduced-motion="true"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.access-role-item,.dialog-row) { transition:none!important; }

/* Client filters own the layer above the bulk tools and sticky table header. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport>.client-toolbar { position:relative;z-index:30; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport>.bulk-panel { position:relative;z-index:20; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport>.client-view { position:relative;z-index:1; }
@media(min-width:761px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar { display:flex;align-items:center;flex-wrap:nowrap;gap:6px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar>.crm-select { flex:1 1 0;width:auto;min-width:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar :is(.crm-select-trigger,.btn) { min-height:38px;height:38px;padding:7px 9px;font-size:12px;gap:6px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar>.review-filter { flex:0 0 76px;width:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .filter-bar>.filter-reset { flex:0 0 82px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .clients-viewport .client-search-control { position:relative;order:-1;flex:0 0 40px;width:40px;height:40px;min-width:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-search-control .motion-local-search { position:absolute;left:0;top:0;max-width:none;z-index:40; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-search-control .motion-local-search.is-open { width:min(460px,calc(100vw - 120px));background:var(--motion-glass-strong);backdrop-filter:blur(30px);box-shadow:var(--shadow-md); }
}
/* Client detail: one stationary canvas, with overflow owned by each card. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail { display:flex;flex-direction:column;flex:1;min-height:0;height:100%;width:100%;max-width:none;margin:0;gap:12px;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>.client-workspace-grid { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>.client-profile-stage { flex:0 1 auto;max-height:45%;min-height:0;margin:0;grid-template-columns:minmax(0,1.6fr) minmax(300px,.65fr);gap:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>.client-profile-stage.no-avito-relationship { grid-template-columns:1fr; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel) { min-width:0;min-height:0;margin:0;padding:14px 16px;border:0;border-radius:20px;background:var(--motion-glass);box-shadow:0 12px 32px rgba(0,0,0,.14);backdrop-filter:blur(30px) saturate(145%);scrollbar-width:thin;overscroll-behavior:contain; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card) { height:auto;overflow:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-card::before { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-main { gap:12px;padding-right:235px;min-height:72px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-profile-avatar { width:84px!important;height:84px!important;flex-basis:84px!important;border-radius:24px!important;font-size:30px!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-title-line h1 { font-size:28px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags { margin-top:8px;gap:5px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags>span { padding:3px 7px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-identity-actions { position:absolute;top:14px;right:16px;z-index:12;display:flex;flex-direction:column;align-items:flex-end;gap:8px;max-width:235px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags>.client-account-switcher { position:relative;top:auto;right:auto;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-identity-actions .avito-hub-actions { display:flex;align-items:center;gap:6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-identity-actions .status-pill { font-size:9px;padding:3px 6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .btn { min-height:30px;padding:5px 9px;font-size:11px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-team-strip { margin-top:10px;padding-top:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-team-strip strong { margin-top:3px;font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access { margin-top:12px;padding-top:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access-head { margin-bottom:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .secret-list-compact { gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .secret-list-compact .secret-row { min-height:64px;padding:8px 10px!important;gap:5px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-avito-hub { display:flex;flex-direction:column;margin:10px 0 0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-hub-head { order:1;margin:5px 0 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-hub-title :is(.avito-profile-mark,h2) { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-hub-title p { margin:0;font-size:10px;color:var(--muted); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip { grid-template-columns:repeat(7,minmax(0,1fr));margin:0;padding:8px 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip>div { padding:2px 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip>div:first-child { padding-left:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip span { white-space:normal;font-size:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip strong { margin-top:4px;font-size:20px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-avito-hub>:is(.avito-warning,.avito-error,.collapsible-panel) { order:2;margin:6px 0 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-days { margin-top:5px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-days strong { font-size:36px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-top p { margin-top:6px;font-size:11px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts { margin-top:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts>div { min-height:28px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-actions { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-actions>form { display:contents; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-actions .btn { width:100%;min-height:42px;height:auto;justify-content:center;padding:8px;font-size:12px;line-height:1.25;white-space:normal;text-align:center; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-term-original { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-client-delete-button { position:absolute;top:10px;right:12px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:7px;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--text)!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-delete-button .icon-svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-delete-button:hover { color:var(--motion-danger-hover,#ff8397)!important;transform:translateY(-1px) scale(1.04);outline:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-delete-button:focus-visible { outline:2px solid var(--text);outline-offset:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-relationship-card:has(>.motion-client-delete-button) .relationship-top { padding-right:48px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail [data-deletion-modal] .deletion-panel { margin:0 0 12px;padding:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail [data-deletion-modal] .deletion-panel h2 { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-business-row,.motion-client-collaboration-row) { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-height:0;flex:1 1 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .operation-facts { grid-template-columns:repeat(3,minmax(0,1fr)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-collaboration-row { flex-grow:.9; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-business-row,.motion-client-collaboration-row)>:only-child { grid-column:1/-1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row>:is(.client-finance-card,.lifecycle-panel) { overflow:auto;height:100%; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .panel-head { align-items:flex-start;margin-bottom:8px;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .panel-head .section-actions { margin:0;gap:6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .operation-facts>div { padding:6px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .operation-facts dd { margin-top:3px;white-space:normal;overflow-wrap:anywhere; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .lifecycle-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .lifecycle-summary>div { padding:8px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .period-timeline { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 0;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .period-timeline article { min-width:0;padding:9px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row>:is(.client-finance-card,.lifecycle-panel) { padding:12px 14px;overscroll-behavior:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .panel-head { margin-bottom:6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .operation-facts>div { padding:4px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row :is(.statistics-exclusion-control,.statistics-exclusion-readonly) { margin-top:8px;padding:8px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row :is(.statistics-exclusion-control,.statistics-exclusion-readonly) small { margin-top:3px;font-size:9px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .payment-history { margin-top:8px;padding-top:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .payment-history>summary::after { width:22px;height:22px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .lifecycle-summary>div { padding:6px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .period-timeline { padding:8px 0 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .period-timeline article { padding:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-collaboration-row>.collaboration-card { display:flex;flex-direction:column;height:100%;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact { flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .note-filter-tabs { flex-shrink:0;margin:0 0 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-task-body { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-original-create { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-list { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-row { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 10px;border-bottom:1px solid var(--motion-glass-border); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-row[hidden] { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-row-copy { min-width:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-row-copy strong { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-row-copy small { display:block;margin-top:4px;color:var(--muted);font-size:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-empty { margin:12px 0;color:var(--muted);font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-header-actions { display:flex;align-items:center;gap:8px;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-tabs { display:flex;flex-wrap:wrap;gap:6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog-backdrop { z-index:2200;background:rgba(7,11,20,.66);backdrop-filter:blur(2px); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog { display:flex;flex-direction:column;width:min(560px,calc(100vw - 32px));overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer { width:min(960px,calc(100vw - 32px));height:760px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog .dialog-head { flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog .motion-task-tabs { flex-shrink:0;margin:0 0 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer-body { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-board { display:grid;grid-template-columns:1fr;gap:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-card { padding:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-card[hidden] { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-head strong { font-size:15px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-comments { font-size:12px;line-height:1.6;overflow-wrap:anywhere; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-create { width:min(560px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog form { min-height:0;overflow:auto;overscroll-behavior:contain; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog form p { margin:0 0 14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-dialog form label { display:block;margin-bottom:6px;color:var(--muted);font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-select-popover { position:fixed!important;margin:0;right:auto;max-width:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-original { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-payment-history-trigger { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:12px;min-height:36px;padding:8px 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-trigger small { color:var(--muted);font-size:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-dialog { width:min(720px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body { min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history { display:grid;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history>div { display:grid;gap:5px;padding:12px;background:rgba(var(--motion-control-rgb,240,247,247),.04);border-radius:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history strong { font-size:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history span { color:var(--muted);font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-relationship-card>:is(.statistics-exclusion-control,.statistics-exclusion-readonly) { margin:12px 0 0;padding:9px 11px;gap:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-relationship-card .statistics-exclusion-control strong { font-size:11px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-relationship-card :is(.statistics-exclusion-control,.statistics-exclusion-readonly) small { font-size:9px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row :is(.operation-facts,.lifecycle-summary) { border:0;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row :is(.operation-facts,.lifecycle-summary)>div { padding:8px 10px;border:0;border-radius:10px;background:rgba(var(--motion-control-rgb,240,247,247),.035); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-notes-card textarea:focus { outline:0;border-color:var(--border);box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .dialog { position:relative; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .dialog-head { padding-right:40px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .dialog-head>.icon-btn { position:absolute;top:10px;right:10px;display:grid;place-items:center;width:40px;height:40px;padding:0;min-height:0;font-size:30px;line-height:1;border:0;background:transparent;box-shadow:none;outline:0;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .dialog-head>.icon-btn:hover { border:0;background:transparent;color:var(--motion-danger-hover,#ff8397);box-shadow:none;outline:0;transform:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) .dialog-head>.icon-btn:focus-visible { outline:1px solid var(--motion-glass-border);outline-offset:1px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) [data-context-modal="main"]>.dialog { width:min(760px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) [data-context-modal="main"] textarea { min-height:96px;max-height:240px;resize:vertical;line-height:1.6; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-task-body .task-board { grid-template-columns:1fr;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-task-body .task-card { padding:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance { display:grid;grid-template-columns:minmax(200px,.65fr) minmax(0,2fr);align-content:start;gap:8px 16px;flex:.48 1 0;min-height:0;overflow:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .panel-head { margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts { grid-template-columns:repeat(6,minmax(0,1fr));border:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts>div { padding:3px 8px;border:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-website-actions { grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-website-actions :is(.subdetails,.payment-history) { margin:0;padding:0;border:0;min-width:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-website-actions :is(summary,.btn) { font-size:11px; }
/* One data-cell and action language across the complete client card. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) { --motion-client-cell:rgba(var(--motion-control-rgb,240,247,247),.035);--motion-client-cell-radius:10px;--motion-client-action:#587dcf; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-team-strip,.avito-metric-strip,.relationship-facts,.operation-facts,.lifecycle-summary) { border:0;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-team-strip>div,.avito-metric-strip>div,.relationship-facts>div,.operation-facts>div,.lifecycle-summary>div,.secret-list-compact .secret-row,.period-timeline article,.motion-task-row,.crm-note,.history-event-feed article,.statistics-exclusion-control,.statistics-exclusion-readonly) { border:0;border-radius:var(--motion-client-cell-radius);background:var(--motion-client-cell);box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-team-strip { padding-top:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-team-strip>div { padding:8px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access { border:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip { padding:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip>div { padding:8px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts>div { display:grid;align-content:center;justify-content:start;gap:3px;min-height:0;padding:7px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts dt { font-size:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts dd { text-align:left; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-list { display:flex;flex-direction:column;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-task-row { flex:0 0 auto;padding:10px 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .secret-list-compact { border:0;background:transparent; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-card,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history>div { border:0;border-radius:var(--motion-client-cell-radius);background:var(--motion-client-cell);box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-task-viewer .task-comments { border:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) :is(.motion-client-detail,.motion-client-dialog,.context-modal) .btn:not(.danger-btn) { border:1px solid rgba(var(--motion-edge-rgb,219,241,255),.14);border-radius:10px;background:rgba(var(--motion-control-rgb,240,247,247),.04);background-clip:padding-box;box-shadow:none;font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) :is(.motion-client-detail,.motion-client-dialog,.context-modal) .btn:not(.danger-btn):hover { background:rgba(var(--motion-control-rgb,240,247,247),.075);border-color:rgba(var(--motion-edge-rgb,219,241,255),.22);outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) :is(.motion-client-detail,.motion-client-dialog,.context-modal) .btn.primary { background:linear-gradient(135deg,#6487d6,#5879c9);border-color:transparent;color:#fff; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) :is(.motion-client-detail,.motion-client-dialog,.context-modal) .btn.primary:hover { background:linear-gradient(135deg,#6c90df,#6082d2);border-color:transparent;outline:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) .motion-client-detail .relationship-actions .btn { font-size:14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) body:has(.motion-client-detail) .motion-client-detail .btn.motion-payment-history-trigger { border-color:rgba(var(--motion-edge-rgb,219,241,255),.1);background:var(--motion-client-cell); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance { padding:10px 14px;gap:6px 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts { gap:6px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts>div { padding:4px 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts dt { font-size:9px;line-height:1.2; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts dd { margin-top:3px;font-size:11px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-website-actions { align-items:center;gap:6px 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .motion-payment-history-trigger { flex:0 1 auto;width:auto;min-height:28px;margin:0;padding:4px 10px;font-size:11px;white-space:nowrap; }
@media(max-width:1099px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail { overflow:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>.client-profile-stage { flex:none;min-height:330px;max-height:none; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-business-row,.motion-client-collaboration-row) { flex:none;height:260px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance { flex:none;max-height:190px; }
}
@media(max-width:760px) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>.client-profile-stage { display:flex;flex-direction:column;min-height:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-card { flex:none;height:auto;overflow:visible; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-main { padding-right:0; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-identity-actions { position:relative;top:auto;right:auto;max-width:none;align-items:flex-start;margin-bottom:12px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-identity-actions .avito-hub-actions { align-items:flex-start; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access .secret-list-compact { grid-template-columns:1fr; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .avito-metric-strip { grid-template-columns:repeat(3,minmax(0,1fr)); }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-business-row,.motion-client-collaboration-row) { display:flex;flex-direction:column;height:auto; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-business-row,.motion-client-collaboration-row)>* { flex:none;height:260px!important; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance { display:block;max-height:220px; }
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail>#website-finance .project-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* Demo tuning changes panel glass only; text and modal surfaces stay readable. */
.motion-opacity-control { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"])[data-motion-opacity] { --motion-glass:linear-gradient(145deg,rgba(var(--motion-panel-top-rgb,10,18,24),var(--motion-panel-alpha-top)),rgba(var(--motion-panel-bottom-rgb,12,22,29),var(--motion-panel-alpha-bottom))); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control { display:flex;align-items:center;gap:8px;margin:0 8px 0 0;color:var(--muted);font-size:11px;white-space:nowrap; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control input { width:84px;min-height:0;height:4px;margin:0;padding:0;accent-color:#8da8ec;cursor:pointer;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control output { min-width:30px;font-variant-numeric:tabular-nums; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control button { width:24px;height:24px;padding:0;border:0;background:transparent;box-shadow:none;color:var(--muted);font-size:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control button:hover { color:var(--text); }
@media(max-width:760px) { [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control>span:first-child { display:none; } [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control { gap:4px;margin-right:0; } [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control input { width:48px; } }
/* One scroll region for either Notes or Events, with nearby metadata actions. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact :is(.crm-note-list,.history-event-feed) { max-height:none;overflow:visible;scrollbar-gutter:auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-list { gap:4px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note { padding:3px 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-head { align-items:center;justify-content:flex-start;gap:8px;margin-bottom:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-meta { flex:0 1 auto;gap:3px 6px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-actions { gap:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-actions .note-icon-button { width:20px;height:20px;min-width:0;min-height:0;padding:3px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-body { font-size:12px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-compose { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-list+.crm-note-compose { margin-top:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-compose textarea { height:38px;min-height:38px;padding:6px 8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .crm-note-compose .btn { min-height:32px; }
/* A gentle stationary lift in shadow, on both Overview and client panels. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2:not(.layout-editing) .dashboard-widget-grid>[data-dashboard-widget],
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel) { transition:box-shadow 180ms ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2:not(.layout-editing) .dashboard-widget-grid>[data-dashboard-widget]:hover,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel):hover { box-shadow:0 1px 0 rgba(232,248,255,.065) inset,0 24px 58px rgba(0,0,0,.32),0 0 18px rgba(106,158,224,.045); }
@media(prefers-reduced-motion:reduce) {
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2:not(.layout-editing) .dashboard-widget-grid>[data-dashboard-widget],
  [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel) { transition:none; }
}
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"])[data-reduced-motion="true"] .overview-v2:not(.layout-editing) .dashboard-widget-grid>[data-dashboard-widget],
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"])[data-reduced-motion="true"] .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel) { transition:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-avito-details { display:flex;order:2;flex-wrap:wrap;gap:8px;margin-top:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-avito-details-dialog { width:min(900px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-avito-details-dialog>.avito-items { max-height:none;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-avito-account-name { margin:4px 0 0;font-size:11px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access-head h2 { margin:0;font-size:14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-access-head p,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .panel-head p { margin:3px 0 0;font-size:11px;line-height:1.35; }
/* Identity metadata is one quiet row; account linking sits beside the title. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-title-line>.client-account-switcher { position:relative;top:auto;right:auto;margin:0 0 0 4px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags { align-items:center; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags>span { padding:5px 9px;border:0!important;border-radius:8px;background:var(--motion-client-cell);box-shadow:none;line-height:1.3; }
/* Two recent notes are a preview. All text and older pages live in history. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-notes-original-pagination { display:none!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact:has([data-note-kind="notes"]:not([hidden])) { display:flex;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail [data-note-kind="notes"]:not([hidden]) { display:flex;flex:1;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail [data-note-kind="notes"]>[data-notes-panel] { display:flex;flex-direction:column;flex:1;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-list { display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note:nth-child(n+3) { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-body { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-compose { flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-dialog { width:min(900px,calc(100vw - 32px));overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note-list { max-height:none;overflow:visible;scrollbar-gutter:auto;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note { padding:10px 12px;border:0;border-radius:10px;background:var(--motion-client-cell); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note-head { justify-content:flex-start;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note-meta { flex:0 1 auto; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .page-actions { margin:12px 0 0; }
/* Precise percentage entry keeps the same quiet header footprint. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control .motion-opacity-number { display:flex;align-items:center;gap:0;min-width:30px;font-variant-numeric:tabular-nums; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control input[data-motion-opacity-value] { width:22px;height:24px;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;box-shadow:none;outline:0;font:inherit;text-align:right;cursor:text; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-opacity-control input[data-motion-opacity-value]:focus-visible { outline:0;box-shadow:0 1px 0 currentColor; }
/* Quiet, sharp note actions sit outside a content-sized background. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button { width:24px;height:24px;padding:2px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;outline:0;color:var(--muted);transition:color 180ms ease,transform 180ms ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button:hover { border:0;background:transparent;box-shadow:none;outline:0;color:var(--text);transform:scale(1.08); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button.is-danger:hover { color:var(--motion-danger-hover,#ff8397); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button.is-active { color:var(--motion-link-ink,#8fbbff); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button:focus-visible { outline:1px solid var(--muted);outline-offset:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-client-detail,.motion-note-history-body) .note-icon-button .icon-svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note:nth-child(-n+2) { display:grid;grid-template-columns:minmax(0,max-content) auto;align-self:flex-start;width:max-content;max-width:100%;padding:0;background:transparent;gap:0 8px;border-radius:0;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-head { display:contents; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-meta { grid-column:1;grid-row:1;align-content:center;min-width:0;padding:5px 12px 2px;border-radius:10px 10px 0 0;background:var(--motion-client-cell); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-actions { grid-column:2;grid-row:1;align-self:center; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .notes-compact .crm-note-body { grid-column:1;grid-row:2;min-width:0;contain:inline-size;padding:0 12px 6px;border-radius:0 0 10px 10px;background:var(--motion-client-cell); }
/* Copy profile ID without adding another text label. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-tags>.motion-copy-profile-id { position:relative;padding-right:29px;cursor:pointer; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-copy-profile-id>.icon-svg { position:absolute;right:8px;top:50%;width:14px;height:14px;transform:translateY(-50%);fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity 150ms ease,color 150ms ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-copy-profile-id:is(:hover,:focus-visible,.is-copied)>.icon-svg { opacity:1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-copy-profile-id.is-copied>.icon-svg { color:var(--motion-success-ink,#85d6b7); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-copy-profile-id:focus-visible { outline:1px solid var(--muted);outline-offset:2px; }
/* Center linked accounts on its trigger, clamping only at card edges. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-identity-main:has(.client-account-switcher[open]) { z-index:25; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-switcher-menu { left:50%;right:auto;transform:translateX(calc(-50% + var(--motion-link-menu-shift,0px)));transform-origin:top center;animation:motion-linked-menu-in 150ms ease; }
@keyframes motion-linked-menu-in { from { opacity:0;transform:translate(calc(-50% + var(--motion-link-menu-shift,0px)),-4px); } to { opacity:1;transform:translate(calc(-50% + var(--motion-link-menu-shift,0px)),0); } }
/* Remaining days use the same soft ring language as Finance. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-top { display:grid;grid-template-columns:128px minmax(0,1fr);align-items:center;gap:6px 16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-label { grid-column:2;grid-row:1;align-self:end;font-size:14px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-top>p { grid-column:2;grid-row:2;align-self:start;margin:0;font-size:13px;line-height:1.4; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-days { position:relative;grid-column:1;grid-row:1/3;display:grid;place-items:center;width:128px;height:128px;margin:0;gap:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-term-ring { position:absolute;inset:0;width:100%;height:100%;overflow:visible;fill:none;stroke-width:9; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-term-track { stroke:rgba(145,180,213,.14); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-term-progress { stroke:url(#motion-term-gradient);stroke-linecap:round;transform:rotate(-90deg);transform-origin:60px 60px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .relationship-days.warning .motion-term-progress { stroke:var(--motion-warning-ink,#f1cd86); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .relationship-days.danger .motion-term-progress { stroke:var(--motion-danger-ink,#ffacb9); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-term-value { display:flex;flex-direction:column;align-items:center;gap:4px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-term-value strong { font-size:40px;color:var(--text);line-height:1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-term-value span { padding:0;font-size:14px;line-height:1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts dt { font-size:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .relationship-facts dd { font-size:14px;line-height:1.3; }
@media(prefers-reduced-motion:reduce) { [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .client-account-switcher-menu { animation:none; } }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"])[data-reduced-motion="true"] .motion-client-detail .client-account-switcher-menu { animation:none; }

[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .lifecycle-summary>div { padding:5px 10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row .period-timeline { padding-top:6px; }

/* Form choices keep their rounded selection fill without native rectangular rings. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) form :is(input[type="radio"],input[type="checkbox"]):not([data-crm-switch]) { min-height:0;padding:0;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) form :is(button,label:has(input[type="radio"])):is(:hover,:focus,:focus-visible) { outline:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) form button:focus-visible { box-shadow:0 0 0 2px rgba(143,187,255,.24); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) form label:has(input[type="radio"]:focus-visible) { box-shadow:0 0 0 2px rgba(143,187,255,.24); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) input[type="number"]::-webkit-inner-spin-button,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) input[type="number"]::-webkit-outer-spin-button { border:0;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar .numInputWrapper>span { border:0;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar .numInputWrapper input { outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel):hover { box-shadow:0 24px 58px rgba(0,0,0,.32),0 0 18px rgba(106,158,224,.045); }

/* A single stable scroll region in note history, including icon hover. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body { overflow-x:hidden;scrollbar-gutter:stable; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body :is([data-notes-panel],.crm-note-list,.crm-note,.crm-note-head,.crm-note-meta) { min-width:0;max-width:100%; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note-meta { overflow-wrap:anywhere; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body .crm-note-actions { flex-shrink:0;padding:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-note-history-body::-webkit-scrollbar-button { display:none;width:0;height:0; }
.mini-history>.payment-history-row { display:flex;align-items:center;gap:12px; }
.payment-history-row>.payment-history-copy { flex:1;min-width:0;display:grid;gap:5px; }
.payment-history-row>form { flex:none;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-payment-history-body .mini-history>.payment-history-row { display:flex; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .payment-delete-button { display:grid;place-items:center;width:32px;height:32px;padding:5px;border:0;border-radius:0;background:transparent;color:var(--muted);outline:0;box-shadow:none;transition:color 180ms ease,transform 180ms ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .payment-delete-button:hover { color:var(--motion-danger-hover,#ff8397);background:transparent;outline:0;box-shadow:none;transform:scale(1.08); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .payment-delete-button .icon-svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }

/* Clip the glass itself to the rounded silhouette without an outer shadow. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel) { position:relative;isolation:isolate;background:transparent;backdrop-filter:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel)::before { content:"";display:block;position:absolute;inset:0;width:auto;height:auto;transform:none;opacity:1;filter:none;z-index:-1;pointer-events:none;border:0;border-radius:inherit;background:var(--motion-glass);backdrop-filter:blur(30px) saturate(145%);clip-path:inset(0 round 20px);box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.dialog,.motion-note-history-body) :is(.crm-note-actions form,.payment-history-row>form,.period-timeline form) { flex:none;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-business-row>.lifecycle-panel { overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-lifecycle-preview>article:nth-child(n+3) { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .lifecycle-panel>.panel-head { display:flex;flex-wrap:wrap;gap:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .lifecycle-panel>.panel-head>div { flex:1;min-width:220px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-period-history-dialog { width:min(800px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-period-history-body { flex:1;min-height:0;overflow:auto;overflow-x:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-period-history-body,.motion-payment-history-body) .period-timeline { display:grid;grid-template-columns:1fr;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-period-history-body,.motion-payment-history-body) .period-timeline article { display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:10px;background:var(--motion-client-cell); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.motion-period-history-body,.motion-payment-history-body) .period-timeline article>span { flex:1;min-width:0;display:grid;gap:5px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-website-editor { width:min(800px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-editor-tabs { display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-editor-tabs [aria-selected="true"] { background:rgba(123,164,255,.15)!important;color:var(--motion-link-ink,#9ebaff);border-color:transparent!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-website-editor-body { min-height:0;overflow:auto;overflow-x:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-website-editor-body form { max-height:none;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-avito-details-dialog>.avito-items { display:grid;gap:8px;overflow:auto;min-height:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-avito-details-dialog .avito-item { border:0;border-radius:0;background:transparent;box-shadow:none;padding:10px 4px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-avito-details-dialog .avito-item>div { display:grid;gap:4px; }

/* Native number spinners cannot be themed reliably on Windows. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-control { display:block;position:relative;min-width:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-control>input { width:100%;padding-right:36px;appearance:textfield; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-control>input::-webkit-inner-spin-button,
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-control>input::-webkit-outer-spin-button { appearance:none;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-actions { position:absolute;right:6px;top:5px;height:calc(var(--motion-number-input-height,42px) - 10px);display:flex;flex-direction:column;width:24px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-actions>button { display:grid;place-items:center;flex:1;min-height:0;width:24px;padding:0;border:0;background:transparent;outline:0;box-shadow:none;color:var(--muted); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-actions>button:hover { color:var(--text);outline:0;box-shadow:none;background:transparent; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-actions svg { width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-number-control:has(input:disabled) .motion-number-actions { opacity:.4;pointer-events:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar.hasTime { height:auto!important;padding-bottom:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar.hasTime .flatpickr-time { display:flex;align-items:center;gap:6px;height:64px;min-height:64px;max-height:none;padding:8px;border:0!important;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-time .numInputWrapper { flex:1;width:auto;height:48px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-time .flatpickr-time-separator { flex:none;width:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-time :is(input.flatpickr-hour,input.flatpickr-minute) { height:48px;min-height:48px;border:0!important;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .crm-time-quick { border-top:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-current-month input.cur-year { height:32px;min-height:32px; }

@property --motion-hover-progress { syntax:"<number>";inherits:true;initial-value:0; }
/* Panel hover changes only its glass, ten percentage points below the saved value. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) { --motion-shadow:none;--motion-glass-hover:linear-gradient(145deg,rgba(var(--motion-panel-top-rgb,10,18,24),var(--motion-panel-hover-top,.86)),rgba(var(--motion-panel-bottom-rgb,12,22,29),var(--motion-panel-hover-bottom,.74))); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content :is(.panel,.card,.stat,.employee-card,.employee-command,.employee-chat-filterbar,.profile-identity-card,.profile-section,.profile-section-card,.insight-summary>article,.month-comparison,.finance-verdict,.dialog-pane,.conversation-pane,.chat-client-panel,.chat-inspector,.chat-assistant-panel,.notification-item,.client-block,.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel,[data-dashboard-widget]) { border:0;box-shadow:none!important;--motion-hover-progress:0;--motion-glass:linear-gradient(145deg,rgba(var(--motion-panel-top-rgb,10,18,24),calc(var(--motion-panel-alpha-top,.76) * (1 - var(--motion-hover-progress)) + var(--motion-panel-hover-top,.86) * var(--motion-hover-progress))),rgba(var(--motion-panel-bottom-rgb,12,22,29),calc(var(--motion-panel-alpha-bottom,.64) * (1 - var(--motion-hover-progress)) + var(--motion-panel-hover-bottom,.74) * var(--motion-hover-progress))));transition:--motion-hover-progress var(--motion-hover-duration,250ms) ease; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content :is(.panel,.card,.stat,.employee-card,.employee-command,.employee-chat-filterbar,.profile-identity-card,.profile-section,.profile-section-card,.insight-summary>article,.month-comparison,.finance-verdict,.dialog-pane,.conversation-pane,.chat-client-panel,.chat-inspector,.chat-assistant-panel,.notification-item,.client-block,.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel,[data-dashboard-widget]):hover { --motion-hover-progress:1;box-shadow:none!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .content :is(.panel,.card,.stat,.employee-card,.employee-command,.employee-chat-filterbar,.profile-identity-card,.profile-section,.profile-section-card,.insight-summary>article,.month-comparison,.finance-verdict,.dialog-pane,.conversation-pane,.chat-client-panel,.chat-inspector,.chat-assistant-panel,.notification-item,.client-block,[data-dashboard-widget]):not(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel):hover { background:var(--motion-glass); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail :is(.client-identity-card,.client-relationship-card,.client-operation-card,.lifecycle-panel)::before { background:var(--motion-glass); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-task-list { overflow:hidden;flex:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-client-detail .motion-client-task-body { overflow:hidden; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-account-switcher-menu { width:260px;min-width:0;max-width:calc(100vw - 32px); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-account-switcher-menu :is(button,a) { min-height:34px;padding:8px 12px;font-size:12px; }

/* Shared dark CRM controls, including previews and dialogs outside Client Detail. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.access-role-item,.dialog-row):hover { outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .icon-btn[aria-label^="Закрыть"] { place-items:center;width:40px;min-width:40px;height:40px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:0;font-size:30px;line-height:1;flex-shrink:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .icon-btn[aria-label^="Закрыть"] svg { width:24px;height:24px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .icon-btn[aria-label^="Закрыть"]:hover { color:var(--motion-danger-hover,#ff8397);background:transparent;border:0;outline:0;box-shadow:none;transform:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .icon-btn[aria-label^="Закрыть"]:focus-visible { outline:1px solid var(--muted);outline-offset:1px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .linked-profile-create-dialog { width:min(660px,calc(100vw - 32px)); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;align-items:end;padding:14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later>label { display:block;grid-column:1;grid-row:1;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later>label:has(input) { display:contents; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later label>span { grid-column:1;grid-row:1;white-space:nowrap; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later small { grid-column:1;grid-row:2;font-size:12px;line-height:1.4; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-api-later input[type="checkbox"] { grid-column:2;grid-row:1/span 2;align-self:end;margin:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-head { display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:6px 10px;position:relative; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-identity { grid-column:1;grid-row:1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-head-actions { display:contents; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-close { grid-column:2;grid-row:1;align-self:start; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-account-switcher { grid-column:1/-1;grid-row:2;justify-self:start; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-account-trigger { min-height:30px;padding:4px 9px;box-shadow:none;border:0;background:rgba(var(--motion-control-rgb,240,247,247),.035); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-account-trigger:hover { transform:none;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-account-stack { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-account-menu { left:0;right:auto;max-width:calc(100vw - 48px);background:var(--motion-glass-strong);backdrop-filter:blur(30px); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-preview-access { flex:none;padding:8px 0;border:0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-secret-row { grid-template-columns:54px minmax(0,1fr) auto 28px;gap:6px;margin:4px 0;padding:6px 8px;border:0!important;min-height:34px;background:rgba(var(--motion-control-rgb,240,247,247),.035);border-radius:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-secret-row code { cursor:pointer; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .credential-copy-icon { display:grid;place-items:center;width:28px;height:28px;padding:3px;border:0;background:transparent;box-shadow:none;color:var(--muted);cursor:pointer; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .credential-copy-icon:hover { color:var(--text);background:transparent;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .credential-copy-icon svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-copy-all { display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:6px;min-height:32px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .preview-copy-all svg { width:18px;height:18px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar .numInputWrapper>span { background:transparent!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .note-icon-button { width:24px;height:24px;padding:2px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;outline:0;color:var(--muted); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .note-icon-button .icon-svg { width:20px;height:20px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .note-icon-button:hover { color:var(--text);background:transparent;outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .note-icon-button:is(.is-danger,[data-note-delete]):hover { color:var(--motion-danger-hover,#ff8397); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .note-icon-button:focus-visible { outline:1px solid var(--muted);outline-offset:2px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .crm-note-actions form { flex:none;overflow:visible; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .flatpickr-calendar .numInputWrapper:hover { background:transparent; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .btn { border-radius:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .btn.primary { border-color:transparent;background:linear-gradient(135deg,#6487d6,#5879c9); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .btn.primary:hover { background:linear-gradient(135deg,#6c90df,#6082d2);border-color:transparent;outline:0; }
/* Quiet controls across the dark CRM: state uses fill, never a blue field halo. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select,.crm-select-trigger):is(:hover,:focus,:focus-visible) { outline:0!important;box-shadow:none!important;border-color:var(--border); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.btn,.icon-btn,.row-actions a,.access-role-item,.dialog-row):hover { outline:0;box-shadow:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(input,textarea,select,.crm-select-trigger):focus-visible { background-color:var(--motion-control-surface,#203442); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(button,.btn,summary,[role="button"]):focus-visible { outline:0;box-shadow:none;filter:brightness(1.12); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.global-search,.profile-upload-control,.client-block,.client-row):focus-within { outline:0;box-shadow:none;border-color:var(--border); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.workspace-resizer,.client-workspace-resizer) { cursor:col-resize;background:transparent!important;outline:0!important;box-shadow:none!important;border:0!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.workspace-resizer,.client-workspace-resizer)::after { background:transparent!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) :is(.workspace-resizer,.client-workspace-resizer):focus-visible::after { background:var(--motion-link-ink,#a8baff)!important; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .crm-tooltip { width:max-content;max-width:min(320px,calc(100vw - 28px));padding:6px 9px;border-radius:8px;font-size:11px;line-height:1.35;box-shadow:none; }
@media(max-width:760px) { [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .crm-tooltip { left:50%!important;right:auto!important;transform:translateX(-50%);max-width:calc(100vw - 28px);width:max-content; } }

[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .overview-v2:not(.layout-editing) .dashboard-widget-grid>[data-dashboard-widget] { transition:--motion-hover-progress var(--motion-hover-duration,250ms) ease; }
[data-reduced-motion="true"] { --motion-hover-duration:0ms; }
@media(prefers-reduced-motion:reduce) { [data-design="motion"] { --motion-hover-duration:0ms; } }


/* Calls use the same readable dark surfaces as the rest of the workspace. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-demo-strip .calls-settings-link { color:var(--motion-readable-ink,#edf3f8);background:var(--motion-message-surface,#142632);border:0;font-size:13px;min-height:36px;padding:8px 14px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-dial form>.dialog-actions { margin:0;padding:8px 24px 24px;gap:10px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone { position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 40px);padding:24px;border:0;border-radius:24px;background:var(--motion-call-surface,#101e29);box-shadow:none;overflow:auto;color:var(--motion-readable-ink,#edf3f8);text-align:center; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone:not([open]) { display:none; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone::backdrop { background:rgba(4,10,18,.6);backdrop-filter:blur(5px); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone .panel-head { margin-bottom:24px;text-align:left; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone h2 { font-size:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-caller-avatar { display:grid;place-items:center;width:80px;height:80px;margin:0 auto 20px;border-radius:50%;background:var(--motion-avatar-surface,#243c50);color:var(--motion-link-ink,#a7c6ff); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-caller-avatar svg { width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.6; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone [data-phone-name] { display:block;font-size:23px;line-height:1.3; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone [data-phone-number] { font-size:18px;margin:8px 0 12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .calls-phone [data-phone-state] { color:var(--motion-muted-ink,#a9bac8);font-size:12px;line-height:1.5;margin:16px 0 24px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions { display:flex;justify-content:center;gap:16px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .btn { display:flex;flex-direction:column;justify-content:center;gap:8px;min-width:116px;min-height:76px;padding:12px 20px;border:0;border-radius:18px;color:#fff;font-size:13px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .icon-svg { width:25px;height:25px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .call-accept { background:#21865a; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .call-accept:hover { background:#299c6b; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .call-decline { background:#bd4357; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-actions .call-decline:hover { background:#d14d63; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .call-phone-client { margin:16px auto 0; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .profile-section-card { background:var(--motion-glass);border:0;border-radius:20px;box-shadow:none!important;backdrop-filter:blur(var(--motion-blur)) saturate(var(--motion-saturation)); }

/* Compact incident editor; the journal retains its own scroll for longer history. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-incidents-content>.incident-layout { flex:1;min-height:0;grid-template-columns:minmax(360px,460px) minmax(0,1fr); }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-layout>:is(.incident-form-card,.incident-list) { min-height:0;overflow:auto;overscroll-behavior:contain; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card form { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin-top:12px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card label { min-width:0;font-size:11px;gap:4px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card label:has(textarea),[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card label:has(input[type="number"]),[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card form>.btn { grid-column:1/-1; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card textarea { min-height:56px;height:64px;max-height:96px;resize:vertical; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card :is(input,.crm-select-trigger) { min-height:38px;height:38px;padding-block:8px; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-form-card .crm-number-stepper { min-height:38px; }
@media(max-width:760px) { [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .motion-incidents-content>.incident-layout { grid-template-columns:1fr;overflow:auto; } [data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .incident-layout>:is(.incident-form-card,.incident-list) { overflow:visible; } }

/* Optional initial term follows the existing API-later switch. */
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) .client-term-settings { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;align-items:center; }
.client-term-settings>label { grid-column:1;grid-row:1; }
.client-term-settings>input[type="checkbox"] { grid-column:2;grid-row:1; }
.client-term-settings .client-term-days { grid-column:1/-1;display:grid;gap:8px;margin-top:8px; }
.client-term-settings .client-term-days[hidden],.client-term-days input[hidden] { display:none; }
.client-term-days>label { font-size:13px; }
.client-term-days small { color:var(--muted);font-size:12px;line-height:1.4; }
[data-design="motion"]:is([data-theme="dark"],[data-theme="light"]) [data-client-modal] .client-term-settings .client-term-days>* { grid-column:1/-1;grid-row:auto; }
.client-term-days [data-client-term-manual][hidden] { display:none; }
