:root{--bg:#f4f5f7;--text:#172b4d;--muted:#6b778c;--sub:#42526e;--line:#dfe1e6;--line2:#ebecf0;--primary:#0052cc;--primary2:#0065ff;--panel:#fff;--rail:#263238;--shadow:0 1px 2px rgba(9,30,66,.18)}
*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;background:var(--bg);color:var(--text);font:500 14px/1.15 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Helvetica Neue","Microsoft YaHei",Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer}.is-hidden{display:none!important}
.login-shell{min-height:100vh;display:flex;background:#f4f5f7;color:#172b4d}.login-left,.login-right{width:50%;min-height:100vh}.login-left{position:relative;display:flex;color:#fff;background:linear-gradient(148deg,#0052cc 0%,#0065ff 46%,#0747a6 100%);overflow:hidden}.login-left:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 20% 15%,rgba(255,255,255,.22),transparent 26%),radial-gradient(circle at 82% 78%,rgba(255,255,255,.14),transparent 32%)}.login-left-body{position:relative;z-index:1;width:401px;margin-left:120px;margin-top:126px}.login-brand{height:35px;display:flex;align-items:center;gap:12px;font-size:24px;font-weight:700;letter-spacing:.2px}.login-brand-mark{width:38px;height:32px;border-radius:6px;display:grid;place-items:center;background:#fff;color:#0052cc;font-size:16px;font-weight:800}.login-feature-list{margin-top:63px}.login-feature{display:flex;gap:8px;margin-bottom:32px;min-height:58px}.feature-icon{width:16px;height:16px;margin-top:0;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);font-size:11px}.login-feature h3{margin:0 0 8px;font-size:16px;line-height:18px;font-weight:600;color:#fff}.login-feature p{margin:0;font-size:12px;line-height:16px;font-weight:400;color:rgba(255,255,255,.92)}.login-corner-bg{position:absolute;left:-42px;bottom:-26px;width:278px;height:215px;border-radius:70px 120px 0 0;background:rgba(255,255,255,.1);transform:rotate(-8deg)}.login-corner-bg:after{content:"";position:absolute;left:58px;top:42px;width:180px;height:130px;border-radius:50%;border:1px solid rgba(255,255,255,.18)}.login-right{display:flex;justify-content:center}.login-main-wrap{width:450px;margin-top:152px}.toggle-login{display:flex;height:32px}.login-tab{font-size:24px;line-height:32px;font-weight:600;color:#172b4d;position:relative}.active-tab:after{content:"";position:absolute;left:0;bottom:-12px;width:32px;height:3px;border-radius:2px;background:#0052cc}.login-form{margin-top:32px}.form-item{display:block;margin-bottom:18px;color:#42526e}.form-item>span{display:block;height:22px;line-height:22px;margin-bottom:8px}.required>span:before{content:"*";color:#de350b;margin-right:2px}.form-item input{width:100%;height:42px;border:0;border-radius:4px;background:#fff;box-shadow:#dcdfe6 0 0 0 1px inset;padding:0 12px;color:#42526e;outline:0}.form-item input:focus{box-shadow:#0052cc 0 0 0 1px inset}.agree-wrap{display:flex;align-items:center;height:32px;margin-top:4px;color:#42526e;font-size:14px}.agree-wrap input{width:14px;height:14px;margin:0 6px 0 0;accent-color:#0052cc}.agree-wrap b{font-weight:500;color:#0052cc}.login-submit{width:100%;height:40px;margin-top:10px;border:1px solid #0052cc;border-radius:4px;background:#0052cc;color:#fff;font-size:16px;font-weight:500}.login-submit:hover{background:#0065ff}.login-error{min-height:20px;margin-top:10px;color:#de350b;font-size:13px}.third-login{margin-top:50px}.divider{height:1px;background:#dfe1e6;position:relative;text-align:center}.divider span{position:relative;top:-8px;padding:0 18px;background:#f4f5f7;color:#8993a4}.third-login-btn{display:block;width:40px;height:40px;margin:40px auto 0;border:0;border-radius:20px;background:#fafbfc;color:#0052cc;font-weight:700}
.app-shell{min-height:100vh;padding-top:56px;padding-left:48px}.topbar{position:fixed;z-index:20;inset:0 0 auto 0;height:56px;display:flex;align-items:center;background:#fff;box-shadow:0 1px 2px #dbdbdb}.top-logo{width:158px;display:flex;align-items:center;gap:9px;padding-left:18px;font-weight:700;font-size:18px;color:#172b4d}.brand-mark{width:30px;height:30px;border-radius:6px;display:grid;place-items:center;background:#0052cc;color:#fff;font-size:13px}.nav{height:56px;display:flex;align-items:center;min-width:0;overflow:hidden;user-select:none}.nav-item{height:56px;padding:0 13px;border:0;border-bottom:3px solid transparent;background:#fff;color:#172b4d;white-space:nowrap;cursor:grab}.nav-item:hover{background:#f4f5f7}.nav-item:active{cursor:grabbing}.nav-item.drag-over{background:#e9f2ff;color:#0052cc}.nav-item.active{color:var(--primary);border-bottom-color:var(--primary);cursor:default}.top-tools{margin-left:auto;display:flex;align-items:center;gap:4px;padding-right:14px;position:relative}
.top-tool-dropdown{position:relative}
.top-dropdown-menu{position:absolute;top:100%;right:0;z-index:1000;min-width:200px;padding:8px 0;margin-top:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 10px 40px rgba(0,0,0,.15);animation:dropdownFadeIn .2s ease}
@keyframes dropdownFadeIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.dropdown-header{padding:10px 16px;font-size:13px;font-weight:600;color:#64748b;border-bottom:1px solid #f1f5f9}
.dropdown-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px 16px;border:0;background:transparent;color:#1e293b;font-size:14px;text-align:left;cursor:pointer;transition:background .15s}
.dropdown-item:hover{background:#f1f5f9}
.dropdown-item.danger{color:#dc2626}
.dropdown-item.danger:hover{background:#fef2f2}
.dropdown-icon{font-size:16px;opacity:.8}
.dropdown-divider{height:1px;margin:4px 0;background:#e2e8f0}
.user-profile-header{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #f1f5f9}
.user-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:16px;font-weight:600;display:grid;place-items:center}
.user-info{flex:1}
.user-name{font-size:14px;font-weight:600;color:#1e293b}
.user-role{font-size:12px;color:#64748b;margin-top:2px}
.notification-list{max-height:400px;overflow-y:auto}
.notification-item{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid #f8fafc;cursor:pointer;transition:background .15s}
.notification-item:hover{background:#f8fafc}
.notification-item.unread{background:#f0f9ff}
.notification-icon{width:36px;height:36px;border-radius:50%;background:#f1f5f9;display:grid;place-items:center;font-size:16px;flex-shrink:0}
.notification-content{flex:1;min-width:0}
.notification-title{font-size:13px;font-weight:600;color:#1e293b;margin-bottom:2px}
.notification-desc{font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notification-time{font-size:11px;color:#94a3b8;margin-top:4px}
.dropdown-footer{padding:8px 16px;border-top:1px solid #f1f5f9}
.view-all-btn{width:100%;padding:8px 12px;border:1px solid #e2e8f0;border-radius:6px;background:#fff;color:#475569;font-size:13px;font-weight:500;cursor:pointer;transition:all .15s}
.view-all-btn:hover{background:#f8fafc;border-color:#cbd5e1}
.clear-all-btn{padding:4px 8px;border:0;background:transparent;color:#3b82f6;font-size:12px;font-weight:500;cursor:pointer}
.clear-all-btn:hover{color:#2563eb}
.icon-btn,.user-btn,.logout-btn{height:32px;min-width:32px;border:0;border-radius:16px;background:#fff;color:#344563}.icon-btn:hover,.user-btn:hover,.logout-btn:hover{background:#f4f5f7}.logout-btn{padding:0 10px;color:#6b778c}.icon-btn{font-family:inherit;position:relative}.icon-btn sup{position:absolute;top:-2px;right:-7px;min-width:22px;height:16px;line-height:16px;padding:0 4px;border-radius:8px;background:#ff5630;color:#fff;font-size:10px}.user-btn{padding:0 10px}.sidebar{position:fixed;z-index:10;left:0;top:56px;bottom:0;width:48px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;align-items:center;padding-top:12px;gap:12px}.rail-icon{width:32px;height:32px;border:0;border-radius:16px;background:#fff;color:#42526e;font-size:17px}.rail-icon:hover,.rail-icon.active{background:#e9f2ff;color:var(--primary)}.workspace{padding:16px 16px 26px;min-width:0}.status-strip{height:30px;display:flex;align-items:center;gap:18px;color:#6b778c;font-size:13px}.status-strip b{color:#172b4d}.wide-count{display:inline-block;min-width:72px;text-align:right;font-variant-numeric:tabular-nums}.text-link{border:0;background:transparent;color:#0052cc}.filter-panel{background:#fff;border:1px solid #ebecf0;border-radius:2px;padding:12px;margin-bottom:12px;box-shadow:var(--shadow)}.scrm-search-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.scrm-search-box{width:315px;height:34px;display:flex;border:1px solid #dfe1e6;border-radius:3px;background:#fff}.scrm-search-box input{flex:1;border:0;outline:0;padding:0 10px;color:#172b4d}.icon-search{width:38px;border:0;background:#fff;color:#6b778c}.display-label{color:#6b778c}.scene-btn,.advanced-btn{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;padding:0 12px}.scene-btn.active{background:#e9f2ff;border-color:#b3d4ff;color:#0052cc}.advanced-btn{color:#0052cc}.advanced-fields{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:10px;margin-top:12px}.advanced-fields input,.advanced-fields select,.admin-form input,.admin-form select{height:34px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;padding:0 9px;outline:0;color:#42526e}.view{display:none}.active-view{display:block}#customersView.active-view{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);gap:12px}.wk-page-card{background:#fff;border:1px solid #ebecf0;border-radius:2px;box-shadow:var(--shadow);min-width:0}.wk-detail-card{align-self:start}.wk-list-head{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #ebecf0}.wk-list-head.compact{height:auto;min-height:56px;padding:12px 16px}.module-title{display:flex;align-items:center;gap:10px}.module-title h2,.wk-list-head h2,.panel-title h2{margin:0;font-size:18px;font-weight:600;color:#172b4d}.module-icon{width:28px;height:28px;border-radius:14px;background:#e9f2ff;color:#0052cc;display:grid;place-items:center}.wk-actions{display:flex;gap:8px}.wk-btn,.square-btn,.primary-btn{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;padding:0 12px}.wk-btn-primary,.primary-btn{border-color:#0052cc;background:#0052cc;color:#fff}.square-btn{width:32px;padding:0}.wk-table-toolbar{height:42px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;color:#6b778c;border-bottom:1px solid #ebecf0}.wk-count span{color:#172b4d}.wk-table-wrap,.responsive-table{overflow:auto;max-height:calc(100vh - 230px)}.wk-data-table,table{width:100%;border-collapse:separate;border-spacing:0;white-space:nowrap;font-size:13px}th,td{height:40px;border-bottom:1px solid #ebecf0;padding:0 10px;text-align:left;color:#42526e}th{position:sticky;top:0;z-index:1;background:#fafbfc;color:#6b778c;font-weight:600}.customer-item{cursor:pointer}.customer-item:hover{background:#f4f5f7}.customer-item.active{background:#e9f2ff}.wk-check{width:38px}.wk-icon-cell{width:32px;text-align:center;color:#6b778c}.wk-main-name{color:#0052cc;font-weight:600}.wk-cell-muted{color:#8993a4}.tag-row{display:flex;gap:4px;flex-wrap:wrap}.tag-pill,.status-pill,.badge,.hero-pill{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;background:#f4f5f7;color:#42526e;font-size:12px}.status-pill.done{background:#e3fcef;color:#00875a}.wk-breadcrumb{font-size:12px;color:#8993a4;margin-bottom:6px}.wk-customer-summary{padding:16px;border-bottom:1px solid #ebecf0}.hero-title{margin:0 0 10px;font-size:20px}.hero-meta{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.mini-btn{height:28px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#0052cc}.hero-empty,.empty-hint{padding:18px;color:#8993a4;text-align:center}.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px 16px}.metric-card{border:1px solid #ebecf0;border-radius:3px;padding:12px;background:#fafbfc}.metric-card span{display:block;color:#6b778c;font-size:12px}.metric-card b{display:block;margin-top:8px;font-size:20px}.detail-grid{display:grid;grid-template-columns:1fr;gap:12px;padding:0 16px 16px}.content-card{border:1px solid #ebecf0;border-radius:3px;background:#fff}.content-card.wide{min-width:0}.panel-title{display:flex;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid #ebecf0}.contact-list,.clue-list{padding:12px}.contact-card,.clue-card{padding:12px;border:1px solid #ebecf0;border-radius:3px;margin-bottom:8px;background:#fff}.contact-card b,.clue-card b{display:block;margin-bottom:6px;color:#172b4d}.contact-card span,.clue-card span{color:#6b778c}.clue-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.clue-meta em{font-style:normal;padding:3px 7px;border-radius:3px;background:#f4f5f7;color:#42526e;font-size:12px}.clue-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:12px;border-bottom:1px solid #ebecf0}.tab{height:30px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;padding:0 10px}.tab.active{background:#e9f2ff;border-color:#b3d4ff;color:#0052cc}.admin-form{display:flex;gap:10px;flex-wrap:wrap;padding:16px}.table-card{padding-bottom:16px}.skeleton-list:before{content:"加载中...";display:block;padding:32px;text-align:center;color:#8993a4}
@media (max-width:1100px){#customersView.active-view{grid-template-columns:1fr}.advanced-fields{grid-template-columns:repeat(3,1fr)}.nav-item{padding:0 9px}.login-left-body{margin-left:60px}.login-main-wrap{width:410px}}
@media (max-width:760px){.login-shell{display:block}.login-left{display:none}.login-right{width:100%;min-height:100vh;padding:0 24px}.login-main-wrap{width:100%;margin-top:110px}.app-shell{padding-left:0}.sidebar{display:none}.top-logo{width:132px}.nav{overflow-x:auto}.top-tools .icon-btn{display:none}.workspace{padding:10px}.advanced-fields{grid-template-columns:1fr}.scrm-search-box{width:100%}.wk-table-wrap,.responsive-table{max-height:none}.metric-grid{grid-template-columns:1fr}.status-strip{height:auto;flex-wrap:wrap}.wk-list-head{height:auto;min-height:56px;align-items:flex-start;padding:12px;gap:10px}.wk-actions{flex-wrap:wrap}}

/* SCRM module parity: customer list -> detail workflow */
#customersView.active-view{display:block}
.wk-detail-full{min-height:calc(100vh - 150px)}
.wk-pager{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-top:1px solid #ebecf0;color:#6b778c;background:#fff;flex-shrink:0}
.pager-right{display:flex;align-items:center;gap:10px}.pager-right select{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e}.wk-btn:disabled{opacity:.45;cursor:not-allowed}
.wk-btn-sm{height:26px;line-height:24px;padding:0 8px;font-size:12px}
.wk-btn-danger{background:#fef2f2;border:1px solid #fecaca;color:#dc2626}.wk-btn-danger:hover{background:#fee2e2;border-color:#f87171;color:#b91c1c}
.batch-selection-badge{display:inline-block;height:26px;line-height:26px;padding:0 12px;background:#dbeafe;color:#1d4ed8;border-radius:3px;font-size:12px;margin-right:8px}
.cfg-table-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.detail-topline{height:44px;display:flex;align-items:center;gap:12px;padding:0 16px;border-bottom:1px solid #ebecf0;background:#fafbfc}
.scrm-detail-hero{display:flex;align-items:center;justify-content:space-between;gap:16px}.hero-action-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.detail-tabs{height:44px;display:flex;align-items:center;gap:22px;padding:0 18px;border-top:1px solid #ebecf0;border-bottom:1px solid #ebecf0;background:#fff}.detail-tab{height:44px;border:0;border-bottom:3px solid transparent;background:#fff;color:#42526e}.detail-tab.active{color:#0052cc;border-bottom-color:#0052cc;font-weight:600}.detail-pane{padding:16px}
.customer-profile{padding:16px}.scrm-field-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:18px 24px}.scrm-field-grid div{min-height:54px}.scrm-field-grid .span2{grid-column:span 2}.scrm-field-grid label{display:block;margin-bottom:8px;color:#8993a4;font-size:12px}.scrm-field-grid b,.scrm-field-grid span{color:#172b4d;font-size:14px}.wk-data-table tr.customer-item td{height:44px}.wk-data-table tr.customer-item:hover td{background:#f4f5f7}.wk-main-name{text-decoration:none;color:#0052cc}
@media (max-width:1100px){.scrm-field-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.scrm-field-grid .span2{grid-column:span 2}}
@media (max-width:760px){.wk-pager{height:auto;gap:10px;align-items:flex-start;flex-direction:column;padding:10px 12px}.scrm-detail-hero{align-items:flex-start;flex-direction:column}.detail-tabs{overflow:auto;gap:16px}.scrm-field-grid{grid-template-columns:1fr}.scrm-field-grid .span2{grid-column:span 1}.detail-pane{padding:10px}}


/* Wukong/SCRM-like right drawer detail popup for every table */
.drawer-overlay{position:fixed;z-index:80;inset:0;background:transparent;pointer-events:none}
.detail-drawer{position:fixed;z-index:90;right:0;top:var(--active-topbar-height,56px);bottom:var(--active-pager-height,0px);width:min(920px,calc(100vw - 68px));background:#fff;box-shadow:-4px 0 18px rgba(9,30,66,.28);display:flex;flex-direction:column;border-left:1px solid #dfe1e6;animation:drawerIn .18s ease-out}
@keyframes drawerIn{from{transform:translateX(24px);opacity:.7}to{transform:translateX(0);opacity:1}}
.drawer-head{min-height:118px;padding:20px 22px 14px;display:flex;align-items:flex-start;gap:14px;border-bottom:1px solid #ebecf0;background:linear-gradient(180deg,#f8fbff 0%,#fff 100%)}
.drawer-avatar{width:48px;height:48px;border-radius:8px;background:#0052cc;color:#fff;display:grid;place-items:center;font-size:22px;font-weight:700;flex:none}.drawer-title-block{min-width:0;flex:1}.drawer-kicker{font-size:12px;color:#8993a4;margin-bottom:6px}.drawer-title-block h2{margin:0 0 8px;font-size:22px;font-weight:600;line-height:28px;color:#172b4d;word-break:break-all}.drawer-subtitle{display:flex;gap:10px;flex-wrap:wrap;color:#6b778c;font-size:13px}.drawer-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.drawer-close{width:32px;height:32px;border:0;border-radius:16px;background:#f4f5f7;color:#42526e;font-size:24px;line-height:30px}.drawer-close:hover{background:#e9f2ff;color:#0052cc}.drawer-actions{height:48px;display:flex;align-items:center;gap:8px;padding:0 22px;border-bottom:1px solid #ebecf0;background:#fff}.drawer-action-btn{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;padding:0 12px}.drawer-action-btn.primary{border-color:#0052cc;background:#0052cc;color:#fff}.drawer-tabs{height:45px;display:flex;align-items:center;gap:22px;padding:0 22px;border-bottom:1px solid #ebecf0}.drawer-tab{height:45px;border:0;border-bottom:3px solid transparent;background:#fff;color:#42526e}.drawer-tab.active{color:#0052cc;border-bottom-color:#0052cc;font-weight:600}.drawer-body{flex:1;overflow:auto;padding:18px 22px;background:#fff}.drw-field-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:18px 34px}.drw-field-grid>div{min-height:54px}.drw-field-grid .span2{grid-column:span 2}.drw-field-grid label{display:block;margin-bottom:8px;color:#8993a4;font-size:12px}.drw-field-grid b,.drw-field-grid span{color:#172b4d;font-size:14px;line-height:20px;word-break:break-all}.drw-card{border:1px solid #ebecf0;border-radius:3px;background:#fff;margin-bottom:10px;padding:12px}.drw-card b{display:block;margin-bottom:8px;color:#172b4d}.drw-card span{display:block;color:#6b778c;line-height:20px}.drawer-link{cursor:pointer}.drawer-link:hover{text-decoration:underline}
@media (max-width:760px){.detail-drawer{top:0;width:100vw}.drawer-head{padding:16px}.drawer-actions,.drawer-tabs{padding:0 16px;overflow:auto}.drawer-body{padding:14px}.drw-field-grid{grid-template-columns:1fr}.drw-field-grid .span2{grid-column:span 1}}


/* SCRM form modal + follow-up timeline */
.modal-overlay{position:fixed;z-index:120;inset:0;background:rgba(9,30,66,.38)}
.form-modal{position:fixed;z-index:130;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 28px));max-height:calc(100vh - 80px);background:#fff;border-radius:4px;box-shadow:0 8px 28px rgba(9,30,66,.34);display:flex;flex-direction:column;overflow:hidden}.form-modal-head{height:54px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ebecf0}.form-modal-head h2{margin:0;font-size:18px;color:#172b4d}.form-modal-body{padding:18px;overflow:auto}.form-modal-foot{height:56px;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:0 18px;border-top:1px solid #ebecf0;background:#fafbfc}.modal-field{display:block;margin-bottom:14px}.modal-field span{display:block;margin-bottom:8px;color:#6b778c}.modal-field input,.modal-field select,.modal-field textarea{width:100%;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#172b4d;outline:0;padding:8px 10px}.modal-field input,.modal-field select{height:36px}.modal-field textarea{height:110px;resize:vertical;line-height:20px}.modal-field input:focus,.modal-field select:focus,.modal-field textarea:focus{border-color:#0052cc}.modal-message{line-height:24px;color:#42526e}.drw-timeline{position:relative;padding-left:14px}.drw-timeline:before{content:"";position:absolute;left:3px;top:8px;bottom:8px;width:2px;background:#ebecf0}.drw-timeline-item{position:relative;margin-bottom:14px;padding:12px 14px;border:1px solid #ebecf0;border-radius:3px;background:#fff}.drw-timeline-item:before{content:"";position:absolute;left:-16px;top:18px;width:9px;height:9px;border-radius:50%;background:#0052cc}.drw-timeline-item div{display:flex;align-items:center;justify-content:space-between;gap:10px}.drw-timeline-item b{color:#172b4d}.drw-timeline-item span{color:#8993a4;font-size:12px}.drw-timeline-item p{margin:10px 0;color:#42526e;line-height:22px}.drw-timeline-item em{font-style:normal;color:#0052cc;font-size:12px}


/* SCRM admin console */
.admin-console{overflow:hidden}.admin-summary{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:12px;padding:14px 16px;border-bottom:1px solid #ebecf0;background:#fafbfc}.admin-metric{border:1px solid #ebecf0;border-radius:3px;background:#fff;padding:12px}.admin-metric.wide{grid-column:span 1}.admin-metric span{display:block;color:#8993a4;font-size:12px;margin-bottom:8px}.admin-metric b{display:block;color:#172b4d;font-size:18px;line-height:24px;word-break:break-all}
.admin-page-help{background:#e6f7ff;border:1px solid #91d5ff;border-radius:4px;padding:12px 16px;margin:0 16px 12px;color:#1890ff;font-size:14px}
.admin-menu-group{margin:6px 0}.admin-menu-group .admin-group-label{padding:10px 18px 4px;color:#5e6c84;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #ebecf0;margin-bottom:4px}.admin-tabs{height:44px;display:flex;align-items:center;gap:22px;padding:0 16px;border-bottom:1px solid #ebecf0;background:#fff}.admin-tab{height:44px;border:0;border-bottom:3px solid transparent;background:#fff;color:#42526e}.admin-tab.active{color:#0052cc;border-bottom-color:#0052cc;font-weight:600}.admin-pane{max-height:calc(100vh - 260px);overflow:auto}.admin-pane table .mini-btn{margin:2px 3px}.form-modal-body table{margin-top:10px}
@media (max-width:900px){.admin-summary{grid-template-columns:repeat(2,1fr)}.admin-tabs{overflow:auto}}@media (max-width:560px){.admin-summary{grid-template-columns:1fr}}


/* sortable headers */
.sort-th{border:0;background:transparent;color:inherit;font:inherit;font-weight:600;padding:0;white-space:nowrap}.sort-th:hover,.sort-th.active{color:#0052cc}


/* admin field designer */
.field-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.field-form-grid .modal-field:has(textarea){grid-column:span 2}.modal-checks{grid-column:span 2;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:8px 0 4px}.modal-checks label{display:flex;align-items:center;gap:6px;color:#42526e}.modal-checks input{accent-color:#0052cc}@media (max-width:620px){.field-form-grid{grid-template-columns:1fr}.field-form-grid .modal-field:has(textarea),.modal-checks{grid-column:span 1}.modal-checks{grid-template-columns:1fr 1fr}}


/* admin reports */
#reportsPane{padding-bottom:16px}.report-preview{margin:14px 16px 0;border:1px solid #ebecf0;border-radius:3px;background:#fff;padding:14px;overflow:auto}.report-preview h3{margin:0 0 10px;color:#172b4d}.report-note{margin-bottom:10px;padding:8px 10px;border-radius:3px;background:#e9f2ff;color:#0052cc;font-size:13px}.report-preview table{min-width:560px}


/* SCRM systemconfig parity skeleton */
body.admin-mode .filter-panel{display:none!important}
body.admin-mode .workspace{background:#f4f5f7}
.admin-system-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:12px}.admin-side{background:#fff;border:1px solid #ebecf0;box-shadow:var(--shadow);min-height:calc(100vh - 135px);padding:10px 0}.admin-side-title{height:42px;line-height:42px;padding:0 18px;color:#172b4d;font-size:16px;font-weight:600;border-bottom:1px solid #ebecf0}.admin-menu{width:100%;height:40px;border:0;background:#fff;color:#42526e;text-align:left;padding:0 18px}.admin-menu:hover{background:#f4f5f7}.admin-menu.active{background:#e9f2ff;color:#0052cc;border-right:3px solid #0052cc;font-weight:600}.admin-config-pane{padding:16px}.admin-config-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px}.admin-config-card{border:1px solid #ebecf0;border-radius:3px;background:#fff;padding:16px}.admin-config-card h3{margin:0 0 8px;color:#172b4d;font-size:16px}.admin-config-card p{min-height:42px;margin:0 0 12px;color:#6b778c;line-height:21px}.admin-tabs{overflow:auto}.admin-summary{grid-template-columns:repeat(5,minmax(120px,1fr))}@media (max-width:1000px){.admin-system-layout{grid-template-columns:1fr}.admin-side{min-height:auto;display:flex;overflow:auto;padding:0}.admin-side-title{display:none}.admin-menu{width:auto;white-space:nowrap;padding:0 14px}.admin-menu.active{border-right:0;border-bottom:3px solid #0052cc}.admin-config-grid{grid-template-columns:1fr}.admin-summary{grid-template-columns:repeat(2,1fr)}}


/* employee & department admin */
.dept-toolbar{padding:12px 16px;border-bottom:1px solid #ebecf0}.dept-tree{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:10px;padding:12px 16px}.dept-node{border:1px solid #ebecf0;border-radius:3px;background:#fff;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.dept-node b{display:block;margin-bottom:6px;color:#172b4d}.dept-node span{display:block;color:#6b778c;font-size:12px;line-height:18px}
.org-admin-layout{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:640px;background:#fafbfc}.org-tree-panel{border-right:1px solid #ebecf0;background:#fff;min-width:0}.org-tree-head{height:58px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 14px;border-bottom:1px solid #ebecf0}.org-tree-head h3{margin:0;color:#172b4d;font-size:15px}.org-tree-head span{display:block;margin-top:3px;color:#8993a4;font-size:12px}.dept-tree-list{padding:10px 8px 16px;overflow:auto;max-height:calc(100vh - 285px)}.dept-tree-branch{position:relative}.dept-tree-branch .dept-tree-branch:before{content:"";position:absolute;left:calc(14px + var(--level,1)*18px);top:0;bottom:0;border-left:1px dashed #dfe1e6}.dept-tree-item{width:100%;min-height:36px;border:0;border-radius:4px;background:transparent;color:#42526e;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:6px;text-align:left;padding:6px 8px 6px calc(8px + var(--level,0)*18px);cursor:pointer;position:relative}.dept-tree-item:hover{background:#f4f5f7;color:#0052cc}.dept-tree-item.active{background:#e9f2ff;color:#0052cc;font-weight:600}.dept-tree-root{font-weight:600}.dept-tree-caret{font-size:12px;color:#8993a4;text-align:center}.dept-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dept-tree-item em{font-style:normal;color:#8993a4;font-size:12px;background:#f4f5f7;border-radius:10px;padding:1px 7px}.org-table-panel{min-width:0;background:#fff}.dept-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;padding:14px 16px;background:#fafbfc;border-bottom:1px solid #ebecf0}.dept-overview-grid>div{border:1px solid #ebecf0;background:#fff;border-radius:4px;padding:12px}.dept-overview-grid span{display:block;color:#8993a4;font-size:12px;margin-bottom:6px}.dept-overview-grid b{font-size:20px;color:#172b4d}.dept-current-card{margin:14px 16px 0;border:1px solid #4c9aff;background:#e9f2ff;border-radius:4px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dept-current-card h3{margin:0 0 6px;color:#172b4d}.dept-current-card p{margin:0;color:#42526e;font-size:13px}.dept-section-title{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#172b4d}.dept-section-title span{color:#8993a4;font-size:12px}.dept-children-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:10px;padding:0 16px 14px}.dept-member-table{margin:0 16px 18px;border:1px solid #ebecf0;border-radius:4px;overflow:auto}.dept-member-table table{min-width:760px}.wk-btn.danger,.mini-btn.danger{border-color:#ffbdad;color:#de350b;background:#fff7f5}
@media (max-width:1000px){.org-admin-layout{grid-template-columns:1fr}.org-tree-panel{border-right:0;border-bottom:1px solid #ebecf0}.dept-tree-list{max-height:280px}.dept-overview-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:760px){.dept-tree{grid-template-columns:1fr}.dept-node{align-items:flex-start;flex-direction:column}.dept-children-grid{grid-template-columns:1fr}.dept-overview-grid{grid-template-columns:1fr}.dept-current-card{align-items:flex-start;flex-direction:column}}


/* SCRM detail drawer enhanced highlights */
.detail-summary-strip{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-bottom:14px}.detail-summary-strip>div{border:1px solid #ebecf0;border-radius:3px;background:#fafbfc;padding:12px}.detail-summary-strip span{display:block;color:#8993a4;font-size:12px;margin-bottom:8px}.detail-summary-strip b{display:block;color:#172b4d;font-size:16px;line-height:22px;word-break:break-all}@media (max-width:760px){.detail-summary-strip{grid-template-columns:1fr 1fr}}

/* ===== Wukong-Style Full Customer Detail Page ===== */
/* 1. Detail Header */
.wk-detail-header{padding:24px 28px 0;background:#fff;border-bottom:1px solid #ebecf0}
.wk-detail-header-body{display:flex;justify-content:space-between;align-items:flex-start}
.wk-detail-header-left{min-width:0;flex:1}
.wk-detail-header-subtitle{color:#6b778c;font-size:13px;margin-bottom:8px}
.wk-detail-header-title-row{display:flex;align-items:center;gap:10px}
.wk-detail-header-title{font-size:22px;font-weight:700;color:#172b4d;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-detail-header-right{display:flex;align-items:center;flex-shrink:0}
.wk-detail-header-page-switch{display:flex;align-items:center;gap:6px;margin-left:14px}
.wk-detail-header-page-switch .square-btn{width:32px;height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;font-size:14px;display:grid;place-items:center;padding:0}
.wk-detail-header-page-switch .square-btn:hover{background:#f4f5f7;border-color:#0052cc;color:#0052cc}
.focus-icon{width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:#dfe1e6;font-size:20px;line-height:32px;cursor:pointer;transition:color .15s,transform .15s;padding:0}
.focus-icon:hover{transform:scale(1.1)}
.focus-icon.active{color:#fac23d}
.wk-tags-content{display:flex;gap:6px;flex-wrap:wrap;padding:8px 28px 12px;margin-top:6px}
.wk-tags-content .tag-pill{display:inline-block;padding:2px 10px;border-radius:12px;background:#e9f2ff;color:#0052cc;font-size:12px;line-height:20px}

/* 2. Quick Create Bar */
.wk-quick-create-bar{display:flex;align-items:center;gap:8px;padding:10px 28px;overflow-x:auto;white-space:nowrap;background:#fff;border-bottom:1px solid #ebecf0}
.qc-btn{height:32px;padding:0 12px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;font-size:13px;cursor:pointer;white-space:nowrap}
.qc-btn:hover{background:#f4f5f7;border-color:#0052cc;color:#0052cc}
.qc-btn.primary{border-color:#0052cc;background:#0052cc;color:#fff}
.qc-btn.primary:hover{background:#0747a6}

/* 3. Summary Strip */
.detail-head-base{display:flex;background:#f4f5f7;border-radius:4px;padding:16px 20px;margin:10px 28px 0;position:relative}
.detail-head-base .base-item{flex:0 0 20%;overflow:hidden;padding:0 8px}
.detail-head-base .base-item+.base-item{border-left:1px solid #dfe1e6}
.detail-head-base .base-title{color:#6b778c;font-size:13px;margin-bottom:8px}
.detail-head-base .base-value{color:#172b4d;font-size:18px;font-weight:600;min-height:22px;line-height:22px}

/* 4. Tab Bar */
.detail-tabs-bar{display:flex;align-items:center;gap:0;padding:0 28px;background:#fff;border-bottom:1px solid #ebecf0;overflow-x:auto}
.detail-tabs-bar .detail-tab{height:44px;padding:0 18px;border:0;border-bottom:3px solid transparent;background:transparent;color:#42526e;font-size:14px;cursor:pointer;white-space:nowrap}
.detail-tabs-bar .detail-tab:hover{color:#0052cc}
.detail-tabs-bar .detail-tab.active{color:#0052cc;border-bottom-color:#0052cc;font-weight:600}

/* 5. Main Content Container */
.detail-main{height:calc(100vh - 380px);overflow:hidden;position:relative}
.d-container-body{display:flex;height:100%;padding:0}
.d-customer-nav{width:220px;flex-shrink:0;border-right:1px solid #ebecf0;background:#fff;overflow:auto}
.d-nav-title{height:40px;line-height:40px;padding:0 14px;font-weight:600;color:#172b4d;border-bottom:1px solid #ebecf0}
.d-nav-item{min-height:40px;padding:8px 12px;border-bottom:1px solid #f4f5f7;cursor:pointer;color:#42526e;font-size:13px;line-height:18px}
.d-nav-item:hover{background:#f4f5f7;color:#0052cc}.d-nav-item.active{background:#e9f2ff;color:#0052cc;border-left:3px solid #0052cc;padding-left:9px}
.d-nav-item small{display:block;color:#8993a4;margin-top:2px}
.d-left{flex:1;overflow-y:auto;overflow-x:hidden;padding:16px 20px 24px 28px}
.d-right{width:320px;flex-shrink:0;overflow-y:auto;overflow-x:hidden;padding:16px 28px 24px 0;border-left:1px solid #ebecf0;background:#fafbfc}

/* Content Panes */
.d-pane{display:none}
.d-pane.active{display:block}

/* Content Cards */
.d-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;margin-bottom:16px;overflow:hidden}
.d-card.sm{border:0;border-bottom:1px solid #ebecf0;border-radius:0;margin-bottom:0;background:transparent}
.d-card.sm+.d-card.sm{margin-top:0}
.d-card-head{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #ebecf0;background:#fafbfc}
.d-card-head h3{margin:0;font-size:14px;font-weight:600;color:#172b4d}
.d-card-head.sm{height:36px;padding:12px 0;border-bottom:0;background:transparent}
.d-card-head.sm h3{font-size:13px;color:#42526e}
.d-card-body{padding:16px;min-height:40px}
.d-card-body .empty-hint{padding:0;color:#8993a4;font-size:13px}

/* Right panel specifics */
.text-link.sm{font-size:12px;color:#0052cc;border:0;background:transparent;cursor:pointer;padding:0}
.text-link.sm:hover{text-decoration:underline}
#dPrimaryContact .mini-contact-item{padding:8px 0;border-bottom:1px solid #ebecf0;font-size:13px}
#dPrimaryContact .mini-contact-item:last-child{border-bottom:0}
#dPrimaryContact .mini-contact-item b{display:block;color:#172b4d;margin-bottom:4px}
#dPrimaryContact .mini-contact-item span{color:#6b778c;font-size:12px}
#dNearbyCustomers .nearby-item{padding:8px 0;border-bottom:1px solid #ebecf0;cursor:pointer;font-size:13px}
#dNearbyCustomers .nearby-item:hover{color:#0052cc}
#dNearbyCustomers .nearby-item:last-child{border-bottom:0}
#dOperationLogs .log-item{padding:8px 0;border-bottom:1px solid #ebecf0;font-size:12px;color:#6b778c;line-height:18px}
#dOperationLogs .log-item:last-child{border-bottom:0}
#dOperationLogs .log-item b{color:#172b4d;margin-right:6px}

/* Detail Summary Body */
#dSummaryBody .summary-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f4f5f7;font-size:14px;line-height:22px}
#dSummaryBody .summary-row:last-child{border-bottom:0}
#dSummaryBody .summary-row .s-label{color:#6b778c}
#dSummaryBody .summary-row .s-value{color:#172b4d;font-weight:500}

/* Contacts in detail tab */
#dContacts .contact-line{padding:10px 0;border-bottom:1px solid #f4f5f7;display:flex;justify-content:space-between;align-items:center}
#dContacts .contact-line:last-child{border-bottom:0}
#dContacts .contact-line b{color:#172b4d}
#dContacts .contact-line span{color:#6b778c;font-size:13px}

/* Followup timeline in detail tab */
#dFollowups .drw-timeline-item{margin-bottom:10px}

/* Contract cards in detail tab */
#dContracts .contract-mini{padding:10px 0;border-bottom:1px solid #f4f5f7;display:flex;justify-content:space-between;align-items:center}
#dContracts .contract-mini:last-child{border-bottom:0}
#dContracts .contract-mini b{color:#0052cc;cursor:pointer}
#dContracts .contract-mini b:hover{text-decoration:underline}
#dContracts .contract-mini span{color:#6b778c;font-size:13px}

@media (max-width:1100px){
  .detail-head-base{flex-wrap:wrap;margin:10px 16px 0}
  .detail-head-base .base-item{flex:0 0 33.333%;padding:8px}
  .detail-head-base .base-item+.base-item{border-left:0}
  .d-container-body{flex-direction:column}
  .d-right{width:100%;border-left:0;border-top:1px solid #ebecf0;padding:16px 20px}
  .wk-detail-header{padding:16px 16px 0}
  .wk-quick-create-bar{padding:8px 16px}
  .detail-tabs-bar{padding:0 16px}
  .d-left{padding:14px 16px}
}
@media (max-width:760px){
  .detail-head-base .base-item{flex:0 0 50%}
  .wk-detail-header-body{flex-direction:column;gap:10px}
  .wk-detail-header-right{align-self:flex-end}
  .detail-main{height:auto;max-height:calc(100vh - 320px)}
}
body.detail-mode .filter-panel,body.detail-mode .status-strip{display:none!important}
body.detail-mode .workspace{padding-top:0}
body.detail-mode #customersView.active-view{display:block}
body.detail-mode .wk-detail-full{min-height:calc(100vh - 78px);background:#fff;box-shadow:var(--shadow);border:1px solid #ebecf0}


/* ===== Reference-matched customer detail inside right drawer ===== */
.detail-drawer{top:var(--active-topbar-height,56px);width:min(1180px,calc(100vw - 72px));background:#fff;box-shadow:-4px 0 18px rgba(9,30,66,.24);border-left:1px solid #dfe1e6}
.detail-drawer .drawer-head,.detail-drawer #drawerActions,.detail-drawer #drawerTabs{display:none!important}
.detail-drawer .drawer-body{padding:0;background:#fff;overflow:visible}
.wk-reference-detail{height:100%;display:flex;flex-direction:column;background:#fff;color:#172b4d}
.wk-reference-detail .wk-detail-header{flex:0 0 auto;padding:32px 32px 0;background:#fff;border-bottom:0}
.wk-reference-detail .wk-detail-header-body{display:flex;align-items:flex-start;justify-content:space-between}
.wk-reference-detail .wk-detail-header-subtitle{color:#6b778c;font-size:13px;margin-bottom:8px}
.wk-reference-detail .wk-detail-header-title-row{display:flex;align-items:center;gap:10px}
.wk-reference-detail .wk-detail-header-title{font-size:22px;font-weight:700;color:#172b4d;margin:0;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-reference-detail .wk-tags-content{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;padding:0 0 0}
.wk-reference-detail .wk-quick-create-bar{flex:0 0 auto;margin:8px 32px 0;padding:0;display:flex;align-items:center;gap:8px;overflow-x:auto;white-space:nowrap;background:#fff;border-bottom:0}
.wk-reference-detail .detail-head-base{flex:0 0 auto;display:flex;background:#f4f5f7;border-radius:4px;padding:16px;margin:16px 32px 0}
.wk-reference-detail .detail-head-base .base-item{flex:1;min-width:140px;text-align:left;padding:0 14px}
.wk-reference-detail .detail-head-base .base-item+.base-item{border-left:1px solid #dfe1e6}
.wk-reference-detail .detail-head-base .base-title{font-size:12px;color:#999;margin-bottom:8px}
.wk-reference-detail .detail-head-base .base-value{font-size:22px;font-weight:600;color:#333;line-height:26px}
.wk-reference-detail .detail-tabs-bar{flex:0 0 auto;display:flex;align-items:center;height:46px;margin-top:12px;padding:0 32px;background:#fff;border-bottom:1px solid #e6e6e6;gap:0;overflow-x:auto}
.wk-reference-detail .detail-tabs-bar .detail-tab{height:46px;padding:0 18px;border:0;border-bottom:2px solid transparent;background:transparent;color:#42526e;font-size:14px;cursor:pointer;white-space:nowrap}
.wk-reference-detail .detail-tabs-bar .detail-tab.active{color:#2362c2;border-bottom-color:#2362c2;font-weight:600}
.wk-reference-detail .detail-main{flex:1;height:auto;min-height:0;overflow:hidden;padding:0;position:relative}
.wk-reference-detail .d-container-body{height:100%;padding:0 32px 16px;display:block;overflow:hidden}
.wk-reference-detail .left-right-wrap{height:100%;display:flex;margin-top:16px;overflow:hidden}
.wk-reference-detail .left-right-wrap>.left{flex:1;min-width:0;overflow-y:auto;padding:0 16px 16px 0}
.wk-reference-detail .left-right-wrap>.right{flex-shrink:0;width:280px;padding-left:16px;overflow-y:auto}
.wk-reference-detail .d-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;margin-bottom:16px;overflow:hidden}
.wk-reference-detail .d-card-head{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #ebecf0;background:#fafbfc}
.wk-reference-detail .d-card-head h3{margin:0;color:#172b4d;font-size:15px;font-weight:600}
.wk-reference-detail .d-card-body{padding:16px}
.wk-reference-detail .d-card.sm{margin-bottom:12px}.wk-reference-detail .d-card-head.sm{height:38px;padding:0 12px}.wk-reference-detail .d-card-head.sm h3{font-size:14px}.wk-reference-detail .d-card.sm .d-card-body{padding:12px}
.wk-reference-detail .scrm-field-grid{grid-template-columns:repeat(2,minmax(180px,1fr));gap:18px 28px}
.wk-reference-detail .focus-icon{color:#dfe1e6}.wk-reference-detail .focus-icon.active{color:#fac23d}
.wk-reference-detail .wk-detail-header-page-switch{display:flex;gap:6px}.wk-reference-detail .wk-detail-header-page-switch .square-btn{width:32px;height:32px}
@media (max-width:900px){.detail-drawer{width:100vw}.wk-reference-detail .left-right-wrap{flex-direction:column;overflow:auto}.wk-reference-detail .left-right-wrap>.left,.wk-reference-detail .left-right-wrap>.right{width:auto;overflow:visible;padding:0}.wk-reference-detail .detail-main{overflow:auto}.wk-reference-detail .d-container-body{overflow:auto}.wk-reference-detail .detail-head-base{overflow-x:auto}.wk-reference-detail .scrm-field-grid{grid-template-columns:1fr}}


/* ===== Wukong detail module side menu: left-bottom + button picker ===== */
.wk-reference-detail{position:relative}
.wk-reference-detail .detail-tabs-bar{display:none!important}
.wk-reference-detail .detail-module-layout{flex:1;min-height:0;display:flex;position:relative;margin-top:12px;border-top:1px solid #ebecf0;background:#fff;overflow:hidden}
.wk-reference-detail .detail-side-menu{width:108px;flex:0 0 108px;border-right:1px solid #ebecf0;background:#fafbfc;display:flex;flex-direction:column;align-items:stretch;position:relative}
.wk-reference-detail .detail-side-menu-list{flex:1;overflow-y:auto;padding:8px 0 56px}
.wk-reference-detail .detail-side-menu-item{width:100%;height:44px;border:0;background:transparent;color:#42526e;display:flex;align-items:center;gap:8px;padding:0 10px;font-size:13px;cursor:pointer;text-align:left;border-left:3px solid transparent}
.wk-reference-detail .detail-side-menu-item:hover{background:#eef2f8;color:#2362c2}
.wk-reference-detail .detail-side-menu-item.active{background:#fff;color:#2362c2;border-left-color:#2362c2;font-weight:600}
.wk-reference-detail .side-menu-icon{width:18px;display:inline-flex;align-items:center;justify-content:center;color:#6b778c;font-size:14px;flex-shrink:0}
.wk-reference-detail .detail-side-menu-item.active .side-menu-icon{color:#2362c2}
.wk-reference-detail .detail-module-add{position:absolute;left:18px;bottom:14px;width:34px;height:34px;border:1px solid #dfe1e6;border-radius:50%;background:#fff;color:#2362c2;font-size:22px;line-height:28px;cursor:pointer;box-shadow:0 2px 8px rgba(9,30,66,.12)}
.wk-reference-detail .detail-module-add:hover{background:#2362c2;color:#fff;border-color:#2362c2}
.wk-reference-detail .detail-main-with-modules{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#fff}
.wk-reference-detail .detail-module-header{height:42px;flex:0 0 42px;display:flex;align-items:center;padding:0 24px;border-bottom:1px solid #ebecf0;background:#fff}
.wk-reference-detail .detail-tab-breadcrumb{font-size:15px;font-weight:600;color:#172b4d}
.wk-reference-detail .detail-main-with-modules .d-container-body{flex:1;min-height:0;height:auto;padding:0 24px 16px;display:block;overflow:hidden}
.module-picker-pop{position:absolute;left:128px;bottom:18px;z-index:5;width:230px;background:#fff;border:1px solid #dfe1e6;border-radius:4px;box-shadow:0 8px 22px rgba(9,30,66,.22);padding:10px 0}
.module-picker-title{padding:0 14px 6px;font-size:15px;font-weight:600;color:#172b4d}
.module-picker-tip{padding:0 14px 8px;font-size:12px;color:#8993a4;line-height:18px;border-bottom:1px solid #ebecf0}
.module-picker-row{height:36px;display:flex;align-items:center;gap:8px;padding:0 14px;font-size:13px;color:#42526e;cursor:pointer}
.module-picker-row:hover{background:#f4f5f7}.module-picker-row input{accent-color:#2362c2}
.module-picker-foot{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px 0;border-top:1px solid #ebecf0;margin-top:6px}
@media (max-width:900px){.wk-reference-detail .detail-module-layout{flex-direction:column}.wk-reference-detail .detail-side-menu{width:auto;flex:0 0 auto;min-height:52px;flex-direction:row;overflow-x:auto}.wk-reference-detail .detail-side-menu-list{display:flex;flex:1;padding:0 56px 0 0;overflow-x:auto}.wk-reference-detail .detail-side-menu-item{width:auto;min-width:88px;border-left:0;border-bottom:3px solid transparent}.wk-reference-detail .detail-side-menu-item.active{border-bottom-color:#2362c2}.wk-reference-detail .detail-module-add{left:auto;right:12px;bottom:9px}.module-picker-pop{left:auto;right:14px;bottom:62px}}

.module-picker-row{justify-content:space-between;gap:8px}
.module-picker-row>label{display:flex;align-items:center;gap:8px;min-width:0;flex:1;cursor:pointer}
.module-picker-row.disabled{color:#a5adba;background:#fafbfc}
.module-order-actions{display:inline-flex;gap:4px;flex-shrink:0}
.module-order-btn{width:24px;height:24px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#42526e;cursor:pointer;line-height:20px}
.module-order-btn:hover:not(:disabled){background:#2362c2;border-color:#2362c2;color:#fff}
.module-order-btn:disabled{opacity:.35;cursor:not-allowed}
.module-drag-handle{width:14px;color:#8993a4;cursor:grab;font-size:14px;line-height:1;user-select:none}
.module-picker-row[draggable="true"]{cursor:grab}
.module-picker-row.dragging{opacity:.55;background:#e9f2ff}
.module-picker-row.drag-over{box-shadow:inset 0 2px 0 #2362c2;background:#eef4ff}
.module-picker-row.disabled .module-drag-handle{cursor:not-allowed;opacity:.45}


.more-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:center}
.more-action-grid .wk-btn{width:100%;justify-content:center}
.modal-help{font-size:12px;color:#6b778c;margin:8px 0 0;line-height:1.6}
.wk-reference-detail .detail-side-menu{width:118px;flex-basis:118px}
.wk-reference-detail .detail-side-menu-item{height:42px;font-size:12px}
.wk-reference-detail .detail-side-menu-item span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


/* Configurable SCRM table: column resize/sort/filter/reorder */
.cfg-table-tools{display:flex;gap:12px;align-items:center;justify-content:flex-end;padding:8px 10px;color:#6b7280;font-size:13px;border-bottom:1px solid #eef0f5;background:#fff}
.responsive-table{overflow:auto;position:relative}
.cfg-table{table-layout:fixed;border-collapse:separate;border-spacing:0;min-width:max-content;width:max-content}
.cfg-table th,.cfg-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.cfg-th{position:relative;background:#f7f9fc;user-select:none}
.cfg-th-inner{display:flex;align-items:center;gap:4px;height:34px;min-width:0}
.cfg-drag{color:#9aa3b2;cursor:grab;font-size:13px;line-height:1}
.cfg-th[draggable="true"]{cursor:grab}
.cfg-th .sort-th{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:nowrap;background:transparent;border:0;color:#374151;cursor:pointer;font-weight:600}
.cfg-th .sort-th:disabled{cursor:default;color:#6b7280}
.col-filter-btn{width:22px;height:22px;border:0;background:transparent;border-radius:4px;color:#8a94a6;cursor:pointer;flex:0 0 auto}
.col-filter-btn:hover,.col-filter-btn.active{background:#e8f0ff;color:#2362c2}
.col-resizer{position:absolute;top:0;right:-8px;width:16px;height:100%;cursor:col-resize;z-index:8;touch-action:none}
.col-resizer:before{content:"";position:absolute;top:7px;bottom:7px;left:7px;width:2px;border-radius:2px;background:transparent}
.col-resizer:hover,.is-col-resizing .col-resizer{background:rgba(35,98,194,.08)}
.col-resizer:hover:before,.is-col-resizing .col-resizer:before{background:#2362c2}
body.is-col-resizing{cursor:col-resize!important;user-select:none!important}
body.is-col-resizing *{cursor:col-resize!important;user-select:none!important}
.column-manager{max-height:62vh;overflow:auto;padding:2px 4px}
.wk-cell-sub{font-size:12px;color:#8a94a6;margin-top:3px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.focus-icon.sm{font-size:15px;border:0;background:transparent;color:#b8c0cc;cursor:pointer;padding:0}
.dict-filter-chip{height:24px;max-width:100%;padding:0 8px;border:1px solid #dfe1e6;border-radius:12px;background:#f7f9fc;color:#2362c2;font-size:12px;line-height:22px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.dict-filter-chip:hover{background:#e9f2ff;border-color:#2362c2;color:#0747a6}
.dict-filter-options{display:flex;flex-direction:column;gap:8px;margin-top:12px;max-height:360px;overflow:auto}
.dict-filter-option{height:36px;border:1px solid #dfe1e6;border-radius:4px;background:#fff;color:#172b4d;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:13px;cursor:pointer;text-align:left}
.dict-filter-option:hover{background:#f4f7fb;border-color:#2362c2;color:#2362c2}
.dict-filter-option.active{background:#e9f2ff;border-color:#2362c2;color:#2362c2;font-weight:600}
.dict-filter-option span{color:#8993a4;font-weight:500}
.clue-select-all-wrap{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#172b4d;cursor:pointer;white-space:nowrap}
.clue-select-all-wrap input,.clue-row-check{width:14px;height:14px;cursor:pointer}
.filter-panel{background:#fff;border:1px solid #ebedf0;border-radius:3px;margin:12px 14px;padding:12px 16px;box-shadow:0 1px 2px rgba(23,43,77,.04)}
.scrm-search-row{position:relative;display:flex;align-items:center;gap:8px;min-height:34px;flex-wrap:nowrap}
.scrm-search-box{width:260px;height:34px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;display:flex;align-items:center;overflow:hidden}
.scrm-search-box input{flex:1;border:0;outline:0;padding:0 10px;height:32px;color:#172b4d;background:transparent}
.icon-search{position:relative;width:36px;height:32px;border:0;border-left:1px solid #f0f1f4;background:#fff;color:#5e6c84}
.icon-search:before{content:"";position:absolute;left:10px;top:8px;width:11px;height:11px;border:2px solid #6b778c;border-radius:50%}
.icon-search:after{content:"";position:absolute;left:22px;top:21px;width:8px;height:2px;background:#6b778c;transform:rotate(45deg);transform-origin:left center}
.display-label{margin-left:10px;color:#6b778c;font-size:13px}
.scene-btn{height:30px;border:0;background:transparent;color:#172b4d;border-radius:3px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;gap:4px;font-size:13px}
.scene-btn:hover,.scene-btn.active{background:#eaf2ff;color:#0052cc}
.scene-btn.more{width:26px;padding:0;font-size:0;line-height:1}
.scene-btn.more:before{content:"";border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #6b778c}
.scene-btn.more:hover:before{border-top-color:#0052cc}
.scene-more-wrap{position:relative;display:inline-flex}
.scene-menu{position:absolute;top:34px;left:0;width:178px;background:#fff;border:1px solid #dfe1e6;border-radius:3px;box-shadow:0 8px 24px rgba(9,30,66,.18);padding:6px 0;z-index:1200}
.scene-menu:before{content:"";position:absolute;top:-6px;left:12px;width:10px;height:10px;background:#fff;border-left:1px solid #dfe1e6;border-top:1px solid #dfe1e6;transform:rotate(45deg)}
.scene-menu-item{position:relative;z-index:1;width:100%;height:32px;border:0;background:#fff;text-align:left;padding:0 14px;color:#172b4d;font-size:13px}
.scene-menu-item:hover,.scene-menu-item.active{background:#f4f5f7;color:#0052cc}
.scene-setting{border-top:1px solid #ebedf0;margin-top:5px;color:#0052cc}
.scene-menu-empty{padding:8px 14px;color:#97a0af;font-size:12px;border-top:1px solid #ebedf0}
.query-right-actions{margin-left:auto;display:flex;align-items:center;gap:14px;height:30px}
.advanced-btn{height:30px;border:0;background:transparent;color:#172b4d;padding:0 4px;border-radius:3px;font-size:13px;display:inline-flex;align-items:center;gap:5px}
.advanced-btn:hover,.advanced-btn.active{background:#eaf2ff}
.filter-icon{position:relative;width:13px;height:13px;display:inline-block}
.filter-icon:before{content:"";position:absolute;left:1px;top:1px;width:11px;height:11px;border:1.8px solid #6b778c;border-radius:2px;clip-path:polygon(0 0,100% 0,62% 48%,62% 100%,38% 100%,38% 48%)}
.advanced-btn:hover .filter-icon:before,.advanced-btn.active .filter-icon:before{border-color:#0052cc}
.advanced-fields{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #ebedf0}
.advanced-fields input,.advanced-fields select{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;padding:0 9px;color:#172b4d;outline:0}
.advanced-fields input:focus,.advanced-fields select:focus{border-color:#0052cc;box-shadow:0 0 0 2px rgba(0,82,204,.12)}
.scene-setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.range-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.quick-range-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

/* SCRM dashboard: systemconfig is not here; entry is top-right second icon */
.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;padding:16px;border-bottom:1px solid #ebecf0;background:#fafbfc}.dashboard-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;padding:18px}.dashboard-card span{display:block;color:#8993a4;font-size:12px;margin-bottom:10px}.dashboard-card b{display:block;color:#172b4d;font-size:24px;line-height:30px}.dashboard-card p{margin:10px 0 0;color:#6b778c;line-height:20px}.dashboard-note{margin:16px}
#systemConfigBtn{font-size:18px}#systemConfigBtn:hover,#systemConfigBtn.active{background:#e9f2ff;color:#0052cc}
body.admin-mode #systemConfigBtn{background:#e9f2ff;color:#0052cc}
@media (max-width:1000px){.dashboard-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:560px){.dashboard-grid{grid-template-columns:1fr}}

/* systemconfig dedicated pages */
.sysconfig-board{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;padding:16px;background:#fafbfc}.sysconfig-main,.sysconfig-side{min-width:0}.sys-section-title{height:46px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.sys-section-title h3{margin:0;color:#172b4d;font-size:16px}.sys-form-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px;margin-bottom:18px}.sys-form-grid label,.security-grid>div,.sys-kv-list>div{border:1px solid #ebecf0;border-radius:4px;background:#fff;padding:14px}.sys-form-grid .span2{grid-column:span 2}.sys-form-grid span,.security-grid span,.sys-kv-list span{display:block;color:#8993a4;font-size:12px;margin-bottom:8px}.sys-form-grid b,.security-grid b,.sys-kv-list b{display:block;color:#172b4d;font-size:14px;line-height:22px;word-break:break-all}.sys-kv-list{display:grid;gap:10px;margin-bottom:18px}.sys-logo-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;padding:16px;margin-bottom:12px}.sys-logo-card b{display:block;color:#172b4d;margin-bottom:8px}.sys-logo-card span{display:block;color:#6b778c;line-height:22px}.sys-logo-card .wk-btn{margin-top:12px}.sys-logo-preview{width:72px;height:72px;border-radius:10px;background:#0052cc;color:#fff;display:grid;place-items:center;font-weight:800;font-size:24px;margin-bottom:12px}.security-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-bottom:18px}.ip-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.ip-list em{font-style:normal;background:#e9f2ff;color:#0052cc;border-radius:12px;padding:3px 9px;font-size:12px}.switch-pill{display:inline-block;border-radius:12px;background:#f4f5f7;color:#6b778c;padding:3px 10px;font-size:12px}.switch-pill.on{background:#e3fcef;color:#00875a}.sys-table{padding:16px;background:#fff}.approval-flow-board,.business-param-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:14px;padding:16px;background:#fafbfc}.approval-card,.param-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;padding:16px}.approval-object{color:#6b778c;margin:10px 0;line-height:22px}.approval-nodes{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 16px}.approval-nodes span{background:#e9f2ff;color:#0052cc;border-radius:16px;padding:6px 12px}.approval-nodes b{color:#8993a4}.param-row{display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;border-top:1px solid #f4f5f7;padding:10px 0}.param-row span{color:#8993a4}.param-row b{color:#172b4d;word-break:break-all}.structured-config-form{grid-template-columns:1fr 1fr}.structured-config-form .modal-checks{grid-column:span 2}
.quick-actions-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;margin-top:4px}.quick-action-card{border:1px solid #ebecf0;border-radius:4px;padding:14px;background:#fff}.quick-action-card h4{margin:0 0 6px;color:#172b4d}.quick-action-card p{margin:0 0 12px;color:#5e6c84;font-size:12px}.quick-action-card .wk-btn{width:100%;justify-content:center}
@media (max-width:1000px){.sysconfig-board{grid-template-columns:1fr}.security-grid{grid-template-columns:repeat(2,1fr)}.approval-flow-board,.business-param-grid{grid-template-columns:1fr}.quick-actions-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:620px){.sys-form-grid,.security-grid,.structured-config-form{grid-template-columns:1fr}.sys-form-grid .span2,.structured-config-form .modal-checks{grid-column:span 1}.quick-actions-grid{grid-template-columns:1fr}}


/* accelerated systemconfig parity: org/role/crmconfig/logs */
.admin-toolbar-line{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid #ebecf0;background:#fff}.admin-filter-chips,.admin-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.admin-filter-chips button{height:30px;border:1px solid #dfe1e6;border-radius:15px;background:#fff;color:#42526e;padding:0 12px}.admin-filter-chips button.active{background:#e9f2ff;border-color:#4c9aff;color:#0052cc}.admin-search{height:32px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;padding:0 10px;color:#172b4d}.admin-data-table{background:#fff;overflow:auto}.admin-data-table table{min-width:920px}.org-admin-layout,.role-admin-layout,.crm-config-layout{display:grid;grid-template-columns:240px minmax(0,1fr);background:#fafbfc;min-height:460px}.org-tree-panel,.role-list-panel,.config-nav-panel{border-right:1px solid #ebecf0;background:#fff;padding:12px}.org-table-panel,.role-permission-panel,.config-main-panel{min-width:0;background:#fff}.dept-tree-list{display:grid;gap:6px}.dept-tree-item,.role-item,.config-nav-panel button{width:100%;border:0;background:#fff;text-align:left;border-radius:3px;padding:10px 12px;color:#42526e}.dept-tree-item:hover,.role-item:hover,.config-nav-panel button:hover{background:#f4f5f7}.dept-tree-item.active,.role-item.active,.config-nav-panel button.active{background:#e9f2ff;color:#0052cc}.dept-tree-item b,.role-item b{display:block;margin-bottom:4px}.dept-tree-item span,.role-item span{font-size:12px;color:#8993a4}.role-list-panel{display:flex;flex-direction:column;gap:6px}.permission-matrix{padding:14px 16px;overflow:auto}.permission-matrix table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #ebecf0}.permission-matrix th,.permission-matrix td{height:38px;border-bottom:1px solid #ebecf0;padding:0 10px;text-align:center}.permission-matrix th:first-child,.permission-matrix td:first-child{text-align:left}.logs-admin-panel{background:#fff}.config-nav-panel{display:flex;flex-direction:column;gap:6px}.tag-pill{display:inline-block;background:#f4f5f7;border-radius:12px;color:#42526e;padding:3px 9px;font-size:12px}@media(max-width:900px){.org-admin-layout,.role-admin-layout,.crm-config-layout{grid-template-columns:1fr}.org-tree-panel,.role-list-panel,.config-nav-panel{border-right:0;border-bottom:1px solid #ebecf0}.admin-toolbar-line{align-items:flex-start;flex-direction:column}.admin-toolbar-actions{width:100%}.admin-search{max-width:100%;flex:1}.permission-matrix table,.admin-data-table table{min-width:760px}}


.crm-rules-board{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:14px;background:#fafbfc;padding:16px}.rule-card{border:1px solid #ebecf0;border-radius:4px;background:#fff;padding:16px}.rule-preview{border:1px dashed #4c9aff;background:#e9f2ff;border-radius:4px;padding:12px;margin-bottom:12px}.rule-preview b{display:block;color:#0052cc;font-size:16px;margin-bottom:6px}.rule-preview span{color:#42526e;font-size:12px}.security-grid.compact{grid-template-columns:repeat(2,minmax(110px,1fr));margin-bottom:0}.log-subtitle{padding:8px 16px;border-bottom:1px solid #ebecf0;background:#fafbfc;color:#6b778c;font-size:13px}.nav-item.is-hidden,.admin-tab.is-hidden{display:none!important}@media(max-width:900px){.crm-rules-board{grid-template-columns:1fr}}


.permission-matrix input[type=checkbox]{width:16px;height:16px;accent-color:#0052cc}.permission-matrix select{height:28px;border:1px solid #dfe1e6;border-radius:3px;background:#fff;color:#172b4d}.role-permission-panel .admin-toolbar-actions .wk-btn-primary{background:#0052cc;color:#fff}


/* screenshot-aligned systemconfig > customer management */
.crm-manage-ref-layout{display:grid;grid-template-columns:186px minmax(0,1fr);min-height:560px;background:#f5f7fa;border-top:1px solid #ebecf0}
.crm-manage-ref-side{background:#fff;border-right:1px solid #e5e8ef;padding:0 0 14px;overflow:auto}
.crm-manage-ref-title{height:48px;display:flex;align-items:center;padding:0 18px;font-size:15px;font-weight:600;color:#172b4d;border-bottom:1px solid #edf0f5;background:#fff}
.crm-ref-menu{width:100%;height:42px;border:0;background:#fff;color:#42526e;display:flex;align-items:center;gap:10px;padding:0 18px;text-align:left;font-size:14px;cursor:pointer;border-left:3px solid transparent}
.crm-ref-menu:hover{background:#f7f9fc;color:#0052cc}.crm-ref-menu.active{background:#eef4ff;color:#0052cc;border-left-color:#0052cc;font-weight:600}.crm-ref-icon{width:15px;color:#97a0af;font-size:12px}
.crm-manage-ref-main{background:#fff;min-width:0;overflow:hidden}.crm-ref-header{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #ebecf0;background:#fff}.crm-ref-header h3{margin:0;font-size:16px;color:#172b4d}.crm-ref-header p{margin:4px 0 0;color:#8993a4;font-size:12px}.crm-ref-actions{display:flex;align-items:center;gap:8px}
.crm-ref-subtabs{height:44px;display:flex;align-items:center;gap:18px;padding:0 18px;border-bottom:1px solid #ebecf0;background:#fff}.crm-ref-subtabs button{height:44px;border:0;border-bottom:2px solid transparent;background:transparent;color:#42526e;padding:0 2px;cursor:pointer}.crm-ref-subtabs button.active,.crm-ref-subtabs button:hover{border-bottom-color:#0052cc;color:#0052cc;font-weight:600}
.crm-ref-table-wrap{height:calc(100vh - 310px);min-height:420px;overflow:auto;background:#fff}.crm-ref-table{width:max-content;min-width:1180px;border-collapse:separate;border-spacing:0;table-layout:fixed}.crm-ref-table th{position:sticky;top:0;z-index:2;height:42px;background:#f7f9fc;color:#5e6c84;font-size:13px;font-weight:600;text-align:left;border-bottom:1px solid #e5e8ef;padding:0 12px;white-space:nowrap}.crm-ref-table td{height:48px;border-bottom:1px solid #f0f2f5;color:#172b4d;font-size:13px;padding:0 12px;white-space:nowrap;vertical-align:middle}.crm-ref-table tr:hover td{background:#fafcff}.crm-ref-table .chk{width:42px;text-align:center;padding:0 8px}.crm-field-name{font-weight:600;color:#172b4d}.crm-ref-switch{width:34px;height:18px;border:0;border-radius:999px;background:#dfe1e6;padding:2px;cursor:pointer;vertical-align:middle;transition:.15s}.crm-ref-switch span{display:block;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.18);transition:.15s}.crm-ref-switch.on{background:#2362c2}.crm-ref-switch.on span{transform:translateX(16px)}
@media(max-width:900px){.crm-manage-ref-layout{grid-template-columns:1fr}.crm-manage-ref-side{display:flex;border-right:0;border-bottom:1px solid #e5e8ef;overflow-x:auto}.crm-manage-ref-title{display:none}.crm-ref-menu{width:auto;min-width:112px;border-left:0;border-bottom:3px solid transparent}.crm-ref-menu.active{border-left:0;border-bottom-color:#0052cc}.crm-ref-header{height:auto;align-items:flex-start;gap:12px;flex-direction:column;padding:12px 14px}.crm-ref-subtabs{overflow-x:auto}}


/* field definition draggable manager, matching SCRM column-definition dialog */
.column-manager.wide{max-height:68vh;min-width:760px}.field-def-dialog{display:grid;gap:0;border:1px solid #ebecf0;border-radius:4px;overflow:hidden;background:#fff}.field-def-head,.field-def-row{display:grid;grid-template-columns:58px minmax(180px,1.3fr) minmax(160px,1fr) 90px 92px;align-items:center}.field-def-head{height:38px;background:#f7f9fc;color:#5e6c84;font-size:12px;font-weight:600;border-top:1px solid #ebecf0;border-bottom:1px solid #ebecf0}.field-def-head span{padding:0 12px}.field-def-row{min-height:42px;border-bottom:1px solid #f0f2f5;color:#172b4d}.field-def-row:hover{background:#fafcff}.field-def-row.disabled{color:#97a0af;background:#fafbfc}.field-def-row>label,.field-def-row>div,.field-def-row>code,.field-def-row>input{margin:0 12px}.field-def-check{display:flex;align-items:center;justify-content:center}.field-def-name{display:flex;align-items:center;gap:8px;min-width:0}.field-def-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.field-def-row code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#6b778c;background:#f4f5f7;border-radius:3px;padding:3px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.field-width-input{height:28px;border:1px solid #dfe1e6;border-radius:3px;padding:0 6px;color:#172b4d}.field-def-row .module-order-actions{justify-content:flex-start;margin-left:12px}.field-def-row[draggable="true"]{cursor:grab}.field-def-row input[type=checkbox]{accent-color:#0052cc}.module-picker-foot .wk-btn.primary{background:#f4f5f7;color:#172b4d;border:1px solid #dfe1e6}
@media(max-width:820px){.column-manager.wide{min-width:0}.field-def-head,.field-def-row{grid-template-columns:48px 1fr 100px 74px 76px}.field-def-row code{display:none}.field-def-head span:nth-child(3){display:none}}

/* 系统管理侧边栏 · 可折叠分组 (2026-07-02) */
.admin-menu-group{border-bottom:1px solid #f4f5f7}
.admin-menu-group .admin-group-label{width:100%;display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;border:0;background:#fafbfc;color:#42526e;font-size:13px;font-weight:600;cursor:pointer;text-align:left}
.admin-menu-group .admin-group-label:hover{background:#f0f2f5;color:#172b4d}
.admin-group-caret{display:inline-block;transition:transform .18s;width:12px;color:#8993a4;font-size:10px}
.admin-menu-group:not(.is-collapsed) .admin-group-caret{transform:rotate(90deg);color:#0052cc}
.admin-group-body{max-height:800px;overflow:hidden;transition:max-height .22s ease}
.admin-menu-group.is-collapsed .admin-group-body{max-height:0}
.admin-menu-group .admin-menu{padding-left:38px}

/* ============================================================
   【业务模块】三栏布局：左模块 / 中列表 / 右字段
   ============================================================ */
.biz-3col-layout {
  display: grid;
  grid-template-columns: 240px 300px 1fr;
  gap: 12px;
  height: calc(100vh - 220px);
  min-height: 500px;
}
.biz-col {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.biz-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  font-weight: 600;
  color: #1f2b3a;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.biz-col-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.biz-col-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
}
.biz-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  transition: background .15s;
  border: 1px solid transparent;
  font-size: 13px;
}
.biz-item:hover { background: #f0f6ff; }
.biz-item.active {
  background: #e7f0ff;
  border-color: #2f7cff;
  color: #1560d5;
  font-weight: 600;
}
.biz-item-icon { font-size: 16px; flex-shrink: 0; }
.biz-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-item-count {
  background: #e6ebf2;
  color: #6b7280;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
}
.biz-item.active .biz-item-count { background: #2f7cff; color: #fff; }
.biz-item-tag {
  font-size: 10px;
  color: #6b7280;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 3px;
}
.biz-item-tag.custom { background: #fef3c7; color: #92400e; }
.biz-item-actions {
  display: none;
  gap: 3px;
}
.biz-item:hover .biz-item-actions { display: flex; }
.mini-btn.primary { background: #2f7cff; color: #fff; border-color: #2f7cff; }
.mini-btn.primary:hover { background: #1560d5; }
.mini-btn.danger { color: #dc2626; }
.mini-btn.danger:hover { background: #fee2e2; }

/* 通用 modal 补丁 */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.modal-panel {
  background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25);
  max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column;
}
.modal-head { padding: 14px 18px; border-bottom: 1px solid #eef2f7; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid #eef2f7; display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 4px; font-size: 13px; color: #374151; }
.form-grid input, .form-grid select {
  padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px;
}
.form-grid input:disabled { background: #f3f4f6; color: #9ca3af; }
