/* Interior components: navigation and customer/printed documents excluded. */
@media screen and (max-width:900px){
 .v2-tour .v2-tour-card{box-sizing:border-box;padding:18px!important;overflow-y:auto;overscroll-behavior:contain;border-radius:20px!important}
 .v2-tour .v2-tour-card h2{font-size:19px!important;margin:8px 0!important;line-height:1.25!important}
 .v2-tour .v2-tour-card p{font-size:14px!important;line-height:1.45!important;margin:0 0 14px!important}
 .v2-tour .v2-tour-card footer{position:sticky;bottom:-18px;background:#fff;padding:8px 0;gap:6px}
 .v2-tour .v2-tour-card button{min-height:44px!important}
 .v2-tour .v2-tour-dim{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;touch-action:none}
 .v2-tour .v2-tour-spot[hidden]{display:none!important}
}
@media screen and (max-width:700px){
 body.crm-staff #client-detail-content .task-row{display:grid!important;grid-template-columns:32px minmax(0,1fr) 36px;gap:8px 10px;padding:12px!important;align-items:start}
 body.crm-staff #client-detail-content .task-row .task-text{min-width:0;font-size:14px;line-height:1.45}
 body.crm-staff #client-detail-content .task-row .task-check{grid-column:1;grid-row:1}
 body.crm-staff #client-detail-content .task-row .task-meta{grid-column:2 / 4;grid-row:2;text-align:left}
 body.crm-staff #client-detail-content .task-row .del-task-btn{grid-column:3;grid-row:1;min-width:32px;padding:4px!important}
 body.crm-staff .ws-task-add{display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px}
 body.crm-staff .ws-task-add :is(input,button){width:100%;min-width:0;box-sizing:border-box}
 body.crm-staff #kanban-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible!important;gap:8px;padding:10px!important}
 body.crm-staff #kanban-filters .period-pills{grid-column:1 / -1;display:flex;min-width:0}
 body.crm-staff #kanban-filters .period-pill{flex:1;min-width:0;padding:8px 3px;font-size:12px}
 body.crm-staff #kanban-filters .kfilter-divider{display:none}
 body.crm-staff #kanban-filters select{min-width:0;width:100%}
 body.crm-staff #btn-fab-client{right:76px!important}
 body.crm-staff #supplier-orders-section>div:first-child{flex-wrap:wrap;align-items:center!important}
 body.crm-staff #supplier-orders-section>div:first-child h3{flex-basis:100%;margin:0}
 body.crm-staff #supplier-orders-section :is(button,.btn){flex:0 0 auto;white-space:nowrap;max-width:100%}
 body.crm-staff #pane .tbl{overflow:visible}
 body.crm-staff #pane .tbl table{display:block;min-width:0;width:100%}
 body.crm-staff #pane .tbl thead{display:none}
 body.crm-staff #pane .tbl tbody{display:grid;gap:12px}
 body.crm-staff #pane .tbl tr{display:grid;padding:12px;background:#fff;border:1px solid #e4e5ed;border-radius:14px;gap:8px}
 body.crm-staff #pane .tbl td{display:grid;grid-template-columns:minmax(80px,.8fr) minmax(0,1.2fr);gap:10px;padding:0;border:0;overflow-wrap:anywhere;align-items:start}
 body.crm-staff #pane .tbl td::before{content:attr(data-label);color:#787985;font-size:12px}
 body.crm-staff #pane .tbl td[colspan]{display:block}
 body.crm-staff #pane .tbl td[colspan]::before{display:none}
 body.crm-staff #pane :is(input,select,textarea){min-width:0!important;max-width:100%;box-sizing:border-box}
}
@media screen {
 body.crm-staff .me {gap:18px;padding:20px;min-height:0}
 body.crm-staff .me-main {padding:0;min-width:0}
 body.crm-staff .me-side {border:1px solid #e4e5ed;border-radius:18px;background:#ffffffed;overflow:hidden}
 body.crm-staff .me-empty {display:grid;justify-items:center;gap:12px;padding:48px 24px;background:linear-gradient(130deg,#eceef5,#faf5e9);color:#40434e;text-align:center}
 body.crm-staff .me-empty strong {font-size:18px}
 body.crm-staff .me-empty p {margin:0;color:#6c707d;font-size:14px}
 body.crm-staff .me-btn {border-radius:10px;min-height:40px;font-size:14px}
 body.crm-staff .me-modal-bg {z-index:40000;backdrop-filter:blur(8px)}
 body.crm-staff .me-modal {background:#fff;border:1px solid #fff;border-radius:20px}
 body.crm-staff .me-modal textarea {min-height:160px}
 body.crm-staff #st-who {display:block;font-size:13px!important;font-weight:400;letter-spacing:0;word-spacing:normal;line-height:1.5;margin-top:8px}
 body.crm-staff .finance-metric small {display:block;min-height:2.9em;line-height:1.45}
 @media(min-width:701px){
  body.crm-staff.crm-statement #main-table .dr>td.no-print label {display:inline-flex!important;align-items:center;gap:5px;margin-right:8px}
  body.crm-staff.crm-statement #main-table .dr>td.no-print {min-width:210px}
 }
 /* One control grammar across the staff content, independent of old page CSS. */
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(.btn,.crm-btn,button.btn--sm) {box-sizing:border-box;min-height:40px;padding:8px 14px;font-size:14px!important;font-weight:500;line-height:1.4!important;letter-spacing:0;gap:7px}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(.btn-ghost,.btn--sm,.crm-btn--ghost,.crm-btn--sm) {border-radius:10px;box-shadow:none}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {font-family:var(--crm-font);font-size:14px!important;line-height:1.45!important;border-color:#dfe0e8;border-radius:10px;min-width:0}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select){min-height:40px}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) label {font-size:13px!important;font-weight:500;line-height:1.45!important;letter-spacing:0}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) input[type=file]::file-selector-button {font:500 13px var(--crm-font);padding:7px 10px;margin-right:10px;background:#eaeaf1;border:0;border-radius:7px;color:#454752}
 body.crm-staff :is(.users-table,.clients-table,.finance-page table,.expense-ledger,.wrap table) th {background:#f5f5f9!important;color:#7b7d88!important;font-size:13px!important;font-weight:500!important;text-transform:none!important;letter-spacing:0!important}
 body.crm-staff :is(.users-table,.clients-table,.finance-page table,.expense-ledger,.wrap table) td {font-size:14px!important;line-height:1.5!important;border-color:#ececf2}
 body.crm-staff .staff-action-icon {display:inline-block;vertical-align:middle;flex:none;margin-right:4px}
 body.crm-staff :is(.modal-close,.xbtn,.sec-btn,.pw-toggle)>.staff-action-icon {margin:0}
 body.crm-staff .modal-close {display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#eeeef4;border:0;color:#797b87}
 body.crm-staff .modal label {text-transform:none!important}
 body.crm-staff .modal {background:#fff;border:1px solid #ffffffc0}
 body.crm-staff.crm-statement #main-table .sum-c,body.crm-staff.crm-statement #main-table .sum-f {color:#343640;font-weight:600}
 body.crm-staff.crm-statement #main-table .sec-total-row td {background:#f3f4f8;border-block:1px solid #e6e7ed;padding:10px!important}
 body.crm-staff.crm-statement #main-table .sec-total-row .lbl {font-style:normal;font-weight:500}
 body.crm-staff.crm-statement #main-table .grand-total-row :is(.sum-c,.sum-f){color:#ffe18a}
 body.crm-staff.crm-statement #main-table .sec-inner {padding:12px 14px}
 body.crm-staff.crm-statement #main-table .sec-title {text-transform:none;font-weight:600;color:#3c3e48}
 body.crm-staff.crm-statement #main-table :is(.sb,.xbtn){display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;border:0;border-radius:8px;padding:5px 9px;background:#f0f1f6;color:#727580;font:500 13px var(--crm-font)}
 body.crm-staff.crm-statement #main-table .sb-del {background:transparent;color:#9b6c66}
 body.crm-staff.crm-statement #main-table .row-color {width:24px;height:24px;min-height:24px;padding:3px;border-radius:8px}
 body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td {padding:10px!important;font-size:14px!important}
 body.crm-staff .dashboard-group {padding:20px;margin-bottom:18px;border:1px solid #e4e5ed;border-radius:20px;background:linear-gradient(125deg,#fffffff0,#ffffffb8)}
 body.crm-staff .dashboard-group h2 {margin:0 0 16px;font-size:18px!important;font-weight:600}
 body.crm-staff #dashboard-content .kpi-grid {gap:0;margin:0;grid-template-columns:repeat(4,minmax(0,1fr))}
 body.crm-staff .dashboard-group:first-child .kpi-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
 body.crm-staff #dashboard-content .kpi-card {border:0;border-radius:0;background:transparent;box-shadow:none;padding:14px 16px;display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-width:0;border-bottom:1px solid #ececf2}
 body.crm-staff #dashboard-content .kpi-label {text-transform:none;font-weight:500;color:#797b87;font-size:13px!important}
 body.crm-staff #dashboard-content .kpi-value {font-size:21px!important;letter-spacing:-.025em;line-height:1.3!important;overflow-wrap:anywhere}
 body.crm-staff #dashboard-content .kpi-value[style*="--sun"] {color:#957319!important}
 body.crm-staff #dashboard-content .detail-card {border-radius:20px;box-shadow:none;border-color:#e4e5ed;padding:20px}
 body.crm-staff #dashboard-content .detail-card>h3 {font-size:16px!important;font-weight:600;color:#42444e}
 body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,.company-page,.ws) :is(.btn-ghost,.btn--sm,.crm-btn--ghost,.crm-btn--sm){font-size:13px!important;font-weight:500}
 body.crm-staff :is(.modal,.finance-modal,.expense-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#f7f7fa;border-color:#e0e1e9;border-radius:10px}
 body.crm-staff :is(.modal,.finance-modal,.expense-dialog) label {font-weight:500}
 body.crm-staff :is(.ws-card,.detail-card){border-color:#e4e5ed;box-shadow:0 3px 12px #25263706;border-radius:18px}
 body.crm-staff .ws-tabs .ws-tab {border-bottom:0!important;border-radius:10px;padding:9px 14px;font-weight:500;white-space:nowrap}
 body.crm-staff .ws-tabs .ws-tab[aria-selected=true] {background:#fff;box-shadow:0 2px 5px #2526370b;color:#292b34}
 body.crm-staff .ws-tabs .ws-tab::after {display:none}
 body.crm-staff .ws-count {background:#edeef3!important;color:#666875!important}
 body.crm-staff .ws-tabs {overflow-x:auto;flex-wrap:nowrap}
 body.crm-staff .wrap>.tabs {display:flex;width:fit-content;max-width:100%;padding:4px;gap:4px;border:1px solid #fff;border-radius:13px;background:#e8e9efb0}
 body.crm-staff .wrap>.tabs button {border:0;min-height:36px;padding:7px 14px;border-radius:9px;font-size:14px!important;font-weight:500}
 body.crm-staff .wrap>.tabs button.on {background:#fff;box-shadow:0 2px 5px #25263710}
 body.crm-staff #pane .grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 body.crm-staff #pane .grid :is(input,select){width:100%;background:#f7f7fa;border-color:#e0e1e9;border-radius:10px;height:42px}
 body.crm-staff #pane .grid label {font-weight:500;font-size:13px!important}
 body.crm-staff #pane .card {padding:22px;border-radius:20px}
 body.crm-staff #groups details {padding:18px 20px;border:1px solid #e4e5ed;border-radius:18px;box-shadow:0 2px 8px #25263704}
 body.crm-staff #groups details[open] summary {margin-bottom:18px}
 body.crm-staff #groups summary {font-size:15px!important;font-weight:600;color:#3c3e48}
 body.crm-staff #groups :is(input,textarea){background:#f7f7fa;border-color:#e0e1e9;border-radius:10px}
 body.crm-staff .st-steps {align-items:start}
 body.crm-staff.crm-statement .st-steps {padding-top:0;margin-top:18px;gap:12px}
 body.crm-staff.crm-statement .st-head .st-title {margin-bottom:0}
 body.crm-staff.crm-statement .st-more {padding:0;margin:0;background:transparent;border:0;box-shadow:none}
 body.crm-staff.crm-statement .st-actions {gap:8px}
 body.crm-staff.crm-statement .st-actions .crm-save--idle:empty {display:none}
 body.crm-staff #view-users :is(th,td){padding:14px 18px!important}
 body.crm-staff #view-users th {font-weight:500}
 @media(max-width:700px){
  /* Phone: no global page header, and no continuously composited blur layers. */
  body.crm-staff #mobile-topbar {display:none!important}
  body.crm-staff .main-content {padding-top:0!important}
  body.crm-staff,body.crm-staff * {backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  body.crm-staff {background:#f4f4f8}
  body.crm-staff :is(.bottom-nav,.v2-flow-panel,.crmnav-drawer,.v2-flow-drawer) {background:#fafafd!important}
  body.crm-staff :is(.v2-tour-dim,.v2-kp-shade,.crmnav-shade) {backdrop-filter:none!important;background:#24263166}
  body.crm-staff .crmnav-mobile-actions {display:flex;gap:8px;padding:12px 18px}
  body.crm-staff .crmnav-mobile-actions button {flex:1;min-height:44px;border:1px solid #dfe0e8;border-radius:10px;background:#fff;color:#30323b;font:500 14px var(--crm-font)}
  body.crm-staff .v2-demo-banner {position:static;margin:12px 12px 110px;padding:10px;border-radius:12px;background:#e8e9f0;color:#626572;font-size:11px}
  body.crm-staff .v2-demo-banner button {color:#67521b}
  body.crm-staff .me {padding:16px 12px 100px;gap:18px}
  body.crm-staff .me-main {min-height:0}
  body.crm-staff .me :is(.me-btn,.me-row-act button) {min-height:44px}
  body.crm-staff .me-side {min-height:0;height:auto}
  body.crm-staff .me-list {flex:none}
  body.crm-staff .me-modal-bg {padding:12px}
  body.crm-staff .savebar {position:relative;bottom:auto;margin-bottom:76px;border-radius:12px;padding:14px;background:#ffffffd9;flex-wrap:wrap;gap:10px}
  body.crm-staff .savebar button {min-height:44px;border-radius:12px;font-size:14px}
  body.crm-staff .ws-card-head {flex-wrap:wrap;gap:10px}
  body.crm-staff .ws-card-head h3 {flex:1 0 100%;word-break:normal;overflow-wrap:normal}
  body.crm-staff .ws-card div:has(> #cab-doc-new) {flex-wrap:wrap}
  body.crm-staff #cab-doc-new {flex:1 0 100%!important;width:100%}
  body.crm-staff #view-clients .toolbar {display:grid;grid-template-columns:1fr 1fr}
  body.crm-staff #view-clients .toolbar input[type=search] {grid-column:1/-1;width:100%}
  body.crm-staff :is(#view-clients,#view-users,#view-archive) :is(table,tbody) {display:block;min-width:0!important;width:100%}
  body.crm-staff :is(#view-clients,#view-users,#view-archive) table {background:transparent!important;box-shadow:none;border:0}
  body.crm-staff :is(#client-tbody,#archive-tbody) code {font-family:var(--crm-font);font-size:12px}
  body.crm-staff :is(#view-clients,#view-users,#view-archive) thead {display:none}
  body.crm-staff :is(#client-tbody,#archive-tbody,.users-table tbody)>tr:not(.v2-empty-row) {display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px;margin-bottom:12px;border:1px solid #e4e5ed;border-radius:18px;background:#fff}
  body.crm-staff :is(#client-tbody,#archive-tbody,.users-table tbody)>tr>td {display:block;min-width:0;border:0!important;padding:0!important;text-align:left!important;overflow-wrap:anywhere}
  body.crm-staff :is(#client-tbody,#archive-tbody) td:nth-child(2) {grid-column:1/-1;grid-row:1;font-size:17px!important}
  body.crm-staff :is(#client-tbody,#archive-tbody) td:first-child {grid-column:1/-1;color:#81838e;white-space:nowrap}
  body.crm-staff :is(#client-tbody,#archive-tbody) td:nth-child(3)::before {content:'Телефон';}
  body.crm-staff :is(#client-tbody,#archive-tbody) td:nth-child(4)::before {content:'Источник';}
  body.crm-staff #client-tbody td:nth-child(5)::before {content:'Оплата';}
  body.crm-staff #client-tbody td:nth-child(6)::before,body.crm-staff #archive-tbody td:nth-child(5)::before {content:'Этап';}
  body.crm-staff #client-tbody td:nth-child(7)::before,body.crm-staff #archive-tbody td:nth-child(6)::before {content:'Менеджер';}
  body.crm-staff #client-tbody td:nth-child(8)::before {content:'Следующий контакт';}
  body.crm-staff #archive-tbody td:nth-child(7)::before {content:'Дата архивации';}
  body.crm-staff :is(#client-tbody,#archive-tbody,.users-table tbody) td::before {display:block;font-size:12px;font-weight:400;color:#81838e;margin-bottom:4px}
  body.crm-staff .users-table td:first-child,body.crm-staff .users-table td:last-child {grid-column:1/-1}
  body.crm-staff .users-table td:nth-child(2)::before {content:'Логин';}
  body.crm-staff .users-table td:nth-child(3)::before {content:'Роль';}
  body.crm-staff :is(#view-clients,#view-users) .v2-directory-card {background:transparent;box-shadow:none;border:0;border-radius:0;overflow:visible}
  body.crm-staff .wrap>.tabs button {min-height:44px}
  body.crm-staff.crm-statement #main-table .dr[data-eid]>td:empty:not([contenteditable]) {display:none}
  body.crm-staff.crm-statement #main-table .pay-btn {min-width:44px;min-height:44px}
  body.crm-staff :is(.modal-close,.pw-toggle) {min-width:44px;min-height:44px}
  body.crm-staff.crm-statement #main-table :is(.sb,.xbtn,.row-color) {min-width:44px;min-height:44px}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td.no-print label {display:flex;align-items:center;gap:8px;min-height:44px}
  body.crm-staff.crm-statement .tbl-wrap:has(#main-table){overflow:visible;background:transparent;border:0;border-radius:0}
  body.crm-staff.crm-statement #main-table {display:block;min-width:0!important;width:100%;background:transparent}
  body.crm-staff.crm-statement #main-table thead {display:none}
  body.crm-staff.crm-statement #main-table tbody {display:block}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid]) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;margin:10px 0;background:#fff;border:1px solid #e1e3eb;border-radius:18px}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td {display:block;min-width:0;min-height:58px;background:var(--row-bg,#f6f7fa);border:1px solid #ececf2!important;border-radius:10px;padding:9px 10px!important;text-align:left;font-style:normal!important;overflow-wrap:anywhere;font-size:16px!important;color:#343640}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td::before {content:attr(data-column);display:block;font:500 11px/1.4 var(--crm-font);color:#7e808c;margin-bottom:5px}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td:first-child {display:none}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td[data-field=name] {grid-column:1/-1;background:transparent;border:0!important;font-weight:600;min-height:44px}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td[data-field=note] {grid-column:1/-1}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td.no-print {grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;min-height:44px;background:transparent;border:0!important}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td.no-print::before {display:none}
  body.crm-staff.crm-statement #main-table .dr:is([data-rid],[data-eid])>td.no-print label {margin-right:auto}
  body.crm-staff.crm-statement #main-table .date-inp {width:100%;min-width:0;min-height:30px;font-size:16px!important}
  body.crm-staff.crm-statement #main-table :is(.sec-row,.sub-hdr-row,.exp-sec) {display:block;margin:14px 0 8px}
  body.crm-staff.crm-statement #main-table :is(.sec-row,.sub-hdr-row,.exp-sec)>td {display:block;border:0;padding:0!important;background:transparent}
  body.crm-staff.crm-statement #main-table .sec-inner {flex-wrap:wrap;padding:12px;background:#e9eaf0;border-radius:12px;gap:8px}
  body.crm-staff.crm-statement #main-table .sec-title {flex:1 0 100%;font-size:15px!important}
  body.crm-staff.crm-statement #main-table :is(.sec-total-row,.grand-total-row,.exp-total-row) {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;border-radius:12px;padding:10px;background:#eeeef4}
  body.crm-staff.crm-statement #main-table :is(.sec-total-row,.grand-total-row,.exp-total-row)>td {display:block;flex:1;padding:6px!important;border:0!important;min-width:65px;text-align:right}
  body.crm-staff.crm-statement #main-table :is(.sec-total-row,.grand-total-row,.exp-total-row)>td:empty {display:none}
  body.crm-staff.crm-statement #main-table :is(.sec-total-row,.grand-total-row,.exp-total-row)>.lbl {flex:1 0 100%;text-align:left;background:transparent}
  body.crm-staff.crm-statement #main-table .grand-total-row {background:#292b33}
  body.crm-staff.crm-statement #main-table [data-role="tot-sumc"]::before {content:'По договору';display:block;font:500 11px/1.5 var(--crm-font);opacity:.65}
  body.crm-staff.crm-statement #main-table [data-role="tot-sumf"]::before {content:'По факту';display:block;font:500 11px/1.5 var(--crm-font);opacity:.65}
  body.crm-staff.crm-statement #main-table [data-role="tot-diff"]::before {content:'Отклонение';display:block;font:500 11px/1.5 var(--crm-font);opacity:.65}
  body.crm-staff .ws-head {position:relative;top:auto!important;backdrop-filter:none;padding-top:12px}
  body.crm-staff .ws-head .ws-id {min-width:0}
  body.crm-staff .ws-head .ws-name {font-size:26px!important}
  body.crm-staff .ws-actions {gap:8px;margin-top:4px}
  body.crm-staff .ws-stage-display {margin-top:14px}
  body.crm-staff .ws-head .ws-tabs {margin-top:12px}
  body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {font-size:16px!important}
  body.crm-staff :is(.view,.finance-page,.expense-page,.wrap,#groups,#material-purchases,.meta-card,.st-head,.modal,.finance-modal,.expense-dialog,.cd-editor) :is(.btn,.crm-btn,button.btn--sm) {min-height:44px}
  body.crm-staff.crm-statement .st-head {padding:16px}
  body.crm-staff.crm-statement .st-title span {font-size:23px!important}
  body.crm-staff.crm-statement .st-steps {gap:8px;margin-top:14px}
  body.crm-staff.crm-statement .st-steps>li {padding:10px 12px}
  body.crm-staff.crm-statement .st-top {gap:12px}
  body.crm-staff.crm-statement .st-meta {gap:8px;align-items:start}
  body.crm-staff #dashboard-content .kpi-grid,body.crm-staff .dashboard-group:first-child .kpi-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  body.crm-staff .dashboard-breakdown {grid-template-columns:1fr!important}
  body.crm-staff .dashboard-group {padding:14px}
  body.crm-staff #dashboard-content .kpi-card {padding:12px 8px}
  body.crm-staff #dashboard-content .kpi-value {font-size:19px!important}
  body.crm-staff #pane .grid {grid-template-columns:1fr}
  body.crm-staff #pane .card {padding:16px}
 }
}

/* Approved palette 02 for desktop and mobile. Screen only; print remains unchanged. */
@media screen {
 body.crm-staff{
  background:radial-gradient(ellipse at 75% 0%,#f2e6cf80,transparent 48%),radial-gradient(ellipse at 10% 45%,#c9d6e33b,transparent 55%),linear-gradient(135deg,#e8ecef,#f4f4f2 70%,#e8edf0)!important;
  color:#272e34;
 }
 body.crm-staff :is(.sidebar,.crmnav-side){
  background:linear-gradient(105deg,#ffffffdb,#dce3e9c9)!important;
  border:1px solid #fffffff0!important;
  box-shadow:inset 1px 0 #fff,0 8px 28px #293c5010!important;
  backdrop-filter:blur(26px) saturate(125%);
 }
 body.crm-staff :is(.sidebar .sidebar-nav a.nav-link,.crmnav-side a.crmnav-link){color:#63727e!important}
 body.crm-staff :is(.sidebar .sidebar-nav a.nav-link,.crmnav-side a.crmnav-link).active{
  background:linear-gradient(135deg,#3d4a55,#242e37)!important;color:#f3d788!important;
  box-shadow:inset 0 1px #ffffff38,0 4px 10px #18232e1a!important;
 }
 body.crm-staff :is(.sidebar .sidebar-nav a.nav-link,.crmnav-side a.crmnav-link):hover:not(.active){background:#ffffff8c!important;color:#273b4b!important}
 body.crm-staff :is(.sidebar .crmnav-toggle,.sidebar-footer,.sidebar-footer button,.sidebar .crmnav-logout){color:#647582!important;background:transparent!important;border-color:#cdd7df!important}
 body.crm-staff .v2-demo-banner{background:#e3e8ebb3!important;color:#5d6a74;border-bottom:1px solid #ffffffb0}
 body.crm-staff .v2-demo-banner button{color:#796126!important}
 body.crm-staff .v2-flow-panel{
  background:linear-gradient(145deg,#ffffffc9,#e6edf2b0)!important;
  border-color:#fffffff0!important;box-shadow:inset 0 1px #fff,0 12px 30px #233b510a!important;
 }
 body.crm-staff .v2-flow-panel>header,body.crm-staff .v2-widget:last-child{
  background:radial-gradient(ellipse at 0 0,#b0c5d43b,transparent 85%),linear-gradient(135deg,#354551,#232d36)!important;
 }
 body.crm-staff :is(.v2-widget,.v2-project-card){
  background:linear-gradient(150deg,#fffffffa,#ffffffb5)!important;border-color:#ffffffed!important;
  box-shadow:inset 0 1px #fff,0 6px 22px #344d6408!important;
 }
 body.crm-staff .v2-widget:first-child,body.crm-staff .flow-summary{
  background:radial-gradient(ellipse at 90% 0,#fff9e8bb,transparent 70%),linear-gradient(135deg,#f2d68c,#f6e9c8)!important;
  border-color:#ffffffc9!important;color:#574627!important;
 }
 body.crm-staff .v2-widget:last-child{
  background:radial-gradient(ellipse at 0 0,#b0c5d43b,transparent 85%),linear-gradient(135deg,#354551,#232d36)!important;
  border-color:#ffffff50!important;
 }
 body.crm-staff :is(.tasks-view-toggle,.flow-tabs){background:#d9e1e880!important;border-color:#ffffffc9!important}
 body.crm-staff :is(.tasks-view-toggle .active,.flow-tabs button[aria-selected=true]){background:#fffffff2!important;color:#2d3b46!important}
 body.crm-staff .v2-project-icon{background:linear-gradient(140deg,#e3eaf0,#eff3f6)!important;color:#5d778b!important}
 body.crm-staff :is(.v2-widget:not(:first-child):not(:last-child),.v2-project-card) :is(small,.v2-project-client),
 body.crm-staff :is(.task-client,.task-meta:not(.task-overdue),.view-sub,.flow-task a,.flow-note){color:#72808b!important}
 body.crm-staff .v2-project-card footer,body.crm-staff .flow-task{border-color:#dbe3e9!important}
 body.crm-staff :is(.task-check,.flow-task [data-done]){border-color:#d1dbe3!important}

 body.crm-staff {--ink:#272e34;--steel:#72808b;--bone:#e9eef2}
 body.crm-staff .v2-widget:last-child {color:#fff!important}
 body.crm-staff .v2-widget:last-child :is(span,small){color:#c7d3d9!important}
 body.crm-staff .v2-widget:last-child b{color:#fff!important}
 body.crm-staff .v2-flow-panel>header small{color:#c4cfd3}
 body.crm-staff :is(.btn-primary,.crm-btn--primary,.flow-primary),
 body.crm-staff.crm-calculator #tb button.pri{background:linear-gradient(145deg,#fbe3a2,#edc15f)!important;border-color:#e4c277!important;color:#3e3524!important}
 body.crm-staff :is(.task-overdue,.flow-due.late){color:#a85d42!important}
 body.crm-staff :is(.task-check,.flow-task [data-done]){background:#ffffffa6!important}
 body.crm-staff :is(.crmnav-side .crmnav-toggle,.crmnav-side .crmnav-foot,.crmnav-side .crmnav-logout,.crmnav-side .crmnav-ctx,.sidebar-footer svg){color:#647582!important;border-color:#cdd7df!important;background:transparent!important}
 body.crm-staff :is(.sidebar,.crmnav-side) :is(.crmnav-section,.nav-section-title){color:#6a7b88!important}
 body.crm-staff .ws-head{background:transparent!important}
 body.crm-staff.crm-calculator #tb{background:radial-gradient(ellipse at 0 0,#b0c5d43b,transparent 85%),linear-gradient(135deg,#354551,#232d36)!important}
 body.crm-staff.crm-calculator #lft{background:linear-gradient(145deg,#ffffffef,#e6edf2dd)!important}
}

@media screen and (max-width:900px){
 body.crm-staff #bottom-nav{background:linear-gradient(135deg,#f9fbfc,#e8eef3)!important;border-color:#fff!important}
 body.crm-staff #bottom-nav .bnav-link{color:#63727e!important}
 body.crm-staff #bottom-nav .bnav-link.active{background:linear-gradient(135deg,#3d4a55,#242e37)!important;color:#f3d788!important}
 body.crm-staff :is(.crmnav-drawer,.v2-flow-drawer){background:#edf2f6!important}
 body.crm-staff .crmnav-drawer .crmnav-link{color:#63727e!important}
 body.crm-staff .crmnav-drawer .crmnav-link.active{background:linear-gradient(135deg,#3d4a55,#242e37)!important;color:#f3d788!important}
 body.crm-staff :is(.flow-mobile-open,.flow-primary){background:linear-gradient(145deg,#fbe3a2,#edc15f)!important;border-color:#e4c277!important;color:#3e3524!important}
 body.crm-staff .v2-flow-panel.flow-drawer{background:#edf2f6!important}
}

@media screen {
 body.crm-staff.crm-calculator :is(button.pri,#tb button.pri){background:linear-gradient(145deg,#fbe3a2,#edc15f)!important;border-color:#e4c277!important;color:#3e3524!important}
 body.crm-staff.crm-calculator #kp-table .sec-inner,
 body.crm-staff.crm-calculator #tabs .tab.on{background:radial-gradient(ellipse at 0 0,#b0c5d430,transparent 85%),linear-gradient(135deg,#354551,#232d36)!important}
}
/* Desktop rail: readable icons and balanced spacing without shrinking hit areas. */
.finance-schedule-editor{border:1px solid #dfe0e8;border-radius:12px;padding:14px;min-width:0}
.finance-schedule-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(130px,1fr) minmax(90px,1fr) 44px;gap:10px;align-items:end;margin:12px 0}
@media(max-width:600px){.finance-schedule-row{grid-template-columns:1fr 44px}.finance-schedule-row label{grid-column:1/-1}}
@media screen and (max-width:900px){
 body.crm-staff #tbl-body tr[data-purchase-row]{display:grid;grid-template-columns:1fr;max-width:100%;padding:12px;border-bottom:1px solid #dfe0e8}
 body.crm-staff #tbl-body tr[data-purchase-row] td{display:block;width:auto;min-width:0;border:0;padding:4px 0;overflow-wrap:anywhere}
 body.crm-staff #material-purchases .mp-actions button{min-height:44px}
}
.v2-flow-drawer .v2-flow-panel,.crmnav-drawer ul{touch-action:pan-y}
@media screen and (max-width:900px){#kanban,#kanban .kanban-col,#kanban .kanban-cards{touch-action:pan-y}}
@media screen and (min-width:901px){
 body.crm-staff :is(.sidebar .sidebar-nav a.nav-link,.crmnav-side a.crmnav-link) svg{width:22px;height:22px}
 body.crm-staff :is(.sidebar.rail #crm-menu,.crmnav-side.rail>ul){display:flex;flex-direction:column;justify-content:space-evenly;gap:2px;min-height:0;overflow-y:auto}
 body.crm-staff :is(.sidebar.rail #crm-menu,.crmnav-side.rail>ul)>li{flex-shrink:0}
}
