:root{
  --navy:#1f4e79;
  --navy-2:#16395a;
  --blue:#2f6fa8;
  --blue-soft:#eaf1f9;
  --green:#12805c;
  --green-soft:#e8f4ef;
  --red:#c0392b;
  --red-soft:#fbeeec;
  --orange:#b7791f;
  --orange-soft:#fdf3e4;
  --line:#e6ebf2;
  --line-2:#eef1f6;
  --bg:#f4f6fa;
  --text:#1f2937;
  --text-2:#4b5563;
  --muted:#6b7280;
  --radius:10px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 4px 12px rgba(16,24,40,.05);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}
a{color:var(--blue);text-decoration:none}
button{font-family:inherit}
input,select,textarea{font-family:inherit;font-size:13px;color:var(--text);background:#fff;border:1px solid var(--line);border-radius:6px;padding:7px 9px;outline:none;transition:border-color .15s,box-shadow .15s}
input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(47,111,168,.12)}
input:disabled,select:disabled,textarea:disabled{background:#f6f7f9;color:var(--muted)}
textarea{resize:vertical;min-height:60px;line-height:1.7}
select{cursor:pointer}

/* 登录 */
.login-view{min-height:100vh;display:flex}
.login-side{width:46%;max-width:620px;background:linear-gradient(160deg,#16395a 0%,#1f4e79 55%,#2a6390 100%);color:#fff;padding:48px 52px;display:flex;flex-direction:column;position:relative;overflow:hidden}
.login-side:after{content:"";position:absolute;right:-120px;bottom:-140px;width:420px;height:420px;border-radius:50%;background:rgba(255,255,255,.06)}
.login-brand{display:flex;gap:12px;align-items:center;position:relative;z-index:1}
.logo-mark{width:46px;height:46px;border-radius:10px;background:linear-gradient(135deg,#d4a94a,#b7791f);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:#fff;flex:none}
.logo-mark.sm{width:34px;height:34px;border-radius:8px;font-size:17px}
.login-brand-name{font-size:18px;font-weight:600;letter-spacing:.5px}
.login-brand-sub{font-size:12px;color:rgba(255,255,255,.65);margin-top:2px}
.login-points{margin-top:auto;position:relative;z-index:1}
.login-points h1{font-size:34px;line-height:1.35;font-weight:600;margin:0 0 16px;letter-spacing:1px}
.login-points p{font-size:13px;line-height:2;color:rgba(255,255,255,.72);max-width:430px}
.login-feats{display:flex;gap:36px;margin-top:34px}
.lf{display:flex;flex-direction:column}
.lf b{font-size:24px;font-weight:600;color:#e8c56a}
.lf span{font-size:12px;color:rgba(255,255,255,.62);margin-top:4px}
.login-foot{margin-top:auto;padding-top:36px;font-size:11px;color:rgba(255,255,255,.4);position:relative;z-index:1}
.login-main{flex:1;display:flex;align-items:center;justify-content:center;padding:32px;background:#fff}
.login-box{width:392px;max-width:100%}
.login-box h2{margin:0;font-size:24px;font-weight:600;color:var(--navy)}
.login-tip{margin:8px 0 26px;font-size:12px;color:var(--muted)}
.login-field{margin-bottom:16px}
.login-field label{display:block;font-size:12px;color:var(--text-2);margin-bottom:6px}
.login-field input{width:100%;height:42px;background:#f8fafc}
.login-row{display:flex;justify-content:space-between;align-items:center;margin:4px 0 14px;font-size:12px;color:var(--muted)}
.chk{display:flex;gap:6px;align-items:center;cursor:pointer}
.link-muted{color:#9aa3ae}
.login-error{color:var(--red);font-size:12px;min-height:18px;margin-bottom:6px}
.btn-block{width:100%;height:42px;font-size:15px;letter-spacing:2px}
.btn-wecom{background:#fff;border:1px solid #d5dbe4;color:#1f2937;display:flex;align-items:center;justify-content:center;gap:8px}
.btn-wecom:hover{background:#f7f9fb}
.wecom-logo{width:20px;height:20px;border-radius:5px;background:#12805c;color:#fff;font-size:11px;display:inline-flex;align-items:center;justify-content:center}
.login-divider{display:flex;align-items:center;gap:10px;color:#c2c9d3;font-size:11px;margin:18px 0}
.login-divider:before,.login-divider:after{content:"";height:1px;flex:1;background:#e9edf3}
.login-demo{margin-top:26px;border-top:1px dashed #e6ebf2;padding-top:14px}
.demo-title{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;cursor:pointer}
.demo-title span{color:var(--blue)}
.demo-list{margin-top:10px;max-height:0;overflow:hidden;transition:max-height .25s}
.demo-list.open{max-height:400px}
.demo-item{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;cursor:pointer;font-size:12px}
.demo-item:hover{background:#f5f8fc}
.demo-item b{width:52px;font-weight:600;color:var(--text)}
.demo-item span{color:var(--muted);width:48px}
.demo-item em{font-style:normal;color:var(--blue);margin-left:auto;font-size:11px}
.demo-hint{font-size:11px;color:#9aa3ae;margin-top:6px;line-height:1.7}

/* 布局 */
.app-view{height:100vh;display:flex;overflow:hidden}
.sidebar{width:228px;flex:none;background:linear-gradient(180deg,#1b4569 0%,#16395a 100%);color:#cfd9e4;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin}
.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:2px}
.sb-brand{display:flex;gap:10px;align-items:center;padding:18px 18px 16px;border-bottom:1px solid rgba(255,255,255,.08);flex:none}
.sb-name{font-size:15px;color:#fff;font-weight:600;letter-spacing:.5px}
.sb-sub{font-size:11px;color:rgba(255,255,255,.5);margin-top:2px}
.sb-nav{padding:10px 10px 20px;flex:1}
.nav-group{margin-bottom:8px}
.nav-group-title{font-size:11px;color:rgba(255,255,255,.38);padding:10px 10px 6px;letter-spacing:1px}
.nav-item{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:7px;color:#cfd9e4;font-size:13px;margin-bottom:1px;transition:background .15s,color .15s}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}
.nav-item.active{background:rgba(212,169,74,.16);color:#f0d28a;box-shadow:inset 2px 0 0 #d4a94a}
.nav-item .ni{width:16px;text-align:center;font-size:13px;opacity:.85}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:56px;flex:none;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 20px;gap:14px;position:relative;z-index:20}
.topbar-toggle{display:none;background:none;border:none;font-size:18px;color:var(--text-2);cursor:pointer;padding:4px 6px}
.topbar-title{font-size:15px;font-weight:600;color:var(--text)}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:18px}
.icon-btn{position:relative;font-size:12px;color:var(--text-2);display:flex;align-items:center;gap:3px}
.icon-btn:hover{color:var(--blue)}
.badge{min-width:16px;height:16px;border-radius:9px;background:var(--red);color:#fff;font-size:10px;line-height:16px;text-align:center;padding:0 4px}
.user-chip{display:flex;align-items:center;gap:8px;cursor:pointer;position:relative;padding:4px 6px;border-radius:8px}
.user-chip:hover{background:#f6f8fb}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--blue-soft);color:var(--navy);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;user-select:none}
.u-name{font-size:13px;font-weight:600;line-height:1.3}
.u-role{font-size:11px;color:var(--muted);line-height:1.3}
.u-menu{position:absolute;right:0;top:44px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);min-width:132px;padding:6px;display:none;z-index:50}
.u-menu.open{display:block}
.u-menu a{display:block;padding:8px 10px;border-radius:6px;color:var(--text-2);font-size:13px}
.u-menu a:hover{background:#f5f8fc;color:var(--blue)}
.content{flex:1;overflow-y:auto;padding:16px 20px 22px;min-width:0}
.content::-webkit-scrollbar{width:8px;height:8px}
.content::-webkit-scrollbar-thumb{background:#cfd6e0;border-radius:4px}
.content.mobile-content{background:#eef2f7;padding:0}
.m-tabbar{display:none;height:56px;flex:none;background:#fff;border-top:1px solid var(--line);align-items:center;justify-content:space-around;z-index:30}
.m-tabbar a{flex:1;text-align:center;font-size:11px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:2px;position:relative}
.m-tabbar a.active{color:var(--blue)}
.m-tabbar .ti{font-size:16px;line-height:1.1}
.m-tabbar .badge{position:absolute;top:-2px;right:50%;margin-right:-22px}

/* 通用 */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.page-head h2{margin:0;font-size:19px;font-weight:600;color:var(--navy)}
.page-head .desc{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.7}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow);margin-bottom:14px}
.card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.card-title h3{margin:0;font-size:14px;font-weight:600;color:var(--text)}
.card-title .sub{font-size:11px;color:var(--muted)}
.card-title a{font-size:12px}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:1fr 1fr}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.dash-body{display:flex;flex-direction:column}
.grow{flex:1;display:flex;flex-direction:column;min-height:0}
.empty{text-align:center;color:#9aa3ae;font-size:13px;padding:32px 0}
.loading{text-align:center;color:#9aa3ae;font-size:13px;padding:60px 0}
.tag{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11px;line-height:18px;white-space:nowrap}
.tag-green{background:var(--green-soft);color:var(--green)}
.tag-red{background:var(--red-soft);color:var(--red)}
.tag-orange{background:var(--orange-soft);color:var(--orange)}
.tag-blue{background:var(--blue-soft);color:var(--navy)}
.tag-gray{background:#f1f3f6;color:#6b7280}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:32px;padding:0 13px;border-radius:6px;border:1px solid var(--line);background:#fff;color:var(--text-2);font-size:13px;cursor:pointer;transition:all .15s;white-space:nowrap}
.btn:hover{border-color:#c9d3df;background:#f7f9fc}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn-primary:hover{background:#18415f;border-color:#18415f}
.btn-ghost{background:#fff;border-color:var(--line);color:var(--text-2)}
.btn-danger{background:#fff;border-color:#e8c4bf;color:var(--red)}
.btn-danger:hover{background:#fdf3f2}
.btn-sm{height:27px;padding:0 9px;font-size:12px;border-radius:5px}
.ops{display:flex;gap:4px;flex-wrap:wrap}

/* KPI */
.kpi-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--blue)}
.kpi-card .label{font-size:12px;color:var(--muted)}
.kpi-card .value{font-size:26px;font-weight:600;color:var(--navy);margin-top:6px;line-height:1.2}
.kpi-card .value small{font-size:12px;font-weight:400;color:var(--muted);margin-left:3px}
.kpi-card .foot{font-size:11px;color:#9aa3ae;margin-top:6px}
.chart{width:100%;height:250px}
.mini-list{display:flex;flex-direction:column}
.mini-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line-2);font-size:13px}
.mini-row:last-child{border-bottom:none}
.mini-row .m-sub{font-size:11px;color:var(--muted);margin-top:3px}
.podium{display:flex;justify-content:center;align-items:flex-end;gap:14px;padding:8px 0 4px;min-height:170px}
.p-item{flex:1;text-align:center;max-width:150px}
.p-item .bar{border-radius:8px 8px 0 0;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px}
.p-item .bar.b1{height:120px;background:linear-gradient(160deg,#d4a94a,#b7791f)}
.p-item .bar.b2{height:96px;background:linear-gradient(160deg,#9fb3c8,#6b829c)}
.p-item .bar.b3{height:78px;background:linear-gradient(160deg,#c9926b,#a2663f)}
.p-name{font-weight:600;margin-top:8px;font-size:13px}
.p-dept{font-size:11px;color:var(--muted);margin-top:2px}
.gift-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.gift-card{border:1px solid var(--line);border-radius:8px;padding:14px;background:linear-gradient(180deg,#fff,#fafcff)}
.g-name{font-weight:600;font-size:14px;min-height:38px;line-height:1.5}
.g-cost{font-size:22px;color:#b7791f;font-weight:600;margin:6px 0 2px}
.g-cost span{font-size:12px;color:var(--muted);font-weight:400}
.g-stock{font-size:11px;color:var(--muted);margin:4px 0 10px}
.g-ops .btn{width:100%}

/* 统一列表页 */
.list-page{display:flex;flex-direction:column;height:calc(100vh - 108px);min-height:360px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.filter-bar{flex:none;display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line);background:#fff;flex-wrap:wrap;position:relative;z-index:3}
.f-item{display:flex;align-items:center;gap:6px}
.f-item label{font-size:12px;color:var(--muted);white-space:nowrap}
.f-item input,.f-item select{height:30px;padding:0 8px;min-width:112px}
.f-item input[type=month],.f-item input[type=date]{min-width:126px}
.spacer{flex:1}
.toolbar{display:flex;gap:6px;align-items:center}
.table-scroll{flex:1;overflow:auto;position:relative;scrollbar-width:thin}
.table-scroll::-webkit-scrollbar{width:9px;height:9px}
.table-scroll::-webkit-scrollbar-thumb{background:#c7cfda;border-radius:4px;border:2px solid #fff}
.table-scroll::-webkit-scrollbar-track{background:#f4f6fa}
table.dt{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
table.dt thead th{position:sticky;top:0;z-index:2;background:#f3f6fa;color:var(--text-2);font-weight:600;font-size:12px;text-align:left;padding:9px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
table.dt thead th.num{text-align:right}
table.dt td{padding:9px 10px;border-bottom:1px solid var(--line-2);color:var(--text);vertical-align:middle}
table.dt td.num{text-align:right;font-variant-numeric:tabular-nums}
table.dt tbody tr:hover{background:#f8fafd}
.pager{flex:none;display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid var(--line);background:#fff;font-size:12px;color:var(--muted);flex-wrap:wrap;row-gap:6px}
.pager .left{display:flex;align-items:center;gap:6px}
.pager select{height:26px;padding:0 4px}
.pager .pages{margin-left:auto;display:flex;gap:3px;flex-wrap:wrap}
.pager .pg{min-width:26px;height:26px;border:1px solid var(--line);background:#fff;border-radius:5px;color:var(--text-2);cursor:pointer;font-size:12px;padding:0 6px}
.pager .pg:hover:not(:disabled){border-color:var(--blue);color:var(--blue)}
.pager .pg.active{background:var(--navy);border-color:var(--navy);color:#fff}
.pager .pg:disabled{opacity:.4;cursor:not-allowed}
.pager-jump{display:flex;align-items:center;gap:5px}
.pager-jump input{width:42px;height:26px;padding:0 4px;text-align:center}

/* 表单/弹窗 */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-item{display:flex;flex-direction:column;gap:5px;min-width:0}
.form-item.full{grid-column:1/-1}
.form-item label{font-size:12px;color:var(--text-2)}
.form-item .req{color:var(--red);margin-left:2px}
.form-item input,.form-item select,.form-item textarea{width:100%}
.form-item select[multiple]{height:auto;padding:4px}
.hint{font-size:11px;color:#9aa3ae;line-height:1.6}
.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.section-title{font-size:13px;font-weight:600;color:var(--text);margin:16px 0 8px;padding-left:8px;border-left:3px solid var(--blue)}
.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 16px}
.d-label{font-size:11px;color:var(--muted);margin-bottom:3px}
.d-val{font-size:13px;line-height:1.6;word-break:break-all}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{padding:8px 0 8px 14px;border-left:2px solid var(--line);position:relative;font-size:13px}
.timeline li:before{content:"";position:absolute;left:-5px;top:13px;width:8px;height:8px;border-radius:50%;background:var(--blue)}
.timeline .t-time{font-size:11px;color:var(--muted);margin-top:3px}
.modal-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:1000;padding:18px}
.modal{background:#fff;border-radius:12px;width:480px;max-width:100%;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(15,23,42,.25)}
.modal.wide{width:820px}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line)}
.modal-head h3{margin:0;font-size:15px;font-weight:600;color:var(--navy)}
.modal-close{background:none;border:none;font-size:22px;line-height:1;color:#9aa3ae;cursor:pointer}
.modal-close:hover{color:var(--text)}
.modal-body{padding:16px 18px;overflow-y:auto}
.modal-foot{padding:12px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}
#toast-root{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:2000;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{background:#1f2937;color:#fff;font-size:13px;padding:9px 18px;border-radius:8px;box-shadow:0 8px 24px rgba(15,23,42,.2);animation:toastIn .2s}
.toast.success{background:#12805c}
.toast.error{background:#c0392b}
@keyframes toastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.tabs{display:flex;gap:4px;background:#eef2f7;padding:3px;border-radius:8px}
.tabs button{border:none;background:none;padding:6px 14px;border-radius:6px;font-size:12px;color:var(--text-2);cursor:pointer}
.tabs button.active{background:#fff;color:var(--navy);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.06)}
.notice-body{line-height:1.9;font-size:13px;color:var(--text-2)}
.perm-list{display:flex;flex-direction:column}
.perm-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px dashed var(--line-2);font-size:13px}

/* 消息 */
.msg-list{display:flex;flex-direction:column}
.msg-row{display:flex;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line-2);cursor:pointer;align-items:flex-start}
.msg-row:hover{background:#f8fafd}
.msg-row.unread{background:#f3f8ff}
.msg-dot{width:7px;height:7px;border-radius:50%;background:#cfd6e0;margin-top:7px;flex:none}
.msg-row.unread .msg-dot{background:var(--blue)}
.msg-title{font-size:13px;font-weight:600}
.msg-body{font-size:12px;color:var(--text-2);margin-top:4px;line-height:1.7}
.msg-time{font-size:11px;color:#9aa3ae;margin-top:5px}

/* 移动端 */
.mobile-content{display:flex;flex-direction:column}
.m-page{max-width:580px;width:100%;margin:0 auto;padding:12px;display:flex;flex-direction:column;gap:12px}
.m-hero{background:linear-gradient(150deg,#1f4e79,#2a6390);color:#fff;border-radius:14px;padding:18px}
.m-hero-top{display:flex;justify-content:space-between;align-items:center}
.m-hello{font-size:17px;font-weight:600}
.m-sub{font-size:11px;color:rgba(255,255,255,.68);margin-top:4px;line-height:1.6}
.m-avatar{width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:600;flex:none}
.m-avatar.lg{width:52px;height:52px;font-size:20px}
.m-score{display:flex;align-items:center;gap:12px;margin-top:16px;background:rgba(255,255,255,.1);border-radius:10px;padding:12px}
.m-score>div{flex:1;text-align:center}
.m-lab{font-size:11px;color:rgba(255,255,255,.62)}
.m-val{font-size:22px;font-weight:600;margin-top:2px}
.m-div{width:1px;height:26px;background:rgba(255,255,255,.18);flex:none!important}
.m-quick{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-radius:12px;padding:14px 6px;box-shadow:var(--shadow)}
.m-quick a{text-align:center;font-size:11px;color:var(--text-2);display:flex;flex-direction:column;gap:6px;align-items:center;position:relative}
.m-quick span{width:36px;height:36px;border-radius:10px;background:var(--blue-soft);color:var(--navy);display:flex;align-items:center;justify-content:center;font-size:16px}
.m-badge{position:absolute;top:-4px;right:12%;background:var(--red);color:#fff;font-size:9px;min-width:14px;height:14px;line-height:14px;border-radius:7px;padding:0 3px}
.m-card{background:#fff;border-radius:12px;padding:14px;box-shadow:var(--shadow)}
.m-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.m-card-head h3{margin:0;font-size:14px}
.m-card-head a{font-size:12px}
.m-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px dashed var(--line-2);font-size:13px}
.m-row:last-child{border-bottom:none}
.m-row.me{background:#f3f8ff;margin:0 -14px;padding:10px 14px}
.m-row-t{font-size:13px;line-height:1.5}
.m-row-s{font-size:11px;color:var(--muted);margin-top:3px;line-height:1.5}
.m-arrow{color:#b9c2ce;font-size:16px}
.m-score-cell{color:var(--navy);font-weight:600;font-size:15px;text-align:right;min-width:48px}
.m-score-cell.plus{color:var(--green)}
.m-score-cell.minus{color:var(--red)}
.m-empty{text-align:center;color:#9aa3ae;font-size:12px;padding:20px 0}
.m-form{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.m-f{display:flex;flex-direction:column;gap:5px}
.m-f label{font-size:12px;color:var(--muted)}
.m-f input,.m-f select,.m-f textarea{width:100%;background:#f8fafc}
.m-hint{font-size:11px;color:#9aa3ae}
.m-task{border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:10px}
.m-task-top{display:flex;justify-content:space-between;align-items:center}
.m-task-t{font-size:14px;font-weight:600;margin:8px 0 4px}
.m-task-s{font-size:12px;color:var(--muted)}
.m-task-ops{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.m-list{background:#fff;border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}
.m-list a{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line-2);color:var(--text);font-size:14px}
.m-list a:last-child{border-bottom:none}
.m-list i{font-style:normal;color:#b9c2ce}
.m-foot{text-align:center;font-size:11px;color:#9aa3ae;padding:12px 0 24px}
.m-top3{display:flex;gap:8px;margin-top:14px}
.m-t3{flex:1;background:rgba(255,255,255,.12);border-radius:9px;padding:9px;text-align:center}
.m-t3-r{font-size:11px;color:#e8c56a}
.m-t3-n{font-size:12px;margin:3px 0}
.m-t3-s{font-size:16px;font-weight:600}
.m-rank-no{width:24px;text-align:center;color:var(--muted);font-weight:600;font-size:13px}

/* 响应式 */
@media (max-width:1200px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .login-side{display:none}
  .login-main{padding:20px}
  .app-view{flex-direction:column}
  .sidebar{position:fixed;left:0;top:0;bottom:0;width:240px;z-index:200;transform:translateX(-100%);transition:transform .22s;box-shadow:0 0 40px rgba(15,23,42,.3)}
  .sidebar.open{transform:none}
  .topbar{padding:0 12px}
  .topbar-toggle{display:block}
  .topbar-title{font-size:14px}
  .topbar-right{gap:10px}
  .u-meta{display:none}
  .content{padding:12px}
  .content.mobile-content{padding:0}
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .kpi-card .value{font-size:22px}
  .list-page{height:calc(100vh - 150px);border-radius:8px}
  .filter-bar{gap:8px;padding:8px}
  .f-item{flex:1;min-width:44%}
  .f-item input,.f-item select{min-width:0;flex:1}
  .toolbar{width:100%;justify-content:flex-end}
  .pager{flex-wrap:wrap;gap:6px}
  .pager .pages{margin-left:0}
  .form-grid{grid-template-columns:1fr}
  .modal.wide{width:100%}
  .detail-grid{grid-template-columns:1fr 1fr}
  .m-tabbar{display:flex}
  .page-head{flex-direction:column;gap:8px}
  .chart{height:200px}
}

/* ---------------- 员工档案：组织架构层级视图 ---------------- */
.org-tree-bar{display:flex;align-items:flex-end;gap:14px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fbfcfe;flex-wrap:wrap}
.org-tree-bar .f-item{display:flex;flex-direction:column;gap:5px}
.org-tree-bar .f-item label{font-size:12px;color:var(--text-2)}
.org-tree-bar .f-item input,.org-tree-bar .f-item select{height:32px;min-width:150px}
.org-tree-bar .spacer{flex:1}
.org-tree-stat{font-size:12px;color:var(--muted);padding-bottom:6px}
.org-tree{max-height:calc(100vh - 260px);overflow:auto}
/* 表头与数据行共用同一套列宽：层级缩进只占最左侧固定的 96px 缩进栏，姓名及右侧各列全部对齐 */
.org-tree .ot-head,
.org-tree .ot-row.ot-emp,
.org-tree .ot-row.ot-dept{display:grid;grid-template-columns:96px 180px 110px 130px 130px 100px 170px 230px;align-items:center;column-gap:0;min-width:1146px}
.org-tree .ot-head{position:sticky;top:0;z-index:6;height:36px;padding:0 16px;background:#fbfcfe;border-bottom:1px solid var(--line);font-size:12px;font-weight:600;color:var(--text-2)}
.org-tree .ot-head>span{padding-right:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.org-tree .ot-head>span:last-child{justify-self:end;padding-right:0}
.org-tree .ot-row{min-height:42px;padding:0 16px;border-bottom:1px solid var(--line-2);position:relative}
.ot-gutter{display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden}
.ot-indent{flex:none}
.ot-dept{background:#f5f8fc;cursor:pointer;user-select:none}
.ot-dept:hover{background:#ecf3fa}
.ot-dept .ot-name{font-weight:600;color:var(--navy)}
.ot-toggle{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex:none;color:var(--blue);font-size:12px}
.ot-guide{width:16px;flex:none;color:#c8d3e0;font-size:12px;text-align:center}
.ot-name{display:flex;align-items:center;gap:6px;min-width:0;font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ot-code{font-size:12px;color:var(--muted);font-family:Consolas,"Microsoft YaHei",monospace;padding-right:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ot-pos{font-size:12px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}
.ot-row .ot-dep{font-size:12px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}
.ot-role{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}
.ot-status{display:flex;gap:5px;align-items:center;overflow:hidden}
.ot-ops{display:flex;gap:6px;flex:none;justify-self:end}
.ot-wid{font-size:11px;color:var(--muted);background:#eef2f7;border-radius:4px;padding:1px 6px;justify-self:start;white-space:nowrap}
.ot-local{background:#fdf3e4;color:var(--orange)}
.ot-leader{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}
.ot-count{grid-column:7 / span 2;justify-self:end;font-size:12px;color:var(--muted);white-space:nowrap}
.ot-emp:hover{background:#fafcff}
.org-tree .tag{font-size:11px}

.head-ops{display:flex;gap:8px;align-items:center;flex:none}
