/* Surface finish shared by every cabinet. Keep native text/vector rendering;
   never scale the whole interface or sharpen clinical source images with filters. */
body.crm-type{
 --surface-edge:#bdcdd9;
 --surface-shadow:inset 0 1px 0 #ffffffed,0 2px 4px #18344b08,0 10px 26px #18344b0d;
 --surface-shadow-raised:inset 0 1px 0 #fff,0 3px 7px #18344b0c,0 15px 34px #18344b16,0 0 0 1px #cce6ed55;
 --surface-light:radial-gradient(ellipse at 8% 0,#fff 0,transparent 62%),linear-gradient(155deg,#fff 48%,#f2f7fa 100%);
 --cabinet-light:radial-gradient(ellipse at 82% 0,#e5f2f7 0,transparent 52%),radial-gradient(ellipse at 12% 60%,#eef7f5 0,transparent 45%),#f2f5f8;
 --control-light:linear-gradient(180deg,#ffffff14,transparent 52%,#0b234806);
 --control-shadow:inset 0 1px #ffffffb3,0 2px 3px #18344b0a,0 4px 9px #18344b08;
 --panel-shadow:inset 0 1px #ffffffe6,0 3px 8px #18344b07,0 14px 32px #18344b0a;
 font-synthesis:none;
 text-rendering:optimizeLegibility;
 background:var(--cabinet-light);
}
body.crm-type.employee:has(#work:not([hidden])){background:var(--cabinet-light)}
body.crm-type :is(.page-heading,.emp-head,.auth-heading,.admin-brand) :is(h1,h2,p){text-shadow:none}
body.crm-type :is(.sidebar,.emp-sidebar){background:linear-gradient(170deg,#fff 45%,#f4f8fb);border-color:#d6e0e8;box-shadow:inset -1px 0 #fff,5px 0 22px #18344b05}
body.crm-type .topbar{background:linear-gradient(180deg,#fff,#f9fcfd);border-color:#d6e0e8;box-shadow:0 2px 12px #18344b06}
body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row,.cities-card,.admin-card,.auth-card){
 border-color:var(--surface-edge);box-shadow:var(--surface-shadow);
}
body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row,.cities-card,.admin-card,.auth-card,.review-side){background:var(--surface-light)}
body.crm-type :is(.admin-card,.auth-card){backdrop-filter:none}
body.crm-type .partner-profile-form fieldset{background:var(--surface-light);box-shadow:var(--surface-shadow)}
body.crm-type :is(.profile-summary,.review-side){background:var(--surface-light);box-shadow:var(--surface-shadow)}
body.crm-type :is(.profile-footer,.wizard-footer,.contract-actions){border-top-color:#c9d6e0}
body.crm-type.employee #work .emp-list{border-color:var(--surface-edge);box-shadow:var(--surface-shadow)}
body.crm-type.employee .intake-workspace .mat-group{border-color:var(--surface-edge);background:var(--surface-light);box-shadow:var(--surface-shadow)}
/* Elevation changes without resampling the text during a scale/translation. */
body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row){transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}
body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row):hover{
 transform:none;border-color:#8ca8bd;box-shadow:var(--surface-shadow-raised);
}
body.crm-type.employee .intake-workspace .mat-group:hover{transform:none;border-color:#8ca8bd;box-shadow:var(--surface-shadow-raised)}
body.crm-type :is(.button,.auth-primary,.admin-primary,.auth-secondary,.admin-secondary){
 text-shadow:none;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
body.crm-type :is(.button,.auth-primary,.admin-primary,.auth-secondary,.admin-secondary):hover{transform:none;filter:none}
/* Background highlights never sit above labels or intercept a pointer event.
   Keep disabled/focus styles authoritative and do not animate an endless shine. */
body.crm-type :is(.button,.auth-primary,.admin-primary,.auth-secondary,.admin-secondary,.review-next,.review-card-open,.review-card-request):not(:disabled):not([aria-disabled=true]){
 background-image:linear-gradient(180deg,#ffffff14,transparent 52%,#0b234806)!important;
 box-shadow:inset 0 1px #ffffffb3,0 2px 3px #18344b0a,0 4px 9px #18344b08;
}
body.crm-type :is(.button-primary,.auth-primary,.admin-primary,.review-next):not(:disabled):not([aria-disabled=true]){
 box-shadow:inset 0 1px #ffffff52,inset 0 -1px #034c3d2e,0 3px 7px #076e5b26;
}
body.crm-type :is(#crm-navigation .nav-item.is-active,.emp-sidebar nav button[aria-pressed=true]){
 background-image:linear-gradient(135deg,#ffffff12,transparent 58%)!important;
 box-shadow:inset 0 1px #ffffff38,0 3px 9px #076e5b22;
}
@media(hover:hover){
 body.crm-type :is(.button,.auth-primary,.admin-primary,.auth-secondary,.admin-secondary,.review-next,.review-card-open,.review-card-request):hover:not(:disabled):not([aria-disabled=true]):not(:focus-visible){
  box-shadow:inset 0 1px #ffffffb3,0 3px 6px #18344b12,0 6px 14px #397c8714;
 }
}
/* UI icons remain vector paths. Measurement SVGs keep their own rendering. */
/* Section shells: keep their existing dimensions, scrolling and visibility. */
body.crm-type :is(.board-panel,.clients-panel,.contracts-panel,.empty-workspace,
 .emp-home-section,.bubble-panel,.cities-empty,.invite-result-card,.invite-list,
 .admin-invite-row,.review-flow,.client-editor-tools-panel){
 background:var(--surface-light);box-shadow:var(--panel-shadow);
}
body.crm-type #view-print :is(.wizard-main,.wizard-side,.wizard-card){
 background:var(--surface-light);box-shadow:var(--panel-shadow);
}
body.crm-type #view-print :is(.command-card,.command-selected-card,.selected-client){box-shadow:var(--surface-shadow)}
body.crm-type #view-print .wizard-footer,
body.crm-type :is(.profile-footer,.modal-head,.modal-footer,.oc-order-head,.oc-footer,.contract-heading,.emp-preview-head){
 background:linear-gradient(180deg,#fff,#f5f9fb);box-shadow:inset 0 1px #fff,0 2px 10px #18344b06;
}
body.crm-type #view-orders :is(.orders-controls,.orders-entry){background:var(--surface-light);box-shadow:var(--surface-shadow)}
/* Warnings and status colours remain on top of the common material finish. */
body.crm-type #view-orders .orders-entry-warning{background:linear-gradient(145deg,#fff,#fff7ee)}
body.crm-type :is(.status-column,.finance-kpis>div,.emp-metrics>button,.city-tile,.emp-order){box-shadow:var(--surface-shadow)}
body.crm-type .emp-order[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--ui-accent),var(--surface-shadow)}
body.crm-type :is(.emp-detail:not(.intake-workspace),.oc-section,.contract-upload,.contract-events,.contract-form fieldset){
 background:var(--surface-light);box-shadow:var(--surface-shadow);
}
/* Dialog chrome only: document pages, photos and scan canvases stay untouched. */
body.crm-type :is(.modal-card,.contract-dialog,.access-dialog,#city-settings,#preview,.feed-compose){
 box-shadow:inset 0 1px #fff,0 8px 24px #18344b1a,0 28px 80px #18344b26;
}
body.crm-type :is(.oc-body.modal-body,.contract-dialog,.client-sizing-wizard .modal-body){background:var(--cabinet-light)}
body.crm-type :is(.card-menu,.suggestions,.notifications-panel){box-shadow:var(--surface-shadow-raised)}
/* The feed and messenger have local themes with ID selectors. */
body.crm-type #view-feed :is(.feed-post,.feed-empty){background:var(--surface-light);box-shadow:var(--panel-shadow)}
body.crm-type #view-feed :is(.feed-media,.feed-reel-tile){box-shadow:0 3px 12px #18344b12}
body.crm-type #view-feed .feed-saved-link{box-shadow:inset 0 1px #fff,0 4px 12px #18344b06}
body.crm-type #view-messages .messages-shell{box-shadow:var(--panel-shadow)}
body.crm-type #view-messages :is(.messages-inbox,.messages-conversation-head,.messages-composer){background:var(--surface-light)}
body.crm-type #view-messages .message-bubble{box-shadow:inset 0 1px #ffffffa6,0 3px 8px #18344b0d}
/* Laboratory rails and inspectors use the same finish as the cabinet forms. */
body.crm-type :is(.ak-bar,.ak-rail,.ak-inspector,.pg-tools,.pg-inspector,.pg-head,.s3-tools,.s3-inspector,.s3-head,.lab-tools){
 background:var(--surface-light)!important;box-shadow:inset 0 1px #fff,0 3px 12px #18344b08;
}
body.crm-type :is(.icon-button,.board-tool,.open-card-button,.resolve-button,.orders-icon-action,
 .filter-tab,.oc-tabs button,.contract-tabs button,.contract-workspace-tabs button,
 .message-icon-action,.messages-back,.message-send,.feed-primary,.feed-secondary,
 .admin-logout,.admin-copy button,.auth-link,.studio-tools button,
 .ak-editor button,.pg-tools button,.pg-inspector button,.s3-tools button,.s3-inspector button,.s3-head button,.lab-tools button):not(:disabled):not([aria-disabled=true]){
 background-image:var(--control-light)!important;box-shadow:var(--control-shadow);
 transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
body.crm-type :is(#view-orders,#view-clients,#view-print,#view-feed,#view-messages,.oc-dialog,.contract-dialog)
 :is(.button,.filter-tab,.orders-icon-action,.message-icon-action,.messages-back,.message-send,.feed-primary,.feed-secondary):not(:disabled):not([aria-disabled=true]){
 box-shadow:var(--control-shadow);
}
@media(hover:hover){
 body.crm-type #view-print .command-card:hover,
 body.crm-type #view-orders .orders-entry:hover,
 body.crm-type .emp-order:hover,
 body.crm-type .city-tile:hover{box-shadow:var(--surface-shadow-raised);transform:none}
 body.crm-type :is(.icon-button,.board-tool,.open-card-button,.orders-icon-action,.message-send,.feed-primary,.feed-secondary,
 .ak-editor button,.pg-tools button,.pg-inspector button,.s3-tools button,.s3-inspector button,.lab-tools button):hover:enabled:not([aria-disabled=true]):not(:focus-visible){
  box-shadow:inset 0 1px #fff,0 3px 7px #18344b14;transform:none;
 }
}
body.crm-type :is(.svg-icon,.review-icon,.nav-icon svg){shape-rendering:geometricPrecision}
body.crm-type :is(.mat-frame img,.mat-frame canvas,.orders-preview-art img){image-rendering:auto}
/* Keep the agreed neon ring, moving water and neighbour lens; no glow on labels. */
body.crm-type .bubble-style-neon .orb-ball>small,
body.crm-type .bubble-style-neon :is(.orb-family,.orb-names,.orb-status){text-shadow:0 1px 1px #02081780}
@media(prefers-reduced-motion:reduce){
 body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row,.button,.auth-primary,.admin-primary,.auth-secondary,.admin-secondary){transition:none}
 body.crm-type :is(.icon-button,.board-tool,.open-card-button,.resolve-button,.orders-icon-action,.filter-tab,.oc-tabs button,
 .contract-tabs button,.contract-workspace-tabs button,.message-icon-action,.messages-back,.message-send,.feed-primary,.feed-secondary,
 .admin-logout,.admin-copy button,.auth-link,.studio-tools button,.ak-editor button,.pg-tools button,.pg-inspector button,
 .s3-tools button,.s3-inspector button,.s3-head button,.lab-tools button){transition:none}
}
@media print{
 body.crm-type,body.crm-type.employee:has(#work:not([hidden])){background:#fff}
 body.crm-type :is(.metric-card,.order-tile,.client-tile,.contract-row,.cities-card,.admin-card,.auth-card,.profile-summary,.review-side){background:#fff;box-shadow:none}
 body.crm-type .partner-profile-form fieldset,body.crm-type.employee .intake-workspace .mat-group{background:#fff;box-shadow:none}
 body.crm-type :is(.board-panel,.clients-panel,.contracts-panel,.empty-workspace,.emp-home-section,.bubble-panel,.cities-empty,
 .invite-result-card,.invite-list,.admin-invite-row,.review-flow,.client-editor-tools-panel,.modal-card,.contract-dialog,.oc-section,
 .contract-upload,.contract-events,.contract-form fieldset,.finance-kpis>div){box-shadow:none;background:#fff}
 body.crm-type #view-print :is(.wizard-main,.wizard-side,.wizard-card),body.crm-type #view-orders :is(.orders-controls,.orders-entry){box-shadow:none;background:#fff}
}
