:root{
  --brand:#1d4ed8; --brand-d:#1e3a8a; --ink:#1e293b; --sub:#64748b;
  --line:#e2e8f0; --bg:#f1f5f9;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{font-family:"Microsoft YaHei","PingFang SC","Segoe UI",system-ui,sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; -webkit-font-smoothing:antialiased}
.boot{display:flex;align-items:center;justify-content:center;height:100vh;color:var(--sub)}

/* ---------- 登录页 ---------- */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#1e3a8a 0%,#1d4ed8 55%,#3b82f6 100%);padding:20px}
.login-card{width:100%;max-width:400px;background:#fff;border-radius:16px;
  box-shadow:0 20px 50px rgba(15,23,42,.28);padding:34px 30px 26px}
.login-title{font-size:23px;font-weight:700;color:var(--brand-d);text-align:center;margin:0 0 6px}
.login-sub{text-align:center;color:var(--sub);font-size:13px;margin-bottom:26px}
.login-form{display:block}
.lf-label{font-size:13px;color:#475569;font-weight:600;margin-bottom:7px}
.lf-picked{margin-top:12px;font-size:13px;color:#0f766e;background:#f0fdfa;
  border:1px solid #99f6e4;border-radius:8px;padding:8px 12px;line-height:1.5}
.lf-picked.muted{color:var(--sub);background:#f8fafc;border-color:#e2e8f0}
.lf-picked b{color:#0f766e}
.login-foot{margin-top:20px;padding-top:14px;border-top:1px dashed #e2e8f0;
  font-size:12px;color:var(--sub);text-align:center;line-height:1.8}
.login-foot code{background:#fef3c7;color:#92400e;padding:1px 7px;border-radius:4px;font-weight:700}


/* ---------- 工作台欢迎条 ---------- */
.hero-card{background:linear-gradient(120deg,#1e3a8a,#1d4ed8);color:#fff;border:0}
.hero-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.hero-name{font-size:19px;font-weight:700;color:#fff}
.hero-sub{font-size:13px;opacity:.88;margin-top:5px;color:#e2e8f0}
.hero-date{font-size:13px;opacity:.9;color:#e2e8f0}


/* ---------- 扇形图（圆环） ---------- */
.donut-wrap{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.donut{width:172px;height:172px;flex-shrink:0}
.donut-num{font-size:26px;font-weight:700;fill:#1e3a8a}
.donut-cap{font-size:11px;fill:#94a3b8}
.donut-legend{flex:1;min-width:170px}
.lg-row{display:flex;align-items:center;gap:9px;padding:6px 0;font-size:13px}
.lg-dot{width:11px;height:11px;border-radius:3px;flex-shrink:0}
.lg-name{color:#475569;min-width:52px}
.lg-val{color:#94a3b8;margin-left:auto}
.lg-val b{color:#0f172a;font-size:14px}
@media(max-width:768px){
  .donut-wrap{flex-direction:column;gap:12px}
  .donut{width:150px;height:150px}
}

/* ---------- 布局 ---------- */
.layout{display:flex;min-height:100vh}
.sidebar{width:220px;background:#0f172a;color:#cbd5e1;flex-shrink:0;display:flex;flex-direction:column}
.side-brand{padding:18px 18px 14px;font-size:16px;font-weight:700;color:#fff;
  border-bottom:1px solid rgba(255,255,255,.08)}
.side-brand small{display:block;font-weight:400;font-size:11px;color:#94a3b8;margin-top:4px}
.side-menu{flex:1;padding:10px 0}
.side-item{display:flex;align-items:center;gap:10px;padding:11px 20px;cursor:pointer;
  font-size:14px;transition:.15s;border-left:3px solid transparent}
.side-item:hover{background:rgba(255,255,255,.06);color:#fff}
.side-item.active{background:rgba(59,130,246,.18);color:#fff;border-left-color:#3b82f6}
.side-foot{padding:12px 18px;font-size:11px;color:#64748b;border-top:1px solid rgba(255,255,255,.08)}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:56px;background:#fff;border-bottom:1px solid var(--line);display:flex;
  align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:10}
.topbar h2{margin:0;font-size:17px;font-weight:600}
.top-user{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--sub)}
.role-tag{background:#eff6ff;color:var(--brand);border-radius:10px;padding:2px 9px;font-size:12px}
.content{flex:1;padding:18px;max-width:1400px;width:100%;margin:0 auto}
@media(min-width:1700px){.content{max-width:1600px}}

/* ---------- 卡片 ---------- */
.card{background:#fff;border-radius:12px;padding:16px 18px;box-shadow:0 1px 3px rgba(15,23,42,.06);
  margin-bottom:16px}
.card-title{font-size:15px;font-weight:600;margin:0 0 14px;display:flex;
  align-items:center;justify-content:space-between}
.card-title .more{font-size:12px;color:var(--brand);cursor:pointer;font-weight:400}
.grid{display:grid;gap:16px}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:1200px){.grid-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}}

/* ---------- 统计块 ---------- */
.stat{background:#fff;border-radius:12px;padding:16px 18px;box-shadow:0 1px 3px rgba(15,23,42,.06);
  border-left:4px solid var(--brand)}
.stat .k{font-size:12px;color:var(--sub)}
.stat .v{font-size:26px;font-weight:700;color:var(--brand-d);line-height:1.5}
.stat .v small{font-size:13px;font-weight:400;color:var(--sub);margin-left:4px}
.stat.green{border-left-color:#16a34a}.stat.green .v{color:#15803d}
.stat.amber{border-left-color:#d97706}.stat.amber .v{color:#b45309}
.stat.red{border-left-color:#dc2626}.stat.red .v{color:#b91c1c}

/* ---------- 审批轨迹 ---------- */
.tl{margin:4px 0 2px;padding-left:6px}
.tl-row{display:flex;gap:12px;padding:9px 0;border-bottom:1px dashed #eef2f7}
.tl-row:last-child{border-bottom:0}
.tl-dot{width:9px;height:9px;border-radius:50%;margin-top:5px;flex-shrink:0}
.tl-body{flex:1;font-size:13px;line-height:1.6}
.tl-title{font-weight:600}
.tl-meta{color:var(--sub);font-size:12px}
.tl-comment{margin-top:5px;background:#f8fafc;border-left:3px solid #cbd5e1;border-radius:0 6px 6px 0;
  padding:7px 10px;color:#334155;font-size:12.5px;white-space:pre-wrap}
.tl-comment.reject{background:#fef2f2;border-left-color:#dc2626;color:#991b1b}
.tl-comment.approve{background:#f0fdf4;border-left-color:#16a34a;color:#166534}

/* ---------- 操作区 ---------- */
.punch{display:flex;gap:14px;flex-wrap:wrap}
.punch-box{flex:1;min-width:150px;background:#f8fafc;border-radius:10px;padding:14px 16px;
  border:1px solid #eef2f7}
.punch-box .k{font-size:12px;color:var(--sub);margin-bottom:6px}
.punch-box .v{font-size:28px;font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums}
.punch-box.ok .v{color:#16a34a}
.punch-actions{display:flex;gap:12px;margin-top:14px;flex-wrap:wrap}
.punch-actions .el-button{height:44px;font-size:15px}

/* ---------- 手机端专用块 ---------- */
.mobile-only{display:none}

/* ---------- 移动端 ---------- */
.mobile-bar{display:none}
@media(max-width:768px){
  .mobile-only{display:block}
  .sidebar{display:none}
  .topbar{height:52px;padding:0 14px}
  .topbar h2{font-size:15px}
  .content{padding:12px 12px 74px}
  .card{padding:14px;border-radius:10px}
  .stat .v{font-size:22px}
  .grid{gap:12px}
  .login-card{max-width:100%;padding:26px 20px 22px}
  .mobile-bar{display:flex;position:fixed;left:0;right:0;bottom:0;height:58px;background:#fff;
    border-top:1px solid var(--line);z-index:50;padding-bottom:env(safe-area-inset-bottom)}
  .mobile-bar .mi{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:2px;font-size:11px;color:var(--sub);cursor:pointer}
  .mobile-bar .mi.active{color:var(--brand);font-weight:600}
  .mobile-bar .mi .ic{font-size:17px;line-height:1}
  .hide-mobile{display:none!important}
  .el-dialog{width:94%!important;margin-top:8vh!important}
  .el-table{font-size:12px}
}

/* ---------- 标签与其它 ---------- */
.tag-pending{color:#b45309;background:#fffbeb;border-radius:6px;padding:2px 8px;font-size:12px}
.tag-approved{color:#15803d;background:#f0fdf4;border-radius:6px;padding:2px 8px;font-size:12px}
.tag-rejected{color:#b91c1c;background:#fef2f2;border-radius:6px;padding:2px 8px;font-size:12px}
.tag-withdrawn{color:#475569;background:#f1f5f9;border-radius:6px;padding:2px 8px;font-size:12px}
.muted{color:var(--sub);font-size:12px}
.reason-cell{max-width:280px;white-space:normal;line-height:1.5}
.recent-item{display:flex;align-items:center;justify-content:space-between;padding:9px 0;
  border-bottom:1px dashed #eef2f7;font-size:13px}
.recent-item:last-child{border-bottom:0}
.empty{text-align:center;color:var(--sub);padding:26px 0;font-size:13px}
