:root{
  --blue:#1677ff;--blue2:#0e5ad8;--ink:#102044;--muted:#74819a;--line:#e5ebf4;
  --bg:#f5f9ff;--card:#fff;--green:#10b981;--orange:#f59e0b;--red:#ef4444;--purple:#7c3aed;
  --shadow:0 10px 30px rgba(41,83,145,.08);--radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:"Microsoft YaHei","微软雅黑","PingFang SC","Noto Sans CJK SC",SimHei,sans-serif;background:linear-gradient(180deg,#f7fbff 0%,#f3f7fd 100%);color:var(--ink)}
button,input,select,textarea{font:inherit}
a{text-decoration:none;color:inherit}
.app{min-height:100vh}
.hidden{display:none!important}
.top{height:76px;background:rgba(255,255,255,.93);backdrop-filter:blur(16px);border-bottom:1px solid #e8eef7;display:flex;align-items:center;padding:0 28px;gap:22px;position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:13px;min-width:210px}
.logo{width:38px;height:38px;border-radius:10px;background:linear-gradient(145deg,#0dc8d8,#1677ff 60%,#635bff);position:relative;box-shadow:0 8px 20px rgba(22,119,255,.22)}
.logo:before,.logo:after{content:"";position:absolute;background:white;border-radius:3px;transform:rotate(-45deg)}
.logo:before{width:18px;height:7px;left:8px;top:14px}.logo:after{width:7px;height:18px;left:17px;top:9px}
.brand h1{font-size:22px;margin:0;font-weight:800;letter-spacing:.5px}.brand small{display:block;color:#8a96aa;margin-top:2px}
.project-switch{border:1px solid #dfe7f2;background:#fff;border-radius:12px;padding:12px 16px;font-weight:700;min-width:220px;box-shadow:0 5px 16px rgba(38,77,125,.04)}
.badge{background:#def8ef;color:#0a9b72;padding:8px 12px;border-radius:999px;font-size:13px;font-weight:700}
.top-spacer{flex:1}
.segment{display:flex;border:1px solid #dfe7f2;background:white;border-radius:12px;overflow:hidden}
.segment button{border:0;background:white;padding:11px 18px;color:#53627b;cursor:pointer}
.segment .active{background:var(--blue);color:white}
.user{display:flex;align-items:center;gap:10px;font-weight:700}.avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(145deg,#cfe2ff,#6ea8ff)}
.shell{display:flex;min-height:calc(100vh - 76px)}
.sidebar{width:232px;background:rgba(255,255,255,.95);border-right:1px solid #e6edf6;padding:24px 14px;position:sticky;top:76px;height:calc(100vh - 76px)}
.nav{display:flex;flex-direction:column;gap:8px}.nav button{border:0;background:transparent;text-align:left;padding:14px 16px;border-radius:12px;color:#263956;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:12px}
.nav button:hover,.nav button.active{background:#e9f2ff;color:var(--blue);font-weight:700}
.ico{width:18px;height:18px;border-radius:5px;background:currentColor;opacity:.9}
.side-quote{position:absolute;bottom:28px;left:20px;right:20px;color:#6d8fc1;font-size:14px;line-height:1.8}
.content{flex:1;padding:26px;min-width:0}
.page-hero{border-radius:24px;padding:28px 30px;background:linear-gradient(130deg,#fff 0%,#eff7ff 58%,#e6f2ff 100%);box-shadow:var(--shadow);position:relative;overflow:hidden;margin-bottom:18px}
.page-hero:after{content:"";position:absolute;right:-80px;top:-110px;width:420px;height:240px;background:radial-gradient(circle at center,rgba(22,119,255,.16),transparent 65%);transform:rotate(-10deg)}
.page-hero h2{font-size:32px;margin:0 0 8px}.page-hero p{margin:0;color:#60708b}
.hero-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.hero-actions{display:flex;gap:10px;position:relative;z-index:1}
.btn{border:0;border-radius:10px;padding:11px 16px;background:#eef4fb;color:#32527d;font-weight:700;cursor:pointer}.btn.primary{background:var(--blue);color:#fff}.btn.ghost{background:#fff;border:1px solid #dce6f3}
.cards{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:18px}
.card,.panel{background:var(--card);border:1px solid #e7edf5;border-radius:var(--radius);box-shadow:var(--shadow)}
.metric{padding:18px}.metric .label{font-size:14px;color:#5e6d84}.metric .value{font-size:27px;font-weight:800;margin:9px 0 6px}.metric .trend{font-size:13px;color:var(--green)}
.metric .dot{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:12px;font-weight:900}
.dot.b{background:#e7f2ff;color:var(--blue)}.dot.g{background:#e3f9f0;color:var(--green)}.dot.r{background:#ffebee;color:var(--red)}.dot.o{background:#fff3df;color:var(--orange)}.dot.p{background:#f0eaff;color:var(--purple)}
.grid-3{display:grid;grid-template-columns:1.4fr 1fr .82fr;gap:16px;margin-bottom:18px}
.grid-2{display:grid;grid-template-columns:1fr 1.1fr;gap:16px;margin-bottom:18px}
.panel{padding:20px}.panel h3{margin:0 0 16px;font-size:19px}.sub{color:#7a879c;font-size:13px}
.chart{height:235px;border-radius:12px;background:
linear-gradient(#eef3f9 1px,transparent 1px) 0 0/100% 46px,
linear-gradient(90deg,#eef3f9 1px,transparent 1px) 0 0/64px 100%,#fff;position:relative;overflow:hidden}
.line1,.line2,.line3{position:absolute;left:22px;right:18px;height:3px;border-radius:99px;transform-origin:left center}
.line1{top:95px;background:linear-gradient(90deg,transparent 0 4%,#1677ff 4% 100%);clip-path:polygon(0 52%,8% 42%,16% 58%,24% 37%,34% 48%,44% 26%,53% 55%,62% 33%,72% 42%,82% 30%,92% 46%,100% 38%,100% 58%,92% 66%,82% 48%,72% 59%,62% 49%,53% 72%,44% 42%,34% 62%,24% 51%,16% 73%,8% 57%,0 67%)}
.line2{top:132px;background:#10b981;opacity:.85;clip-path:polygon(0 60%,10% 48%,20% 65%,30% 44%,40% 52%,50% 38%,60% 62%,70% 49%,80% 58%,90% 47%,100% 55%,100% 64%,90% 57%,80% 68%,70% 59%,60% 72%,50% 48%,40% 62%,30% 54%,20% 74%,10% 58%,0 70%)}
.line3{top:112px;background:#f59e0b;opacity:.9;clip-path:polygon(0 58%,12% 43%,24% 60%,36% 35%,48% 51%,60% 28%,72% 54%,84% 41%,100% 48%,100% 58%,84% 52%,72% 65%,60% 40%,48% 63%,36% 47%,24% 72%,12% 55%,0 68%)}
.bars{height:235px;display:flex;align-items:flex-end;gap:9px;padding:12px 10px;border-radius:12px;background:linear-gradient(#eef3f9 1px,transparent 1px)0 0/100% 46px}
.bar{flex:1;display:flex;gap:3px;align-items:flex-end;height:100%}.bar i{display:block;width:33%;border-radius:4px 4px 0 0}.bar i:nth-child(1){background:#2f8cff}.bar i:nth-child(2){background:#43c19f}.bar i:nth-child(3){background:#f4a12f}
.kv{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px dashed #e6ebf2}.kv:last-child{border-bottom:0}.kv b{font-size:18px}
.note{background:#f4f8fe;padding:12px;border-radius:10px;color:#4f6280;line-height:1.7;margin-top:10px}
.list{display:flex;flex-direction:column;gap:10px}.list-item{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-radius:10px;background:#f8fbff;border:1px solid #edf2f8}
.status{padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}.ok{background:#e5f8ef;color:#0a9d70}.warn{background:#fff2dc;color:#db8500}.bad{background:#ffe9ea;color:#d9363e}.info{background:#e8f2ff;color:#1677ff}
.table{width:100%;border-collapse:collapse;font-size:14px}.table th{text-align:left;background:#f2f6fb;color:#53627b;padding:11px}.table td{padding:11px;border-bottom:1px solid #edf1f6}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.field,.select{border:1px solid #dce5f0;background:white;border-radius:9px;padding:10px 12px;color:#42536f}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.form-group label{display:block;font-size:13px;color:#596982;margin-bottom:6px;font-weight:700}.form-group input,.form-group select,.form-group textarea{width:100%;border:1px solid #dbe5f1;border-radius:9px;padding:11px 12px;outline:none}.form-group textarea{min-height:90px;resize:vertical}
.section-title{display:flex;align-items:center;justify-content:space-between;margin:6px 0 14px}.section-title h3{margin:0}
.project-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.project-card{padding:20px}.project-card h3{margin:6px 0 8px}.project-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.project-meta div{background:#f7faff;padding:10px;border-radius:9px}.project-meta span{display:block;color:#8490a5;font-size:12px;margin-bottom:4px}
.report-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.report-section{margin-bottom:14px}.hint-panel{position:sticky;top:96px;height:max-content}
.upload{border:1px dashed #9fc6ff;background:#f7fbff;border-radius:12px;padding:24px;text-align:center;color:#5e7daa}
.boss-shell{padding:24px 32px}.boss-top{display:flex;align-items:center;gap:18px;margin-bottom:18px}.boss-top .brand{min-width:auto}.boss-top .top-spacer{flex:1}
.boss-hero{background:linear-gradient(120deg,#fff,#f1f8ff 58%,#e2f1ff);border-radius:24px;padding:26px 28px;box-shadow:var(--shadow);margin-bottom:16px;position:relative;overflow:hidden}
.boss-hero:after{content:"";position:absolute;right:0;top:0;width:45%;height:100%;background:radial-gradient(ellipse at 70% 50%,rgba(62,143,255,.18),transparent 65%)}
.boss-hero h2{font-size:34px;margin:0 0 8px}.boss-hero p{color:#61728c;margin:0}
.empty{padding:50px;text-align:center;color:#7a879c}
@media(max-width:1200px){.cards{grid-template-columns:repeat(3,1fr)}.grid-3{grid-template-columns:1fr}.grid-2{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}.project-cards{grid-template-columns:1fr 1fr}.report-layout{grid-template-columns:1fr}.hint-panel{position:static}}

/* ============ 补充组件（V1.0 业务页通用） ============ */
.page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.page-head h2{font-size:26px;margin:0 0 6px}
.page-head p{margin:0;color:#74819a;font-size:14px}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.toolbar .grow{flex:1}
.field,.select{border:1px solid #dce5f0;background:#fff;border-radius:9px;padding:10px 12px;color:#42536f;outline:none}
.field:focus,.select:focus{border-color:#1677ff}
.btn{border:0;border-radius:10px;padding:11px 16px;background:#eef4fb;color:#32527d;font-weight:700;cursor:pointer;font-size:14px}
.btn.primary{background:#1677ff;color:#fff}
.btn.ghost{background:#fff;border:1px solid #dce6f3}
.btn.danger{background:#ef4444;color:#fff}
.btn.sm{padding:7px 12px;font-size:13px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-row{display:flex;gap:10px;margin-top:18px}

/* 表格 */
.table-wrap{overflow-x:auto}
.table td.num,.table th.num{text-align:right;font-variant-numeric:tabular-nums}
.table tbody tr:hover{background:#f8fbff}
.table .link{color:#1677ff;font-weight:700}
.income{color:#10b981;font-weight:700}
.expense{color:#ef4444;font-weight:700}

/* 分页 */
.pager{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:16px;color:#74819a;font-size:13px}
.pager a,.pager span{padding:7px 12px;border-radius:8px;border:1px solid #e5ebf4;color:#42536f;text-decoration:none;background:#fff}
.pager a:hover{border-color:#1677ff;color:#1677ff}
.pager .cur{background:#1677ff;color:#fff;border-color:#1677ff;font-weight:700}

/* 详情 */
.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0 24px}
.kv{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px dashed #e6ebf2;gap:16px}
.kv:last-child{border-bottom:0}
.kv span{color:#7a879c;font-size:14px;white-space:nowrap}
.kv b{font-size:15px;text-align:right;word-break:break-all}
.kv.full{grid-column:1/-1}

/* 弹窗 */
.modal-mask{position:fixed;inset:0;background:rgba(16,32,68,.45);display:none;align-items:center;justify-content:center;z-index:100}
.modal-mask.show{display:flex}
.modal{background:#fff;border-radius:18px;width:min(760px,94vw);max-height:88vh;overflow:auto;box-shadow:0 24px 60px rgba(16,32,68,.28)}
.modal-head{padding:20px 24px;border-bottom:1px solid #edf2f8;display:flex;justify-content:space-between;align-items:center}
.modal-head h3{margin:0;font-size:19px}
.modal-close{border:0;background:#f1f5fb;width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:18px;color:#5e6d84}
.modal-body{padding:22px 24px}
.modal-foot{padding:16px 24px;border-top:1px solid #edf2f8;display:flex;justify-content:flex-end;gap:10px}

/* 表单 */
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.form-grid.cols2{grid-template-columns:repeat(2,1fr)}
.form-grid.cols1{grid-template-columns:1fr}
.form-group label{display:block;font-size:13px;color:#596982;margin-bottom:6px;font-weight:700}
.form-group label .req{color:#ef4444;margin-left:2px}
.form-group input,.form-group select,.form-group textarea{width:100%;border:1px solid #dbe5f1;border-radius:9px;padding:11px 12px;outline:none;background:#fff}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:#1677ff}
.form-group textarea{min-height:90px;resize:vertical}
.form-hint{font-size:12px;color:#93a0b4;margin-top:5px}
.field-error{color:#ef4444;font-size:12px;margin-top:5px}

/* 上传 */
.upload{border:1px dashed #9fc6ff;background:#f7fbff;border-radius:12px;padding:22px;text-align:center;color:#5e7daa;cursor:pointer}
.upload:hover{background:#eef6ff}
.thumb-list{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.thumb{position:relative;width:96px;height:96px;border-radius:10px;overflow:hidden;border:1px solid #e5ebf4;background:#f7faff}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb .del{position:absolute;right:4px;top:4px;background:rgba(0,0,0,.55);color:#fff;border:0;border-radius:6px;width:22px;height:22px;cursor:pointer;font-size:12px;line-height:1}

/* 状态标签 */
.status{padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.ok{background:#e5f8ef;color:#0a9d70}
.warn{background:#fff2dc;color:#db8500}
.bad{background:#ffe9ea;color:#d9363e}
.info{background:#e8f2ff;color:#1677ff}
.mute{background:#eef2f7;color:#74819a}

/* 空状态 / 提示 */
.empty{padding:50px;text-align:center;color:#7a879c}
.empty .ico-lg{font-size:38px;display:block;margin-bottom:10px;opacity:.5}
.alert{padding:12px 14px;border-radius:10px;margin-bottom:14px;font-size:14px;line-height:1.6}
.alert.err{background:#ffecec;color:#c0392b;border:1px solid #ffd6d6}
.alert.ok{background:#e5f8ef;color:#0a7a55;border:1px solid #c6f0dd}
.alert.info{background:#eaf3ff;color:#1668c9;border:1px solid #cfe4ff}

/* toast */
#toast{position:fixed;top:24px;left:50%;transform:translateX(-50%);z-index:999;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast-item{background:#102044;color:#fff;padding:11px 20px;border-radius:10px;font-size:14px;box-shadow:0 10px 30px rgba(16,32,68,.3);animation:tin .2s ease}
.toast-item.err{background:#d9363e}
.toast-item.ok{background:#0a9d70}
@keyframes tin{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* 项目切换下拉 */
.pswitch{position:relative}
.pswitch-menu{position:absolute;left:0;top:calc(100% + 8px);background:#fff;border:1px solid #e5ebf4;border-radius:12px;box-shadow:0 16px 40px rgba(41,83,145,.16);min-width:240px;padding:8px;z-index:60;display:none}
.pswitch-menu.show{display:block}
.pswitch-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:8px;cursor:pointer;font-size:14px;color:#263956}
.pswitch-menu button:hover{background:#e9f2ff;color:#1677ff;font-weight:700}
.pswitch-menu .cur{background:#e9f2ff;color:#1677ff;font-weight:700}

/* 登录页 */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f2f8ff,#e8f1ff 60%,#dfeaff);padding:24px}
.login-box{width:min(420px,94vw);background:#fff;border-radius:22px;padding:36px 34px;box-shadow:0 24px 60px rgba(41,83,145,.14)}
.login-box .logo{margin:0 auto 14px}
.login-box h2{margin:0 0 6px;font-size:24px;text-align:center}
.login-box .sub{text-align:center;color:#8a96aa;font-size:13px;margin-bottom:24px}
.login-box .form-group{margin-bottom:14px}
.login-box .btn{width:100%;margin-top:8px;padding:13px;font-size:15px}
.login-tip{margin-top:18px;background:#f4f8fe;border-radius:10px;padding:12px;font-size:12.5px;color:#4f6280;line-height:1.8}

/* 图表容器 */
.chart-box{width:100%;height:280px}

/* 日报分组 */
.report-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}
.hint-panel{position:sticky;top:96px;height:max-content}
.metric-item{margin-bottom:14px}

/* 标签页 */
.tabs{display:flex;gap:6px;border-bottom:1px solid #edf2f8;margin-bottom:18px;flex-wrap:wrap}
.tabs a{padding:11px 16px;color:#53627b;text-decoration:none;border-bottom:2px solid transparent;font-weight:700;font-size:14px}
.tabs a.active{color:#1677ff;border-bottom-color:#1677ff}

@media(max-width:1200px){
  .form-grid{grid-template-columns:1fr 1fr}
  .report-layout{grid-template-columns:1fr}
  .hint-panel{position:static}
  .detail-grid{grid-template-columns:1fr}
}
@media(max-width:768px){
  .form-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:repeat(2,1fr)!important}
}
.nav a{border:0;background:transparent;text-align:left;padding:14px 16px;border-radius:12px;color:#263956;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:12px}
.nav a:hover,.nav a.active{background:#e9f2ff;color:var(--blue);font-weight:700}

/* ============ Apple-style visual system ============ */
:root{
  --blue:#0a84ff;--blue2:#0064d7;--ink:#17233b;--muted:#6e7b91;--line:rgba(60,72,88,.12);
  --bg:#f4f7fb;--card:rgba(255,255,255,.82);--shadow:0 12px 36px rgba(31,50,78,.08);--radius:20px;
}
body{
  font-family:"Microsoft YaHei","微软雅黑","PingFang SC","Noto Sans CJK SC",SimHei,sans-serif;
  background:radial-gradient(circle at 78% -10%,rgba(10,132,255,.09),transparent 34%),linear-gradient(180deg,#f8faff 0%,#f2f5fa 100%);
  font-optical-sizing:auto;
}
.ui-icon{width:1.1em;height:1.1em;display:block;flex:0 0 auto}
.top{
  height:76px;background:rgba(248,250,255,.74);backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);border-bottom-color:rgba(255,255,255,.72);
  box-shadow:0 1px 0 rgba(34,51,77,.06),0 8px 28px rgba(34,51,77,.04);
}
.brand h1{font-weight:760;letter-spacing:-.025em}.brand small{letter-spacing:.01em}
.project-switch{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;background:rgba(255,255,255,.72);border-color:rgba(60,72,88,.14);box-shadow:0 4px 18px rgba(31,50,78,.05)}
.project-switch .chevron{width:14px;height:14px;transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.project-switch[aria-expanded="true"] .chevron{transform:rotate(180deg)}
.avatar{display:grid;place-items:center;background:linear-gradient(145deg,#dcecff,#8bc1ff);color:#075aa9}.avatar .ui-icon{width:20px;height:20px}
.sidebar{
  width:232px;background:rgba(248,250,255,.66);backdrop-filter:blur(22px) saturate(155%);
  -webkit-backdrop-filter:blur(22px) saturate(155%);border-right-color:rgba(60,72,88,.1);padding:20px 12px;
}
.nav{gap:5px}.nav a{position:relative;min-height:48px;padding:8px 11px;border-radius:14px;color:#40506a;font-weight:600;gap:10px;transition:background-color .18s ease,color .18s ease,transform .12s ease}
.nav a:hover{background:rgba(10,132,255,.07);color:#075fae}.nav a:active{transform:scale(.98)}
.nav a.active{background:rgba(10,132,255,.11);color:#0767c6;font-weight:720;box-shadow:inset 0 0 0 1px rgba(10,132,255,.08)}
.nav-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;color:#687991;background:rgba(109,128,155,.09);transition:background-color .18s ease,color .18s ease,transform .22s cubic-bezier(.2,.8,.2,1)}
.nav-icon .ui-icon{width:18px;height:18px}.nav a:hover .nav-icon{transform:scale(1.04)}
.nav a.active .nav-icon{background:#0a84ff;color:#fff;box-shadow:0 5px 14px rgba(10,132,255,.25)}
.side-quote{color:#7889a3;font-size:13px;line-height:1.65;letter-spacing:.02em}
.content{padding:28px}
.card,.panel,.metric,.project-card{
  background:var(--card);border:1px solid rgba(255,255,255,.85);border-radius:var(--radius);
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.9);backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
}
.metric{position:relative;min-height:144px;padding:17px;overflow:hidden;transition:transform .24s cubic-bezier(.2,.8,.2,1),box-shadow .24s ease}
.metric:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(31,50,78,.11),inset 0 1px 0 #fff}
.metric-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;margin-bottom:14px}
.metric-icon .ui-icon{width:20px;height:20px}.metric-icon.b{background:#e2f1ff;color:#0878df}.metric-icon.g{background:#dff7ed;color:#099669}.metric-icon.r{background:#ffe8e8;color:#dd4148}.metric-icon.o{background:#fff1d9;color:#d98000}.metric-icon.p{background:#eee8ff;color:#7055c9}
.metric .label{color:#65728a;font-weight:550}.metric .value{font-size:clamp(23px,2vw,29px);font-weight:760;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.panel{padding:22px}.panel h3,.page-head h2{letter-spacing:-.025em}.panel h3{font-weight:720}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:12px;transition:transform .11s ease,filter .18s ease,box-shadow .18s ease}
.btn .ui-icon{width:16px;height:16px}.btn.primary{background:linear-gradient(180deg,#168cff,#0878eb);box-shadow:0 6px 16px rgba(10,132,255,.2)}
.btn:hover{filter:brightness(.985)}.btn:active{transform:scale(.97)}
.btn:focus-visible,.nav a:focus-visible,.project-switch:focus-visible,.modal-close:focus-visible{outline:3px solid rgba(10,132,255,.28);outline-offset:2px}
.modal{background:rgba(255,255,255,.92);backdrop-filter:blur(28px) saturate(170%);-webkit-backdrop-filter:blur(28px) saturate(170%);border:1px solid rgba(255,255,255,.9);box-shadow:0 28px 80px rgba(20,36,60,.24)}
.modal-close{display:grid;place-items:center;border-radius:50%;width:32px;height:32px}.modal-close .ui-icon{width:15px;height:15px}.modal-close:active{transform:scale(.92)}
.empty-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;margin:0 auto 12px;background:#e7f2ff;color:#0a84ff}.empty-icon .ui-icon{width:27px;height:27px}
.inline-link{display:inline-flex;align-items:center;gap:2px;color:#0878df}.inline-link .ui-icon{width:14px;height:14px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.metric:hover{transform:none}}
@media(prefers-reduced-transparency:reduce){.top,.sidebar,.card,.panel,.metric,.project-card,.modal{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-contrast:more){.top,.sidebar,.card,.panel,.metric,.project-card,.modal{background:#fff;border-color:#56657a}.nav a.active{outline:2px solid #075fae}}
/* Entity identity and Apple-style image capture */
.entity-label{display:inline-flex;align-items:center;gap:8px;min-width:0;vertical-align:middle}.entity-avatar{width:32px;height:32px;object-fit:cover;flex:0 0 auto;background:#eef2f7;border:1px solid rgba(15,23,42,.08);box-shadow:0 1px 2px rgba(15,23,42,.06)}.entity-avatar.sm{width:26px;height:26px}.entity-avatar.lg{width:44px;height:44px}.entity-avatar.circle{border-radius:50%}.entity-avatar.rounded{border-radius:9px}
.media-upload{margin-top:7px}.media-upload-input{position:absolute!important;width:1px;height:1px;opacity:0;pointer-events:none}.media-upload-drop{width:100%;min-height:94px;display:flex;align-items:center;gap:14px;padding:13px;border:1px dashed #b8c2d1;border-radius:16px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(247,249,252,.92));color:inherit;text-align:left;cursor:pointer;transition:.18s ease}.media-upload-drop:hover,.media-upload.drag .media-upload-drop{border-color:#2878ff;background:#f4f8ff;transform:translateY(-1px);box-shadow:0 8px 24px rgba(40,120,255,.1)}.media-upload-preview{width:66px;height:66px;display:grid;place-items:center;overflow:hidden;border-radius:15px;background:#e9eef6;color:#2878ff;flex:0 0 auto}.media-upload-preview img{width:100%;height:100%;object-fit:cover}.media-upload-glyph{font-size:28px;font-weight:300}.media-upload-copy{display:grid;gap:5px}.media-upload-copy small{color:#778399}.form-error{min-height:18px;margin-top:5px;color:#c93756;font-size:12px}
.cropper-shell{position:fixed;inset:0;z-index:2000;display:none;place-items:center;padding:20px;background:rgba(10,18,32,.44);backdrop-filter:blur(14px)}.cropper-shell.open{display:grid}.cropper-panel{width:min(92vw,540px);padding:18px;border:1px solid rgba(255,255,255,.7);border-radius:24px;background:rgba(252,253,255,.96);box-shadow:0 28px 80px rgba(15,23,42,.28)}.cropper-head,.cropper-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.cropper-head button{border:0;background:#e8edf5;border-radius:50%;width:30px;height:30px;font-size:20px;cursor:pointer}.cropper-stage{margin:16px auto;width:min(100%,420px);aspect-ratio:1;overflow:hidden;border-radius:22px;background:#111827;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}.cropper-stage canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.cropper-stage canvas:active{cursor:grabbing}.cropper-zoom{display:flex;align-items:center;gap:12px;margin:12px 0 18px;color:#667085}.cropper-zoom input{flex:1}.cropper-actions{justify-content:flex-end}
@media (prefers-reduced-motion:reduce){.media-upload-drop{transition:none}}
.file-drop input{position:absolute!important;width:1px;height:1px;opacity:0}.file-drop>button{width:100%;min-height:92px;padding:15px;display:flex;align-items:center;justify-content:center;gap:12px;border:1px dashed #b8c2d1;border-radius:16px;background:#f9fbfd;color:#344054;cursor:pointer;transition:.18s ease}.file-drop>button:hover,.file-drop.drag>button{border-color:#2878ff;background:#f3f7ff;box-shadow:0 8px 24px rgba(40,120,255,.1)}.file-drop-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#e7efff;color:#2878ff;font-size:24px}.file-drop button>span:last-child{display:grid;gap:4px;text-align:left}.file-drop small{color:#778399;font-weight:400}
.date-range-label{font-size:12px;color:#6f7b90;white-space:nowrap}.date-popover{position:absolute;z-index:1200;top:66px;right:174px;width:min(430px,calc(100vw - 32px));padding:16px;border:1px solid rgba(255,255,255,.72);border-radius:20px;background:rgba(252,253,255,.96);box-shadow:0 22px 64px rgba(15,23,42,.22);backdrop-filter:blur(22px) saturate(160%);opacity:0;visibility:hidden;transform:translateY(-7px) scale(.98);transform-origin:top right;transition:opacity .16s ease,transform .2s ease,visibility .2s}.date-popover.show{opacity:1;visibility:visible;transform:translateY(0) scale(1)}.date-popover-head,.date-popover-actions{display:flex;align-items:center;justify-content:space-between}.date-popover-head button{width:30px;height:30px;border:0;border-radius:50%;background:#e9eef5;color:#536077;font-size:20px;cursor:pointer}.date-fields{display:flex;align-items:end;gap:10px;margin-top:14px}.date-fields label{display:grid;gap:6px;flex:1;color:#667085;font-size:12px}.date-fields input{width:100%;padding:10px 11px;border:1px solid #d8e0eb;border-radius:11px;background:#fff;color:#172033;font:inherit}.date-popover-actions{justify-content:flex-end;gap:8px;margin-top:8px}@media(max-width:900px){.date-popover{right:16px}.date-range-label{display:none}}@media(prefers-reduced-motion:reduce){.date-popover{transition:opacity .12s ease;transform:none}}

/* ============ 顶栏控件：统一高度（项目切换 = 日期分段 = 主题按钮）============ */
.top .project-switch,.top .segment,.top .theme-toggle{height:46px;box-sizing:border-box}
.top .project-switch{padding:0 16px}
.top .segment button{height:100%;padding:0 16px;display:flex;align-items:center}

/* ============ 顶栏主题切换（单按钮：单击深色/浅色互切）============ */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:46px;height:46px;border:1px solid rgba(60,72,88,.14);background:rgba(255,255,255,.62);border-radius:12px;color:#5a6a83;cursor:pointer;padding:0;transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease}
.theme-toggle .tt-ico{width:17px;height:17px}
.theme-toggle .light-ico{display:block}
.theme-toggle .dark-ico,.theme-toggle .sys-ico{display:none}
.theme-toggle:hover{background:rgba(10,132,255,.08);color:#0767c6}
.theme-toggle:focus-visible{outline:3px solid rgba(10,132,255,.28);outline-offset:2px}
html[data-theme='dark'] .theme-toggle{border-color:rgba(148,163,184,.18);background:rgba(148,163,184,.08);color:#c2cfe0;box-shadow:none}
html[data-theme='dark'] .theme-toggle:hover{background:rgba(59,157,255,.16);color:#9cc9ff}
html[data-theme-pref='dark'] .theme-toggle .light-ico{display:none}
html[data-theme-pref='dark'] .theme-toggle .dark-ico{display:block}
html[data-theme-pref='system'] .theme-toggle .light-ico{display:none}
html[data-theme-pref='system'] .theme-toggle .sys-ico{display:block}

/* ============ 深色主题（html[data-theme='dark']）============ */
html[data-theme='dark']{color-scheme:dark}
html[data-theme='dark']{
  --ink:#e4ebf5;--muted:#8fa1b8;--line:rgba(148,163,184,.14);
  --bg:#0a0f1a;--card:rgba(22,30,48,.84);--shadow:0 14px 40px rgba(0,0,0,.35);
}
html[data-theme='dark'] body{background:radial-gradient(circle at 78% -10%,rgba(10,132,255,.13),transparent 34%),linear-gradient(180deg,#0c1322 0%,#090e18 100%);color:#dfe7f2}
html[data-theme='dark'] .top{background:rgba(14,20,33,.82);border-bottom-color:rgba(148,163,184,.14);box-shadow:0 1px 0 rgba(0,0,0,.35),0 8px 28px rgba(0,0,0,.28)}
html[data-theme='dark'] .brand small{color:#8294ab}
html[data-theme='dark'] .project-switch{background:rgba(148,163,184,.08);border-color:rgba(148,163,184,.16);box-shadow:none;color:#dfe7f2}
html[data-theme='dark'] .badge{background:rgba(16,185,129,.16);color:#37d9a5}
html[data-theme='dark'] .segment{border-color:rgba(148,163,184,.16);background:rgba(148,163,184,.08)}
html[data-theme='dark'] .segment button{background:transparent;color:#a7b5c9}
html[data-theme='dark'] .segment .active{background:#2b8fff;color:#fff}
html[data-theme='dark'] .sidebar{background:rgba(15,22,36,.72);border-right-color:rgba(148,163,184,.1)}
html[data-theme='dark'] .nav a{color:#b9c4d6}
html[data-theme='dark'] .nav a:hover{background:rgba(59,157,255,.12);color:#8cc0ff}
html[data-theme='dark'] .nav a.active{background:rgba(59,157,255,.16);color:#9cc9ff;box-shadow:inset 0 0 0 1px rgba(59,157,255,.2)}
html[data-theme='dark'] .nav-icon{color:#9fb0c6;background:rgba(148,163,184,.12)}
html[data-theme='dark'] .nav a.active .nav-icon{background:#2b8fff}
html[data-theme='dark'] .side-quote{color:#7f90a8}
html[data-theme='dark'] .page-hero{background:linear-gradient(130deg,#131b2e 0%,#101930 55%,#0e1526 100%);box-shadow:var(--shadow)}
html[data-theme='dark'] .page-hero p{color:#9db0c9}
html[data-theme='dark'] .boss-hero{background:linear-gradient(120deg,#141c30,#111a2e 58%,#0e1628);box-shadow:var(--shadow)}
html[data-theme='dark'] .boss-hero p{color:#9db0c9}
html[data-theme='dark'] .btn{background:rgba(148,163,184,.12);color:#dce5f2}
html[data-theme='dark'] .btn:hover{filter:brightness(1.16)}
html[data-theme='dark'] .btn.ghost{background:rgba(148,163,184,.07);border-color:rgba(148,163,184,.2)}
html[data-theme='dark'] .card,html[data-theme='dark'] .panel,html[data-theme='dark'] .metric,html[data-theme='dark'] .project-card{border-color:rgba(148,163,184,.14);box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.05)}
html[data-theme='dark'] .metric:hover{box-shadow:0 16px 44px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.06)}
html[data-theme='dark'] .metric .label{color:#9fb0c6}
html[data-theme='dark'] .metric-icon.b{background:rgba(10,132,255,.16);color:#6db4ff}
html[data-theme='dark'] .metric-icon.g{background:rgba(16,185,129,.16);color:#40d9a8}
html[data-theme='dark'] .metric-icon.r{background:rgba(239,68,68,.16);color:#ff8a8f}
html[data-theme='dark'] .metric-icon.o{background:rgba(245,158,11,.16);color:#ffbd5c}
html[data-theme='dark'] .metric-icon.p{background:rgba(124,58,237,.2);color:#b195ff}
html[data-theme='dark'] .dot.b{background:rgba(10,132,255,.16);color:#6db4ff}
html[data-theme='dark'] .dot.g{background:rgba(16,185,129,.16);color:#40d9a8}
html[data-theme='dark'] .dot.r{background:rgba(239,68,68,.16);color:#ff8a8f}
html[data-theme='dark'] .dot.o{background:rgba(245,158,11,.16);color:#ffbd5c}
html[data-theme='dark'] .dot.p{background:rgba(124,58,237,.2);color:#b195ff}
html[data-theme='dark'] .kv{border-bottom-color:rgba(148,163,184,.12)}
html[data-theme='dark'] .kv span{color:#8fa1b8}
html[data-theme='dark'] .note{background:rgba(148,163,184,.09);color:#c2cedd}
html[data-theme='dark'] .list-item{background:rgba(255,255,255,.03);border-color:rgba(148,163,184,.12)}
html[data-theme='dark'] .status.ok,html[data-theme='dark'] .ok{background:rgba(16,185,129,.16);color:#3ad6a2}
html[data-theme='dark'] .status.warn,html[data-theme='dark'] .warn{background:rgba(245,158,11,.16);color:#ffb84d}
html[data-theme='dark'] .status.bad,html[data-theme='dark'] .bad{background:rgba(239,68,68,.16);color:#ff858b}
html[data-theme='dark'] .status.info,html[data-theme='dark'] .info{background:rgba(10,132,255,.16);color:#6db4ff}
html[data-theme='dark'] .status.mute,html[data-theme='dark'] .mute{background:rgba(148,163,184,.14);color:#a6b5c8}
html[data-theme='dark'] .table th{background:#182134;color:#b7c4d7}
html[data-theme='dark'] .table td{border-bottom-color:rgba(148,163,184,.1)}
html[data-theme='dark'] .table tbody tr:hover{background:rgba(255,255,255,.03)}
html[data-theme='dark'] .table .link{color:#5faeff}
html[data-theme='dark'] .tabs{border-bottom-color:rgba(148,163,184,.12)}
html[data-theme='dark'] .tabs a{color:#a9b6c9}
html[data-theme='dark'] .tabs a.active{color:#6db4ff;border-bottom-color:#6db4ff}
html[data-theme='dark'] .toolbar .field,html[data-theme='dark'] .toolbar .select,html[data-theme='dark'] .field,html[data-theme='dark'] .select{background:#0f1728;border-color:rgba(148,163,184,.2);color:#dbe4f0}
html[data-theme='dark'] .toolbar .field:focus,html[data-theme='dark'] .toolbar .select:focus,html[data-theme='dark'] .field:focus,html[data-theme='dark'] .select:focus{border-color:#3b9dff}
html[data-theme='dark'] .form-group label{color:#a4b4c9}
html[data-theme='dark'] .form-group input,html[data-theme='dark'] .form-group select,html[data-theme='dark'] .form-group textarea{background:#0f1728;border-color:rgba(148,163,184,.2);color:#dbe4f0}
html[data-theme='dark'] .form-group input:focus,html[data-theme='dark'] .form-group select:focus,html[data-theme='dark'] .form-group textarea:focus{border-color:#3b9dff}
html[data-theme='dark'] .form-hint{color:#93a3b8}
html[data-theme='dark'] .project-meta div{background:rgba(148,163,184,.08)}
html[data-theme='dark'] .project-meta span{color:#9aaabf}
html[data-theme='dark'] .upload{border-color:rgba(63,157,255,.45);background:rgba(10,132,255,.07);color:#93b9e2}
html[data-theme='dark'] .upload:hover{background:rgba(10,132,255,.13)}
html[data-theme='dark'] .empty{color:#93a3b8}
html[data-theme='dark'] .empty-icon{background:rgba(10,132,255,.14);color:#5faeff}
html[data-theme='dark'] .alert.err{background:rgba(239,68,68,.13);color:#ffa3a7;border-color:rgba(239,68,68,.28)}
html[data-theme='dark'] .alert.ok{background:rgba(16,185,129,.13);color:#5ce0b2;border-color:rgba(16,185,129,.28)}
html[data-theme='dark'] .alert.info{background:rgba(10,132,255,.12);color:#83bfff;border-color:rgba(10,132,255,.3)}
html[data-theme='dark'] .pager a,html[data-theme='dark'] .pager span{background:#111a2c;border-color:rgba(148,163,184,.18);color:#c8d3e3}
html[data-theme='dark'] .pager a:hover{border-color:#3b9dff;color:#5faeff}
html[data-theme='dark'] .inline-link{color:#5faeff}
html[data-theme='dark'] .modal{background:rgba(23,31,49,.97);border-color:rgba(148,163,184,.18);box-shadow:0 28px 80px rgba(0,0,0,.55)}
html[data-theme='dark'] .modal-head{border-bottom-color:rgba(148,163,184,.12)}
html[data-theme='dark'] .modal-close{background:rgba(148,163,184,.14);color:#bcc9da}
html[data-theme='dark'] .modal-foot{border-top-color:rgba(148,163,184,.12)}
html[data-theme='dark'] .modal-mask{background:rgba(0,0,0,.6)}
html[data-theme='dark'] .pswitch-menu{background:#141c2e;border-color:rgba(148,163,184,.16);box-shadow:0 18px 46px rgba(0,0,0,.45)}
html[data-theme='dark'] .pswitch-menu button{color:#cdd8e8}
html[data-theme='dark'] .pswitch-menu button:hover{background:rgba(59,157,255,.14);color:#9cc9ff}
html[data-theme='dark'] .pswitch-menu .cur{background:rgba(59,157,255,.14);color:#9cc9ff}
html[data-theme='dark'] .date-range-label{color:#93a3b8}
html[data-theme='dark'] .date-popover{background:rgba(21,29,47,.97);border-color:rgba(148,163,184,.2);box-shadow:0 24px 70px rgba(0,0,0,.5)}
html[data-theme='dark'] .date-popover-head button{background:rgba(148,163,184,.14);color:#bcc9da}
html[data-theme='dark'] .date-fields label{color:#9db0c9}
html[data-theme='dark'] .date-fields input{background:#0f1728;border-color:rgba(148,163,184,.2);color:#dbe4f0}
html[data-theme='dark'] .media-upload-drop{background:linear-gradient(180deg,rgba(24,32,52,.9),rgba(16,23,40,.9));border-color:rgba(148,163,184,.28);color:#dfe7f2}
html[data-theme='dark'] .media-upload-drop:hover,html[data-theme='dark'] .media-upload.drag .media-upload-drop{border-color:#3b9dff;background:rgba(10,132,255,.1)}
html[data-theme='dark'] .media-upload-preview{background:rgba(148,163,184,.15)}
html[data-theme='dark'] .file-drop>button{background:#0f1728;border-color:rgba(148,163,184,.28);color:#dfe7f2}
html[data-theme='dark'] .file-drop>button:hover,html[data-theme='dark'] .file-drop.drag>button{border-color:#3b9dff;background:rgba(10,132,255,.1)}
html[data-theme='dark'] .cropper-panel{background:rgba(20,28,45,.97);border-color:rgba(148,163,184,.2);box-shadow:0 28px 80px rgba(0,0,0,.5)}
html[data-theme='dark'] .cropper-head button{background:rgba(148,163,184,.14);color:#c3cede}
html[data-theme='dark'] .cropper-zoom{color:#9aa9bd}
html[data-theme='dark'] .entity-avatar{background:#1a2436;border-color:rgba(255,255,255,.12)}
html[data-theme='dark'] .thumb{background:#141c2e;border-color:rgba(148,163,184,.16)}
html[data-theme='dark'] .toast-item{background:#1d2739}
html[data-theme='dark'] .login-wrap{background:linear-gradient(135deg,#0c1322,#0e1a30 60%,#0b1a2e)}
html[data-theme='dark'] .login-box{background:#121a2e;box-shadow:0 26px 66px rgba(0,0,0,.45)}
html[data-theme='dark'] .login-tip{background:rgba(148,163,184,.09);color:#c2cedd}
@media(prefers-reduced-transparency:reduce){html[data-theme='dark'] .top,html[data-theme='dark'] .sidebar,html[data-theme='dark'] .card,html[data-theme='dark'] .panel,html[data-theme='dark'] .metric,html[data-theme='dark'] .project-card,html[data-theme='dark'] .modal{background:#0e1522}}
@media(prefers-contrast:more){html[data-theme='dark'] .top,html[data-theme='dark'] .sidebar,html[data-theme='dark'] .card,html[data-theme='dark'] .panel,html[data-theme='dark'] .metric,html[data-theme='dark'] .project-card,html[data-theme='dark'] .modal{background:#0b111c;border-color:#5b6c85}}

/* 拖动排序 */
.drag-handle{cursor:grab;color:#a9b6c9;text-align:center;user-select:none;font-size:15px}
.drag-handle:hover{color:#1677ff}
tr.drag-row.dragging{background:#eaf3ff!important;opacity:.85;box-shadow:inset 0 0 0 2px #1677ff}
tr.drag-row{cursor:default}
