/*
 * JIA XIN DESIGN SYSTEM / V1.2.6
 * Global visual language only. No JS, data-model or API overrides.
 * A single stylesheet shared by workbench, designer, worker, management, and sheet.
 */
:root{
  color-scheme:light;
  --jx-blue:#286fe3;
  --jx-blue-deep:#175ac5;
  --jx-ink:#253750;
  --jx-ink-strong:#1b304a;
  --jx-muted:#77899f;
  --jx-muted-light:#98a8ba;
  --jx-border:#e2eaf4;
  --jx-border-strong:#cddcef;
  --jx-bg:#f5f8fc;
  --jx-surface:#fff;
  --jx-surface-soft:#f8fbff;
  --jx-blue-tint:#edf5ff;
  --jx-ring:0 0 0 3px rgba(40,111,227,.13);
  --jx-shadow:0 4px 15px rgba(28,66,111,.035),0 18px 45px rgba(28,66,111,.025);
  --jx-shadow-hover:0 9px 28px rgba(28,75,133,.075);
  --jx-shadow-float:0 22px 62px rgba(28,55,101,.17),0 4px 15px rgba(28,55,101,.055);
  --jx-radius:14px;
  --jx-radius-control:10px;
  --jx-speed:.16s;
  --blue:var(--jx-blue);
  --blue2:var(--jx-blue-tint);
  --ink:var(--jx-ink);
  --muted:var(--jx-muted);
  --line:var(--jx-border);
  --bg:var(--jx-bg);
  --shadow:var(--jx-shadow);
  --wblue:var(--jx-blue);
  --wpale:var(--jx-blue-tint);
  --wbg:var(--jx-bg);
  --wborder:var(--jx-border);
  --wt:var(--jx-ink);
  --wm:var(--jx-muted);
  --wshadow:var(--jx-shadow);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}
html{scroll-behavior:auto;}
body{background:var(--jx-bg);color:var(--jx-ink);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
button,input,textarea,select{font-family:inherit;}
button{transition:background-color var(--jx-speed),border-color var(--jx-speed),color var(--jx-speed),box-shadow var(--jx-speed),transform var(--jx-speed);}
button:not(:disabled){-webkit-tap-highlight-color:transparent;}
a{color:var(--jx-blue);}
:where(button,a,input,textarea,select,[tabindex]):focus-visible{outline:2px solid rgba(40,111,227,.7);outline-offset:2px;}
::selection{background:var(--jx-ui-soft, #cbdfff);color:var(--jx-ui-accent, #1f456d);}
:where(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,.ws-floating-body,.palette,.properties,.canvas-wrap,.sheet-grid,.jx-schema-body,.jx-logic-side,.jx-functions,.jx-select-options){scrollbar-color:#cbd8e9 transparent;scrollbar-width:thin;}
:where(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,.ws-floating-body,.palette,.properties,.canvas-wrap,.sheet-grid,.jx-schema-body,.jx-logic-side,.jx-functions,.jx-select-options)::-webkit-scrollbar{width:8px;height:8px;}
:where(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,.ws-floating-body,.palette,.properties,.canvas-wrap,.sheet-grid,.jx-schema-body,.jx-logic-side,.jx-functions,.jx-select-options)::-webkit-scrollbar-thumb{background:var(--jx-ui-soft, #cbd8e9);border-radius:10px;border:2px solid transparent;background-clip:padding-box;}

/* Core controls. Avoid resizing checkbox, segmented choices, and drag handles. */
:where(.btn,.ws-primary,.ws-secondary,.ws-quiet,.ws-form-small,.jx-config-button,.sheet-top button,.sheet-footer button,.ws-dialog-button){border-radius:var(--jx-radius-control);font-weight:650;letter-spacing:0;box-shadow:none;}
:where(.btn,.ws-secondary,.ws-form-small,.sheet-top button.soft,.sheet-footer button.soft){border:1px solid var(--jx-border-strong);background:var(--jx-ui-surface, #fff);color:var(--jx-ui-text, #3d628e);}
:where(.btn,.ws-secondary,.ws-form-small,.sheet-top button.soft,.sheet-footer button.soft):hover:not(:disabled){background:var(--jx-ui-surface, #f3f8ff);border-color:var(--jx-ui-border, #afc8eb);color:var(--jx-ui-accent, #1d60bf);box-shadow:0 2px 8px rgba(32,89,157,.045);}
:where(.btn.primary,.ws-primary,.form-submit,.sheet-top button.primary,.ws-modal-footer .primary){background:linear-gradient(145deg,var(--jx-ui-accent, #347ff1),var(--jx-ui-accent, #2267db));border-color:var(--jx-ui-border, #2873e6);color:var(--jx-ui-on-accent, #fff);box-shadow:0 5px 12px rgba(35,108,225,.14);}
:where(.btn.primary,.ws-primary,.form-submit,.sheet-top button.primary):hover:not(:disabled){background:linear-gradient(145deg,var(--jx-ui-accent, #2875ec),var(--jx-ui-accent, #185ccc));border-color:var(--jx-ui-border, #1f64d6);box-shadow:0 7px 16px rgba(35,108,225,.19);}
:where(.btn,.ws-primary,.ws-secondary,.ws-form-small,.ws-icon-btn,.ws-pagination button,.sheet-top button,.sheet-footer button):active:not(:disabled){transform:translateY(1px);}
:where(.ws-quiet,.ws-icon-btn,.ws-collapse):hover:not(:disabled){background:var(--jx-ui-surface, #eef5ff);color:var(--jx-ui-accent, #1d65cd);}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select:not([multiple]),.fake-input,.ws-search,.ws-date){border:1px solid var(--jx-border-strong);border-radius:var(--jx-radius-control);color:var(--jx-ui-text, #29415e);background-color:var(--jx-ui-surface, #fff);transition:border-color var(--jx-speed),box-shadow var(--jx-speed),background-color var(--jx-speed);}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select:not([multiple]))::placeholder{color:var(--jx-ui-muted, #a0adbf);}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select:not([multiple])):hover:not(:disabled):not(:focus){border-color:var(--jx-ui-border, #aebfda);}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select:not([multiple])):focus{outline:none;border-color:var(--jx-ui-border, #74a5f1);box-shadow:var(--jx-ring);}
:where(input[type=checkbox],input[type=radio]){accent-color:var(--jx-blue);}
:where(.tiny,.ws-muted,.field-help,.ws-microcopy,.ws-field-help){color:var(--jx-muted);line-height:1.6;}
:where(.card,.panel,.worker-card,.ws-panel,.ws-stat,.ws-folder-card,.ws-type-pick){border-color:var(--jx-border);box-shadow:var(--jx-shadow);}
:where(.card,.panel,.worker-card,.ws-panel,.ws-stat){border-radius:var(--jx-radius);}
:where(.ws-panel-head,.panel-head,.ws-modal-header,.ws-modal-footer,.modal-head){border-color:var(--jx-border);}

/* Business workbench: take the V1.2.5 application card as the benchmark. */
.ws-body{background:var(--jx-bg);}
.ws-sidebar{background:linear-gradient(180deg,var(--jx-ui-surface, #fff) 70%,var(--jx-ui-surface, #fcfdff) 100%);border-right:1px solid var(--jx-border);}
.ws-sidebar-top{border-color:var(--jx-ui-border, #ecf1f7);}
.ws-logo,.brand-mark{background:linear-gradient(145deg,var(--jx-ui-accent, #337ef2),var(--jx-ui-accent, #2066dc));box-shadow:0 4px 12px rgba(32,111,220,.16);border-radius:12px;}
.ws-sidebar-top strong{color:var(--jx-ink-strong);letter-spacing:.1px;}
.ws-sidebar-top span{color:var(--jx-ui-muted, #96a5b8);}
.ws-nav-head{border-color:var(--jx-ui-border, #edf1f6);}
.ws-nav-title{color:var(--jx-ui-text, #2b4460);}
.ws-tree-search{background:var(--jx-ui-surface, #f5f8fc);border:1px solid var(--jx-ui-border, #eaf0f7);border-radius:10px;}
.ws-tree-search:focus-within{background:var(--jx-ui-surface, #fff);border-color:var(--jx-ui-border, #a4c4f1);box-shadow:var(--jx-ring);}
.ws-tree-search input{background:transparent!important;border:none!important;box-shadow:none!important;}
.ws-tree-search input:focus{box-shadow:none!important;}
.ws-header{background:rgba(255,255,255,.96);border-bottom:1px solid var(--jx-border);box-shadow:0 2px 15px rgba(43,71,113,.02);}
.ws-demo-tag{background:var(--jx-ui-surface, #f1f6fd);border:1px solid var(--jx-ui-border, #e4edf9);color:var(--jx-ui-muted, #71849e);border-radius:8px;font-weight:600;}
.ws-user-circle{background:linear-gradient(145deg,var(--jx-ui-soft, #eaf3ff),var(--jx-ui-soft, #dceaff));border:1px solid var(--jx-ui-border, #d9e8fd);color:var(--jx-ui-accent, #2469cf);}
.ws-content{max-width:1640px;}
.ws-title-row h1{font-weight:760;letter-spacing:-.4px;color:var(--jx-ink-strong);}
.ws-eyebrow{color:var(--jx-ui-muted, #79a0da);font-weight:750;}
.ws-stats{gap:16px;}
.ws-stat{background:linear-gradient(150deg,var(--jx-ui-surface, #fff) 60%,var(--jx-ui-surface, #fafdff));border:1px solid var(--jx-border);padding:23px;box-shadow:var(--jx-shadow);}
.ws-stat strong{color:var(--jx-ui-text, #263b56);letter-spacing:-.5px;}
.ws-panel{background:var(--jx-ui-surface, #fff);border:1px solid var(--jx-border);border-radius:16px;box-shadow:var(--jx-shadow);}
.ws-panel-head{padding:21px 24px;border-color:var(--jx-ui-border, #e9eef6);}
.ws-panel-head h2{font-weight:750;color:var(--jx-ui-text, #273c57);}
.ws-folder-grid{gap:14px;}
.ws-folder-card{border-radius:13px;background:linear-gradient(155deg,var(--jx-ui-surface, #fff) 55%,var(--jx-ui-surface, #fbfdff) 100%);border:1px solid var(--jx-border);box-shadow:none;}
.ws-folder-card:hover{background:var(--jx-ui-surface, #fbfdff);border-color:var(--jx-ui-border, #bad0ee);box-shadow:var(--jx-shadow-hover);transform:translateY(-1px);}
.ws-folder-card:focus-visible{box-shadow:var(--jx-ring);}
.ws-module-card{background:linear-gradient(155deg,var(--jx-ui-surface, #fff) 44%,var(--jx-ui-surface, #f8fbff) 100%);border-color:var(--jx-ui-border, #e1eaf4);border-radius:17px;box-shadow:0 4px 14px rgba(41,75,119,.045);transition:transform .18s,border-color .18s,box-shadow .18s;}
.ws-module-card:hover{transform:translateY(-3px);border-color:var(--jx-ui-border, #b1caed);box-shadow:0 13px 29px rgba(41,82,139,.105);}
.ws-module-symbol{border-radius:17px;background:linear-gradient(150deg,var(--jx-ui-soft, #edf5ff),var(--jx-ui-soft, #dbeaff));color:var(--jx-ui-accent, #2469d7);box-shadow:inset 0 1px 0 #ffffffb8;}
.ws-module-card b{color:var(--jx-ui-text, #273d57);}
.ws-hint{background:var(--jx-ui-surface, #f4f8fe);border-color:var(--jx-ui-border, #dfeaf8);border-radius:12px;}
.ws-tree-node,.ws-tree-item,.ws-tree-row,.ws-bottom-link{border-radius:9px;}
.ws-sidebar-bottom{border-color:var(--jx-border);}
.ws-bottom-link:hover{background:var(--jx-ui-surface, #f1f6fd);color:var(--jx-ui-accent, #2868c4);}

/* Records, tables and floating panels. */
.ws-record-toolbar{padding:17px 20px;border-color:var(--jx-border);background:var(--jx-ui-surface, #fff);}
.ws-record-top{gap:9px;}
.ws-table-wrap{border-radius:0 0 12px 12px;}
.ws-table th{background:var(--jx-ui-surface, #f2f6fc);color:var(--jx-ui-muted, #5f7795);font-size:12px;letter-spacing:.04px;font-weight:700;border-color:var(--jx-ui-border, #e2eaf3);}
.ws-table td{border-color:var(--jx-ui-border, #e9eef5);color:var(--jx-ui-text, #324862);}
.ws-table tr:nth-child(even) td{background:var(--jx-ui-surface, #fcfdff);}
.ws-table tr:hover td,.ws-table tr:nth-child(even):hover td{background:var(--jx-ui-surface, #f2f8ff);}
.ws-table .ws-row-index{color:var(--jx-ui-muted, #97a9bf);}
.ws-table .ws-link-text{color:var(--jx-ui-accent, #276bd4);}
.ws-table-bottom{border-top:1px solid var(--jx-ui-border, #edf2f8);background:var(--jx-ui-surface, #fff);}
.ws-pagination button{border-radius:9px;border-color:var(--jx-border);}
.ws-record-overview,.ws-selection-toolbar{background:var(--jx-ui-surface, #fff);}
.ws-record-detail .ws-detail-hero{background:var(--jx-ui-surface, #f5f8fd);border-radius:12px;}
.ws-detail-field{border-color:var(--jx-ui-border, #e0e9f4);border-radius:11px;background:linear-gradient(155deg,var(--jx-ui-surface, #fff),var(--jx-ui-surface, #fbfdff));}
.ws-detail-field-label{font-weight:700;color:var(--jx-ui-text, #4c6683);}
.ws-detail-field-value{color:var(--jx-ui-text, #263c56);}
.ws-detail-tools{color:var(--jx-ui-muted, #8090a5);}
.ws-edit-field-selector,.ws-search-chooser{border:1px solid var(--jx-ui-border, #e2ebf6);border-radius:12px;background:var(--jx-ui-surface, #f8fbff);}
.ws-search-chooser-list,.ws-edit-field-checks{gap:7px;}
.ws-search-chooser-item,.ws-choice-chip,.ws-edit-field-checks label{border-radius:9px;border-color:var(--jx-ui-border, #dce7f5);background:var(--jx-ui-surface, #fff);}
.ws-search-chooser-item:hover,.ws-edit-field-checks label:hover{border-color:var(--jx-ui-border, #adc6ed);background:var(--jx-ui-surface, #f5f9ff);}
.ws-search-chooser-item:has(input:checked),.ws-edit-field-checks label:has(input:checked){background:var(--jx-ui-soft, #edf5ff);border-color:var(--jx-ui-border, #b6d1f8);}
.ws-modal-layer .ws-modal{border-radius:17px;border:1px solid var(--jx-ui-border, #dfe8f4);box-shadow:var(--jx-shadow-float);background:var(--jx-ui-surface, #fff);}
.ws-modal-header{background:var(--jx-ui-surface, #f8fbff);border-bottom:1px solid var(--jx-ui-border, #e8eef6);}
.ws-modal-header h3{font-weight:750;color:var(--jx-ui-text, #263c55);}
.ws-modal-footer{background:var(--jx-ui-surface, #fff);border-color:var(--jx-ui-border, #e7edf5);}
.ws-form-sheet{border-radius:17px;border-color:var(--jx-ui-border, #dce6f3);box-shadow:var(--jx-shadow-float);}
.ws-form-sheet-header{background:var(--jx-ui-surface, #f8fbff);border-color:var(--jx-ui-border, #e5ecf5);}
.ws-form-sheet-header strong{color:var(--jx-ui-text, #293e59);letter-spacing:0;}
.ws-form-sheet-body{background:var(--jx-ui-surface, #f6f9fd);}
.ws-form-preview-content{border:1px solid var(--jx-ui-border, #e5edf7);border-radius:13px;box-shadow:0 4px 14px rgba(29,65,108,.025);}
.ws-form-preview-content .form-field>label{color:var(--jx-ui-text, #3a5270);}
.ws-form-sheet-footer{border-color:var(--jx-ui-border, #e8eef6);}
.ws-floating-settings{border:1px solid var(--jx-border);border-radius:15px;box-shadow:var(--jx-shadow-float);}
.ws-floating-body{background:var(--jx-ui-surface, #fff);}
.ws-blank{color:var(--jx-ui-muted, #8c9fb3);}
.ws-archive-row,.ws-context-list button{border-color:var(--jx-border);border-radius:11px;}
.ws-context-list button:hover{background:var(--jx-ui-surface, #f2f7fe);border-color:var(--jx-ui-border, #c1d8f7);}
.ws-toast{border-radius:11px;box-shadow:0 13px 36px rgba(24,52,91,.16);}

/* Designer: same hierarchy as application hub, keep the three independent scroll areas. */
.jx-designer-page{background:var(--jx-bg);}
.topbar{background:rgba(255,255,255,.97);border-bottom:1px solid var(--jx-border);box-shadow:0 2px 12px rgba(34,70,118,.025);}
.brand h1{color:var(--jx-ui-text, #203751);font-weight:750;}
.main-grid{gap:14px;}
.main-grid>.panel{border:1px solid var(--jx-border);border-radius:15px;box-shadow:var(--jx-shadow);background:var(--jx-ui-surface, #fff);}
.panel-head{background:var(--jx-ui-surface, #fff);border-bottom:1px solid var(--jx-ui-border, #ebf0f7);}
.panel-head h2{font-weight:750;color:var(--jx-ui-text, #293f5a);}
.jx-title-editor{background:var(--jx-ui-surface, #f9fbff);border-color:var(--jx-border);}
.palette-grid{gap:9px;}
.palette-button{background:linear-gradient(155deg,var(--jx-ui-surface, #fff),var(--jx-ui-surface, #fbfdff));border:1px solid var(--jx-ui-border, #e1e9f4);border-radius:11px;min-height:64px;box-shadow:0 1px 4px rgba(23,61,107,.018);}
.palette-button:hover,.palette-button:focus{background:var(--jx-ui-surface, #f1f7ff);border-color:var(--jx-ui-border, #b4cced);box-shadow:0 3px 10px rgba(39,90,145,.065);transform:translateY(-1px);}
.palette-group{color:var(--jx-ui-text, #52677f);}
.canvas-wrap{background:var(--jx-ui-surface, #f6f9fd);}
.form-paper{background:var(--jx-ui-surface, #fff);border-color:var(--jx-ui-border, #e3ebf5);border-radius:15px;box-shadow:var(--jx-shadow);}
.designer-node{border-radius:11px;}
.designer-node:hover{background:var(--jx-ui-surface, #f9fcff);border-color:var(--jx-ui-border, #a8c6ef);}
.designer-node.selected{background:var(--jx-ui-surface, #f1f7ff);border-color:var(--jx-ui-border, #6ba1ec);box-shadow:0 0 0 2px rgba(50,116,220,.065);}
.empty-area{border-color:var(--jx-ui-border, #d8e7f8);background:var(--jx-ui-surface, #fbfdff);}
.jx-canvas-actions{gap:8px;}
.jx-config-button{background:var(--jx-ui-surface, #f8fbff);border:1px solid var(--jx-ui-border, #c8daef);border-radius:10px;color:var(--jx-ui-accent, #2e69ab);box-shadow:none;}
.jx-config-button:hover{background:var(--jx-ui-soft, #edf5ff);border-color:var(--jx-ui-border, #9fc1ec);color:var(--jx-ui-accent, #195bbb);}
.jx-config-button svg{color:var(--jx-ui-accent, #3878d3);}
.jx-logic-property-card{background:var(--jx-ui-surface, #f8fbff);border:1px solid var(--jx-ui-border, #d9e7f7);border-top:2px solid var(--jx-ui-border, #8eb7ee);border-radius:13px;box-shadow:none;}
.jx-open-logic{border-radius:11px;}
.prop-row label{color:var(--jx-ui-muted, #597089);font-size:12px;}
.jx-schema-dialog,.jx-logic-dialog{border:1px solid var(--jx-ui-border, #e2eaf5);border-radius:18px;box-shadow:var(--jx-shadow-float);}
.jx-schema-head,.jx-logic-foot{border-color:var(--jx-ui-border, #e7eef6);background:var(--jx-ui-surface, #fbfdff);}
.jx-schema-head h2{color:var(--jx-ui-text, #233a56);}
.jx-constraint-card,.jx-related-settings-section,.jx-perm-card{border-color:var(--jx-ui-border, #dee9f7);border-radius:12px;background:var(--jx-ui-surface, #fff);}
.jx-constraint-card[open]{border-color:var(--jx-ui-border, #aac9ef);box-shadow:0 4px 13px rgba(40,83,143,.055);}
.jx-required-item{border-radius:10px;border-color:var(--jx-ui-border, #e0e9f6);}
.jx-logic-code,.jx-formula-text-editor{border-radius:11px;}
.jx-logic-tab.active{background:var(--jx-ui-surface, #eff6ff);color:var(--jx-ui-accent, #1c60bc);}
.jx-logic-result{border-radius:11px;}

/* Form field language consistent in preview, employee entry and correction. */
:where(.form-field>label,.ws-editor-fields .ws-field>label,.ws-edit-layout .ws-editor-fields>.ws-field>label){color:var(--jx-ui-text, #3d5877);font-size:13px;font-weight:680;line-height:1.5;}
:where(.form-group,.subtable-row,.layout-outer){background:var(--jx-ui-surface, #f9fbff);border:1px solid var(--jx-border);border-radius:12px;}
.option-label{border-radius:9px;}
.option-label:has(input:checked){color:var(--jx-ui-accent, #1d63bf);}
.fake-input{border-radius:10px;border-color:var(--jx-ui-border, #d6e3f1);}
.worker-wrap{max-width:630px;padding-top:30px;}
.worker-card{border:1px solid var(--jx-border);border-radius:17px;box-shadow:var(--jx-shadow);padding:28px 26px;}
.worker-card h1{color:var(--jx-ui-text, #223b58);font-weight:750;}
.form-submit{border-radius:11px;min-height:47px;box-shadow:0 6px 16px rgba(36,105,217,.14);}
.upload-pill,.jx-file-picker,.ws-import-picker{border-radius:11px;border-color:var(--jx-ui-border, #d6e4f5);background:var(--jx-ui-surface, #f9fbff);}

/* Modal widgets, selects, timers and feedback. */
.jx-dialog{border:1px solid var(--jx-ui-border, #e1eaf5);border-radius:17px;box-shadow:var(--jx-shadow-float);}
.jx-dialog-actions{background:var(--jx-ui-surface, #f9fbff);border-color:var(--jx-ui-border, #e6eef7);}
.jx-select-popup{border:1px solid var(--jx-ui-border, #e0e9f5);border-radius:12px;box-shadow:var(--jx-shadow-float);}
.jx-select-option{border-radius:9px;}
.jx-select-option:hover,.jx-select-option.focused{background:var(--jx-ui-soft, #edf5ff);}
.jx-select-search{border-radius:9px;}
.jx-time-modal,.jx-wheel-modal,.jx-time-wheel-dialog{border-radius:17px;}

/* Secondary management screens. */
:where(.shell,.jx-shell,.wrap,.page){color:var(--jx-ink);}
:where(.shell,.jx-shell,.wrap,.page) :where(.card,.panel,.jx-panel,.worker-card){border:1px solid var(--jx-border);border-radius:15px;box-shadow:var(--jx-shadow);}
:where(.shell,.jx-shell,.wrap,.page) :where(h1,h2){color:var(--jx-ui-text, #203b57);}
:where(.shell,.jx-shell,.wrap,.page) :where(.toolbar,.jx-nav){gap:14px;}
:where(.shell,.jx-shell,.wrap,.page) :where(button:not(.jx-dialog-confirm),select){border-radius:10px;}

/* Excel should still feel like a spreadsheet: neutral cells, polished controls. */
body:has(.sheet-grid){background:var(--jx-ui-surface, #f5f8fc);color:var(--jx-ink);}
.sheet-top{background:var(--jx-ui-surface, #fff);border-bottom:1px solid var(--jx-border);box-shadow:0 2px 9px rgba(30,67,116,.028);}
.sheet-top strong{color:var(--jx-ui-text, #213b58);}
.sheet-notice{background:var(--jx-ui-surface, #f0f6ff);border-color:var(--jx-ui-border, #e0eafa);color:var(--jx-ui-muted, #4d698a);}
.sheet-bar{background:var(--jx-ui-surface, #fff);border-color:var(--jx-ui-border, #e0e9f5);}
#sheet-formula{border-radius:10px;border-color:var(--jx-ui-border, #d4e2f2);}
#sheet-formula:focus{border-color:var(--jx-ui-border, #6fa4ef);box-shadow:var(--jx-ring);}
.sheet-table th,.sheet-table td{border-color:var(--jx-ui-border, #e3ebf5);}
.sheet-table thead th{background:var(--jx-ui-soft, #f1f5fb);color:var(--jx-ui-muted, #526b8b);font-weight:750;}
.sheet-table .row-index{background:var(--jx-ui-surface, #f4f7fc);color:var(--jx-ui-muted, #879cb4);}
.sheet-table .record-id{background:var(--jx-ui-surface, #fbfdff);color:var(--jx-ui-muted, #8699b1);}
.sheet-input{color:var(--jx-ui-text, #2b405a);}
.sheet-input:focus{background:var(--jx-ui-surface, #f4f8ff);border-color:var(--jx-ui-border, #3178e5);}
.sheet-table td.sheet-selected{background:var(--jx-ui-soft, #eaf3ff)!important;outline-color:var(--jx-ui-border, #6e9ee9);}
.sheet-footer{background:var(--jx-ui-surface, #fff);border-color:var(--jx-border);}
#sheet-stats{background:var(--jx-ui-surface, #f0f6ff);border-color:var(--jx-ui-border, #dce9fb);border-radius:9px;color:var(--jx-ui-accent, #315f9b);}
.sheet-zoom{border-color:var(--jx-border);}

/* Reduced motion accessibility and smaller screens. */
@media(prefers-reduced-motion:reduce){button,.ws-folder-card,.ws-module-card,.palette-button,.ws-toast{transition:none!important;animation:none!important;}}
@media(max-width:900px){.ws-content{padding:20px 18px 48px;}.main-grid{gap:9px;}.ws-panel-head{padding:16px 18px;}.ws-module-card{height:164px;}}
@media(max-width:700px){
  .ws-content{padding:16px 12px 38px;}
  .ws-title-row h1{font-size:23px;}
  .ws-stats{gap:9px;}
  .ws-stat{padding:16px;}
  .ws-folder-grid:has(.ws-module-item){padding:12px;gap:10px;}
  .ws-module-card{height:155px;padding:15px;}
  .ws-module-symbol{width:47px;height:47px;border-radius:14px;}
  .ws-module-symbol svg{width:25px;height:25px;}
  .ws-module-card b{font-size:13px;}
  .ws-modal-layer .ws-modal{border-radius:13px;}
  .ws-form-sheet{border-radius:13px;}
  .worker-wrap{padding:14px 10px 30px;}
  .worker-card{padding:20px 16px;}
  .topbar{padding:10px 13px;}
  .main-grid>.panel{border-radius:12px;}
}

/* Functional controls retained; original V1.2.6 visual theme above. */

/* Preserve the original blue gradient throughout hover; avoid a white frame. */
.ws-primary,.ws-primary:hover:not(:disabled),.ws-primary:active:not(:disabled){background:linear-gradient(145deg,var(--jx-ui-accent, #347ff1),var(--jx-ui-accent, #2267db));border-color:var(--jx-ui-border, #2873e6);color:var(--jx-ui-on-accent, #fff);transition:filter .16s,box-shadow .16s,transform .16s;}
.ws-primary:hover:not(:disabled){filter:brightness(.96);box-shadow:0 7px 16px rgba(35,108,225,.19);}
.ws-primary:active:not(:disabled){filter:brightness(.9);}
.jx-styled-grid{background:var(--jx-grid-panel-bg)!important;padding-bottom:18px;}
.jx-styled-grid :is(.ws-table,.sheet-table),.jx-styled-grid :is(td,.sheet-input){font-family:var(--jx-grid-font-family);font-size:var(--jx-grid-font);font-weight:var(--jx-grid-weight);font-style:var(--jx-grid-italic);text-decoration:var(--jx-grid-decoration);color:var(--jx-grid-text-color);}
.jx-styled-grid :is(.ws-table,.sheet-table) tbody td{background:var(--jx-grid-cell-bg);}
.jx-styled-grid :is(.ws-table,.sheet-table) thead th{background:var(--jx-grid-header-bg);color:var(--jx-grid-header-color);font-family:var(--jx-grid-font-family);font-size:var(--jx-grid-header-size);font-weight:var(--jx-grid-header-weight);font-style:var(--jx-grid-header-italic);}
.jx-styled-grid .sheet-input{border-radius:0;border:2px solid transparent;background:transparent;box-shadow:none;}
.jx-styled-grid .sheet-input:focus{border-color:var(--jx-blue);box-shadow:none;}.jx-styled-grid .sheet-input.invalid{background:var(--jx-ui-danger-soft, #ffe3df);border-color:var(--jx-ui-danger, #bc3025);}.jx-styled-grid .sheet-input.dirty{background:var(--jx-ui-soft, #e1ebfa);}
.jx-styled-grid select.sheet-input{cursor:pointer;appearance:auto;padding-right:20px;}
.jx-styled-grid textarea.sheet-input{resize:vertical;min-height:37px;}
#sheet-preview{max-width:43vw;min-width:0;color:var(--jx-muted);font-size:12px;white-space:normal;}
.sheet-zoom #sheet-zoom-number{width:66px;height:32px;padding:4px 6px;cursor:text;}
#sheet-zoom-value{min-width:15px;}
.jx-style-field{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:8px 0;color:var(--jx-ink);font-size:13px;}
.jx-style-field input:not([type=checkbox]),.jx-style-field select{width:150px;min-height:32px;padding:4px 7px;}.jx-style-field input[type=color]{padding:2px;height:32px;}
.jx-grid-style-panel{position:fixed;right:22px;top:80px;width:min(350px,calc(100vw - 32px));max-height:80vh;overflow:auto;z-index:80;padding:20px;background:var(--jx-ui-surface, #fff);border:1px solid var(--jx-border-strong);border-radius:14px;box-shadow:var(--jx-shadow-float);}
.jx-grid-style-panel h3{display:inline-block;margin:0 30px 12px 0;}.jx-grid-style-panel p{color:var(--jx-muted);font-size:12px;}
#record-grid.jx-styled-grid .ws-custom-grid,#record-grid.jx-styled-grid .ws-custom-grid td{font-family:var(--jx-grid-font-family);font-size:var(--jx-grid-font);}
#record-grid.jx-styled-grid .ws-custom-grid thead th,#record-grid.jx-styled-grid .ws-custom-grid .ws-sort-head{font-family:var(--jx-grid-font-family);font-size:var(--jx-grid-header-size);font-weight:var(--jx-grid-header-weight);font-style:var(--jx-grid-header-italic);}


/* V2.2.2: per-form, per-theme typography alignment; selectors exclude action cells. */
#record-grid.jx-styled-grid .ws-custom-grid tbody td:not(.ws-grid-check):not(.ws-row-index):not(.ws-grid-actions){text-align:var(--jx-grid-text-align,left);}
#record-grid.jx-styled-grid .ws-custom-grid thead th:not(.ws-grid-check):not(.ws-row-index):not(.ws-grid-status){text-align:var(--jx-grid-header-align,left);}
.jx-styled-grid .sheet-table tbody td,.jx-styled-grid .sheet-table .sheet-input{text-align:var(--jx-grid-text-align,left);}
.jx-styled-grid .sheet-table thead th{text-align:var(--jx-grid-header-align,left);}

/* v3.0.4 - shared corner integrity contract.
   A rounded float/card must not reveal a square theme-painted header at its
   corners. Do not set overflow:hidden on floating containers: that would
   break the four-corner resize grips and popovers. Instead, round only the
   painted header layer, matching its outer surface. */
:where(.ws-form-sheet,.ws-modal,.ws-floating-settings,.ws-panel,
       .jx-schema-dialog,.jx-logic-dialog,.jx-ps-modal,.jx-dialog,
       .bp-dialog,.hr-modal,.ws-module-card,.ws-folder-card,.ws-stat){
  background-clip:padding-box;
}
:where(.ws-form-sheet,.ws-modal,.ws-floating-settings,
       .jx-schema-dialog,.jx-logic-dialog,.jx-ps-modal,
       .jx-dialog,.bp-dialog,.hr-modal) >
:where(.ws-form-sheet-header,.ws-modal-header,.ws-floating-header,
       .jx-schema-head,.jx-logic-head,.jx-ps-modal-head,
       .jx-dialog-head,.bp-modal-head,.hr-modal-head){
  border-start-start-radius:inherit;
  border-start-end-radius:inherit;
  background-clip:padding-box;
}
/* The top treatment of non-floating cards should also follow the card's arc.
   Their scrollable body remains independently scrollable, not clipped. */
:where(.ws-panel,.bp-panel,.hr-panel) >
:where(.ws-panel-head,.bp-panel-head,.hr-panel-head){
  border-start-start-radius:inherit;
  border-start-end-radius:inherit;
  background-clip:padding-box;
}
@media(max-width:720px){
  /* Full-viewport forms have square edges by design. */
  .ws-form-sheet > .ws-form-sheet-header,
  .ws-form-sheet.maximized > .ws-form-sheet-header{
    border-start-start-radius:0;
    border-start-end-radius:0;
  }
}

/* V3.2.6 global canvas and scrollbar contract.
   Page chrome uses the skin's light *surface*, never its strong theme tint.
   Cards, paper, thumbnails and charts retain their own backgrounds. */
:root{
  --jx-page-canvas:var(--jx-ui-surface,var(--jx-surface,#fff));
  --jx-scrollbar-thumb:color-mix(in srgb,var(--jx-ui-border,var(--jx-border-strong,#cbd8e9)) 88%,var(--jx-ui-surface,#fff));
  --jx-scrollbar-thumb-hover:var(--jx-ui-border,var(--jx-border-strong,#aabfd9));
}
html[data-theme] body.ws-body,
html[data-theme] body.bp-body,
html[data-theme] body.ws-body .ws-main,
html[data-theme] body.ws-body .ws-content,
html[data-theme] body.bp-body .bp-main,
html[data-theme] body.bp-body .bp-content{
  background:var(--jx-page-canvas)!important;
}
/* A scrollbar is owned by the element that actually scrolls; an empty canvas
   never reserves a track.  Keep both directions available for wide tables. */
:where(html,body,.ws-tree,.ws-content,.bp-content,.bp-sidebar,.ws-modal-body,
 .ws-form-sheet-body,.ws-floating-body,.ws-table-wrap,.ws-record-panel,
 .order-matrix-wrap,.prod-table-wrap,.bp-table-wrap,.order-view-scroll,
 .order-view-table-area,.sheet-grid,.jx-schema-body){
  scrollbar-width:thin;
  scrollbar-color:var(--jx-scrollbar-thumb) transparent;
}
:where(html,body,.ws-tree,.ws-content,.bp-content,.bp-sidebar,.ws-modal-body,
 .ws-form-sheet-body,.ws-floating-body,.ws-table-wrap,.ws-record-panel,
 .order-matrix-wrap,.prod-table-wrap,.bp-table-wrap,.order-view-scroll,
 .order-view-table-area,.sheet-grid,.jx-schema-body)::-webkit-scrollbar{width:8px;height:8px;}
:where(html,body,.ws-tree,.ws-content,.bp-content,.bp-sidebar,.ws-modal-body,
 .ws-form-sheet-body,.ws-floating-body,.ws-table-wrap,.ws-record-panel,
 .order-matrix-wrap,.prod-table-wrap,.bp-table-wrap,.order-view-scroll,
 .order-view-table-area,.sheet-grid,.jx-schema-body)::-webkit-scrollbar-thumb{
  background:var(--jx-scrollbar-thumb);border:2px solid transparent;
  background-clip:padding-box;border-radius:10px;
}
:where(html,body,.ws-tree,.ws-content,.bp-content,.bp-sidebar,.ws-modal-body,
 .ws-form-sheet-body,.ws-floating-body,.ws-table-wrap,.ws-record-panel,
 .order-matrix-wrap,.prod-table-wrap,.bp-table-wrap,.order-view-scroll,
 .order-view-table-area,.sheet-grid,.jx-schema-body)::-webkit-scrollbar-thumb:hover{
  background:var(--jx-scrollbar-thumb-hover);background-clip:padding-box;
}
:where(html,body,.ws-tree,.ws-content,.bp-content,.bp-sidebar,.ws-modal-body,
 .ws-form-sheet-body,.ws-floating-body,.ws-table-wrap,.ws-record-panel,
 .order-matrix-wrap,.prod-table-wrap,.bp-table-wrap,.order-view-scroll,
 .order-view-table-area,.sheet-grid,.jx-schema-body)::-webkit-scrollbar-track{background:transparent;}

/* Strong enough to normalize older one-off scrollbars in every skin. */
html[data-theme] :is(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,
 .ws-floating-body,.bp-content,.bp-sidebar,.ws-table-wrap,.prod-table-wrap,
 .bp-table-wrap,.order-matrix-wrap,.order-view-scroll,.ws-record-panel,
 .sheet-grid,.jx-schema-body){
  scrollbar-color:var(--jx-scrollbar-thumb) transparent;
  scrollbar-width:thin;
}
html[data-theme] :is(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,
 .ws-floating-body,.bp-content,.bp-sidebar,.ws-table-wrap,.prod-table-wrap,
 .bp-table-wrap,.order-matrix-wrap,.order-view-scroll,.ws-record-panel,
 .sheet-grid,.jx-schema-body)::-webkit-scrollbar{width:8px;height:8px;}
html[data-theme] :is(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,
 .ws-floating-body,.bp-content,.bp-sidebar,.ws-table-wrap,.prod-table-wrap,
 .bp-table-wrap,.order-matrix-wrap,.order-view-scroll,.ws-record-panel,
 .sheet-grid,.jx-schema-body)::-webkit-scrollbar-thumb{
  background:var(--jx-scrollbar-thumb);border:2px solid transparent;
  background-clip:padding-box;border-radius:10px;
}
html[data-theme] :is(.ws-tree,.ws-content,.ws-modal-body,.ws-form-sheet-body,
 .ws-floating-body,.bp-content,.bp-sidebar,.ws-table-wrap,.prod-table-wrap,
 .bp-table-wrap,.order-matrix-wrap,.order-view-scroll,.ws-record-panel,
 .sheet-grid,.jx-schema-body)::-webkit-scrollbar-track{background:transparent;}

/* Before appearance.js initializes, avoid a different first-paint canvas. */
body.ws-body,body.bp-body{background:var(--jx-page-canvas,var(--jx-surface,#fff))!important;}

/* Other business workspaces use the same semantic substrate.  Exclude
   dedicated document/paper editors and print media from this page rule. */
@media screen{
  html[data-theme] body:is(.hr-body,.mg-body,.ac-body,.pc-page,.jx-mobile-body),
  html[data-theme] body.hr-body :is(.hr-main,.hr-content){
    background:var(--jx-page-canvas)!important;
  }
}

/* Four seasonal tool canvases use the navigation-side paper shades. */
html[data-theme="spring"]{--jx-tool-sidebar-paper:var(--jx-spring-shell,#fffef8);}
html[data-theme="summer"]{--jx-tool-sidebar-paper:#fffefa;}
html[data-theme="autumn"]{--jx-tool-sidebar-paper:#fffbf4;}
html[data-theme="winter"]{--jx-tool-sidebar-paper:#fdfdfa;}
