/* =========================================================================
 * style.css — 项目审批管理系统 · H5 移动端样式
 * ========================================================================= */
:root {
  --primary: #3b5bdb;
  --primary-d: #2f49b0;
  --primary-grad: linear-gradient(135deg, #4263eb 0%, #6741d9 100%);
  --first: #1c7ed6;     /* 待初审 蓝 */
  --first-bg: #e7f5ff;
  --final: #7048e8;     /* 待终审 紫 */
  --final-bg: #f3f0ff;
  --ok: #2f9e44;        /* 已通过 绿 */
  --ok-bg: #ebfbee;
  --rej: #e03131;       /* 已驳回 红 */
  --rej-bg: #fff0f0;
  --warn: #f08c00;
  --bg: #f1f3f6;
  --card: #ffffff;
  --line: #eceef1;
  --t1: #1f2733;        /* 主文字 */
  --t2: #6b7785;        /* 次文字 */
  --t3: #9aa4b0;        /* 占位 */
  --radius: 14px;
  --shadow: 0 2px 12px rgba(33, 43, 66, 0.06);
  --shadow-lg: 0 8px 28px rgba(33, 43, 66, 0.16);
  --nav-h: 58px;
  --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--t1);
  background: #c9ced6;
  font-size: 14px;
  line-height: 1.5;
}

/* 手机外壳：桌面浏览器下居中显示为竖屏 */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* ------------------------------ 顶部栏 ------------------------------ */
.header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px; color: #fff;
  background: var(--primary-grad);
  font-size: 17px; font-weight: 600; letter-spacing: .5px;
}

/* ------------------------------ 视图容器 ------------------------------ */
.views { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
.view { display: none; padding: 14px 14px 24px; }
.view.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 10px;
  font-size: 15px; font-weight: 600; color: var(--t1);
}
.section-title .more { font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer; }
.section-title .bar { display: flex; align-items: center; gap: 7px; }
.section-title .bar::before { content: ""; width: 4px; height: 14px; border-radius: 3px; background: var(--primary); }

/* ------------------------------ 首页 · 身份条 ------------------------------ */
.role-bar {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border-radius: 14px; padding: 11px 14px;
  box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer;
}
.role-bar:active { background: #fafbfc; }
.role-bar .rb-av {
  width: 38px; height: 38px; border-radius: 11px; flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.role-bar .rb-main { flex: 1; min-width: 0; }
.role-bar .rb-name { font-size: 14.5px; font-weight: 600; color: var(--t1); }
.role-bar .rb-name b { color: var(--primary); }
.role-bar .rb-sub { font-size: 11.5px; color: var(--t2); margin-top: 1px; }
.role-bar .rb-cta {
  flex: none; font-size: 12.5px; font-weight: 600; color: var(--primary);
  background: #eef1fd; padding: 6px 11px; border-radius: 20px;
}
.role-bar .rb-cta b { font-size: 13px; }

/* ------------------------------ 首页 · 概览大卡 ------------------------------ */
.overview {
  background: var(--primary-grad);
  border-radius: 18px; padding: 18px 18px 16px; color: #fff;
  box-shadow: var(--shadow-lg);
}
.overview .ov-label { font-size: 12.5px; opacity: .9; }
.overview .ov-value { font-size: 30px; font-weight: 700; margin: 4px 0 2px; letter-spacing: .5px; }
.overview .ov-value small { font-size: 14px; font-weight: 500; opacity: .85; margin-left: 4px; }
.overview .ov-sub { font-size: 12px; opacity: .82; }
.overview .ov-split {
  display: flex; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.overview .ov-split > div { flex: 1; }
.overview .ov-split .s-num { font-size: 19px; font-weight: 700; }
.overview .ov-split .s-num.first { color: #a5d8ff; }
.overview .ov-split .s-num.final { color: #d0bfff; }
.overview .ov-split .s-num.ok    { color: #b2f2bb; }
.overview .ov-split .s-lbl { font-size: 11.5px; opacity: .85; margin-top: 1px; }

/* 指标小卡（2列） */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stat {
  background: var(--card); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px;
}
.stat .ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; }
.stat .ic svg { width: 20px; height: 20px; }
.stat .s-num { font-size: 19px; font-weight: 700; color: var(--t1); line-height: 1.1; }
.stat .s-lbl { font-size: 12px; color: var(--t2); margin-top: 2px; }
.ic.blue   { background: var(--first-bg); color: var(--first); }
.ic.violet { background: var(--final-bg); color: var(--final); }
.ic.green  { background: var(--ok-bg); color: var(--ok); }
.ic.red    { background: var(--rej-bg); color: var(--rej); }
.ic.orange { background: #fff4e6; color: #e8590c; }
.ic.gray   { background: #f1f3f5; color: #495057; }

/* 快捷操作 */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick .q {
  background: var(--card); border-radius: var(--radius); padding: 14px 4px 11px;
  text-align: center; box-shadow: var(--shadow); cursor: pointer;
}
.quick .q:active { transform: scale(.96); }
.quick .q .qic { width: 42px; height: 42px; border-radius: 13px; margin: 0 auto 7px; display: flex; align-items: center; justify-content: center; }
.quick .q .qic svg { width: 22px; height: 22px; }
.quick .q span { font-size: 12.5px; color: var(--t1); }

/* ------------------------------ 列表行（项目 / 流水通用） ------------------------------ */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: none; }
.row:active { background: #fafbfc; }
.row .pj-ic {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.row .pj-ic svg { width: 21px; height: 21px; }
.row .main { flex: 1; min-width: 0; }
.row .r-title { font-size: 14.5px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-sub { font-size: 12px; color: var(--t2); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row .r-sub .code { color: var(--t3); font-variant-numeric: tabular-nums; }
.row .right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.row .r-budget { font-size: 15.5px; font-weight: 700; color: var(--t1); }
.row .r-budget small { font-size: 11px; color: var(--t2); font-weight: 500; }

/* 状态徽标 */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; line-height: 1.6; white-space: nowrap; }
.badge.first { color: var(--first); background: var(--first-bg); }
.badge.final { color: var(--final); background: var(--final-bg); }
.badge.ok    { color: var(--ok);    background: var(--ok-bg); }
.badge.rej   { color: var(--rej);   background: var(--rej-bg); }

/* 优先级标签 */
.prio { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.prio::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.prio.高 { color: #e03131; background: #fff0f0; }
.prio.高::before { background: #e03131; }
.prio.中 { color: #1c7ed6; background: #e7f5ff; }
.prio.中::before { background: #1c7ed6; }
.prio.低 { color: #868e96; background: #f1f3f5; }
.prio.低::before { background: #868e96; }

/* 分类色点 */
.cat-dot { display: inline-flex; align-items: center; gap: 4px; }
.cat-dot::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c, #868e96); }

/* ------------------------------ 搜索 / 筛选 ------------------------------ */
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 9px 13px; box-shadow: var(--shadow); margin-bottom: 12px; }
.search svg { width: 17px; height: 17px; color: var(--t3); flex: none; }
.search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--t1); }
.search input::placeholder { color: var(--t3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font-size: 13px; padding: 6px 14px; border-radius: 20px; background: #fff; color: var(--t2); cursor: pointer; border: 1px solid transparent; box-shadow: var(--shadow); white-space: nowrap; }
.chip.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(59, 91, 219, .35); }
.chip .n { opacity: .7; margin-left: 3px; font-size: 12px; }

.list-count { font-size: 12px; color: var(--t2); margin: 2px 2px 9px; }

/* ------------------------------ 待办视图 ------------------------------ */
.todo-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-grad); color: #fff;
  border-radius: 16px; padding: 15px 16px; margin-bottom: 14px; box-shadow: var(--shadow-lg);
}
.todo-banner .tb-ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex: none; }
.todo-banner .tb-ic svg { width: 22px; height: 22px; }
.todo-banner .tb-main { flex: 1; }
.todo-banner .tb-title { font-size: 15px; font-weight: 600; }
.todo-banner .tb-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.todo-banner .tb-num { font-size: 30px; font-weight: 800; line-height: 1; flex: none; }
.todo-banner .tb-num small { font-size: 13px; font-weight: 500; opacity: .85; margin-left: 2px; }

/* ------------------------------ 新建表单 ------------------------------ */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 14px; }
.field { padding: 13px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: none; }
.field > label { display: block; font-size: 12.5px; color: var(--t2); margin-bottom: 7px; }
.field > label .req { color: var(--rej); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: none; outline: none; font-size: 15px; color: var(--t1);
  background: transparent; font-family: inherit;
}
.field input::placeholder, .field textarea::placeholder { color: var(--t3); }
.field select { appearance: none; -webkit-appearance: none; background: transparent; }
.field textarea { resize: none; min-height: 52px; }
.field .with-arrow { position: relative; }
.field .with-arrow::after {
  content: ""; position: absolute; right: 2px; top: 7px;
  width: 8px; height: 8px; border-right: 1.6px solid var(--t3); border-bottom: 1.6px solid var(--t3); transform: rotate(45deg);
}
.field .suffix-wrap { display: flex; align-items: center; gap: 8px; }
.field .suffix-wrap input { flex: 1; }
.field .suffix-wrap .suffix { font-size: 13px; color: var(--t2); flex: none; }

/* 单选药丸（优先级 / 类别） */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 13px; padding: 7px 14px; border-radius: 10px; background: #f4f5f7; color: var(--t2); cursor: pointer; border: 1.4px solid transparent; }
.pill.on { background: #eef1fd; color: var(--primary); border-color: var(--primary); font-weight: 600; }

.submit-btn {
  width: 100%; margin-top: 16px; padding: 14px; border: none; border-radius: 13px;
  font-size: 16px; font-weight: 600; color: #fff; cursor: pointer; letter-spacing: 1px;
  background: var(--primary-grad); box-shadow: var(--shadow-lg);
}
.submit-btn:active { opacity: .92; transform: translateY(1px); }
.form-tip { font-size: 12px; color: var(--t3); text-align: center; margin-top: 12px; }

/* ------------------------------ 统计视图 ------------------------------ */
.stat-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.stat-hero .sh {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 15px; position: relative; overflow: hidden;
}
.stat-hero .sh .sh-num { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-hero .sh .sh-lbl { font-size: 12px; color: var(--t2); margin-top: 6px; }
.stat-hero .sh .sh-ic { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.stat-hero .sh .sh-ic svg { width: 17px; height: 17px; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 15px 8px; }
.panel + .panel { margin-top: 12px; }
.panel .p-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel .p-title { font-size: 14.5px; font-weight: 600; }
.panel .p-extra { font-size: 12px; color: var(--t2); }

/* 通过率环形（CSS conic-gradient） */
.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 4px 2px 12px; }
.donut { width: 96px; height: 96px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%; }
.donut .d-center { position: relative; z-index: 1; text-align: center; }
.donut .d-center b { font-size: 22px; font-weight: 800; color: var(--t1); }
.donut .d-center span { display: block; font-size: 10.5px; color: var(--t2); }
.donut-legend { flex: 1; }
.donut-legend .lg { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; }
.donut-legend .lg .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.donut-legend .lg .lg-val { margin-left: auto; font-weight: 700; color: var(--t1); }

/* 横向条形 */
.bars { padding-bottom: 6px; }
.bar-row { margin-bottom: 13px; }
.bar-row:last-child { margin-bottom: 8px; }
.bar-row .bl { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar-row .bl .bl-name { color: var(--t1); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.bar-row .bl .bl-val { color: var(--t2); font-size: 12.5px; }
.bar-row .bl .bl-val b { color: var(--t1); font-size: 13.5px; }
.bar-track { height: 9px; border-radius: 6px; background: #eef0f4; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 6px; transition: width .6s cubic-bezier(.2,.8,.3,1); }

/* 预算概览条 */
.budget-split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 4px 0 14px; }
.budget-split i { height: 100%; }
.budget-legend { display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 8px; }
.budget-legend .bg-item { font-size: 12px; color: var(--t2); }
.budget-legend .bg-item .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }
.budget-legend .bg-item b { display: block; font-size: 15px; color: var(--t1); margin-top: 2px; }

/* ------------------------------ 底部导航 ------------------------------ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 40;
}
.tabbar .tab {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--t3); cursor: pointer; font-size: 11px;
}
.tabbar .tab svg { width: 23px; height: 23px; }
.tabbar .tab.active { color: var(--primary); }
.tabbar .tab.active span { font-weight: 600; }
.tab-dot {
  display: none; position: absolute; top: 6px; left: 50%; margin-left: 6px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--rej); color: #fff; font-size: 10px; font-weight: 700; font-style: normal;
  line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff;
}
.tab-dot.show { display: block; }

/* ------------------------------ 弹层 / 详情 ------------------------------ */
.mask { position: fixed; inset: 0; background: rgba(20, 26, 38, .45); z-index: 50; display: none; align-items: flex-end; justify-content: center; }
.mask.show { display: flex; animation: fade .2s ease; }
.sheet {
  width: 100%; max-width: 430px; background: #fff;
  border-radius: 20px 20px 0 0; padding: 6px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 86vh; overflow-y: auto; animation: slideUp .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grip { width: 38px; height: 4px; border-radius: 4px; background: #e2e5ea; margin: 8px auto 14px; }

/* 项目详情头 */
.pd-head { margin-bottom: 14px; }
.pd-head .pd-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.pd-head h3 { font-size: 18px; line-height: 1.35; }
.pd-head .pd-code { font-size: 12px; color: var(--t3); margin-top: 5px; font-variant-numeric: tabular-nums; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.detail-grid .d-item { background: #f7f8fa; border-radius: 11px; padding: 11px 12px; }
.detail-grid .d-item.full { grid-column: 1 / -1; }
.detail-grid .d-lbl { font-size: 11.5px; color: var(--t2); }
.detail-grid .d-val { font-size: 15px; font-weight: 600; color: var(--t1); margin-top: 3px; }
.detail-grid .d-val.big { font-size: 19px; }
.detail-grid .d-val small { font-size: 12px; color: var(--t2); font-weight: 500; }

.pd-desc { background: #f7f8fa; border-radius: 11px; padding: 12px 13px; margin-top: 10px; font-size: 13px; color: var(--t1); line-height: 1.6; }

/* 审批时间线 */
.timeline { margin: 6px 2px 4px; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; z-index: 1; }
.tl-dot svg { width: 14px; height: 14px; }
.tl-dot.submit { background: var(--t3); }
.tl-dot.approved { background: var(--ok); }
.tl-dot.rejected { background: var(--rej); }
.tl-dot.wait { background: #fff; border: 2px dashed #ccd2da; }
.tl-dot.wait::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ccd2da; }
.tl-body { flex: 1; min-width: 0; padding-top: 1px; }
.tl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tl-title { font-size: 14px; font-weight: 600; color: var(--t1); }
.tl-title .who { color: var(--t2); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.tl-time { font-size: 11.5px; color: var(--t3); flex: none; }
.tl-comment { font-size: 12.5px; color: var(--t2); margin-top: 4px; background: #f7f8fa; border-radius: 8px; padding: 8px 10px; line-height: 1.55; }
.tl-comment.rej { background: var(--rej-bg); color: #c92a2a; }
.tl-wait-label { font-size: 13px; color: var(--t3); padding-top: 2px; }

/* 详情操作按钮 */
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions button { flex: 1; padding: 13px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.sheet-actions .b-rej { background: var(--rej-bg); color: var(--rej); }
.sheet-actions .b-ok  { background: linear-gradient(135deg, #37b24d, #2f9e44); color: #fff; box-shadow: 0 6px 16px rgba(47,158,68,.3); flex: 1.4; }
.sheet-note { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--t3); background: #f7f8fa; border-radius: 10px; padding: 11px; }
.sheet-note.done { color: var(--ok); background: var(--ok-bg); }
.sheet-note.rejnote { color: var(--rej); background: var(--rej-bg); }

/* 审批意见表单（弹层内二级） */
.approve-form h3 { font-size: 17px; margin-bottom: 4px; }
.approve-form .af-sub { font-size: 12.5px; color: var(--t2); margin-bottom: 14px; }
.approve-form .af-proj { background: #f7f8fa; border-radius: 11px; padding: 11px 13px; margin-bottom: 14px; }
.approve-form .af-proj .afp-name { font-size: 14.5px; font-weight: 600; }
.approve-form .af-proj .afp-meta { font-size: 12px; color: var(--t2); margin-top: 3px; }
.approve-form textarea {
  width: 100%; border: 1.4px solid var(--line); border-radius: 11px; padding: 12px;
  font-size: 14px; font-family: inherit; color: var(--t1); outline: none; resize: none; min-height: 92px;
}
.approve-form textarea:focus { border-color: var(--primary); }
.approve-form textarea.err { border-color: var(--rej); }
.approve-form .af-quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 2px; }
.approve-form .af-quick .qc { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: #f1f3f5; color: var(--t2); cursor: pointer; }
.approve-form .af-quick .qc:active { background: #e7eaf0; }
.approve-form .af-actions { display: flex; gap: 10px; margin-top: 16px; }
.approve-form .af-actions button { flex: 1; padding: 13px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.approve-form .af-actions .cancel { background: #f1f3f5; color: var(--t2); }
.approve-form .af-actions .confirm-ok  { background: linear-gradient(135deg, #37b24d, #2f9e44); color: #fff; flex: 1.5; }
.approve-form .af-actions .confirm-rej { background: linear-gradient(135deg, #f03e3e, #e03131); color: #fff; flex: 1.5; }

/* ------------------------------ 空状态 ------------------------------ */
.empty { text-align: center; padding: 50px 20px; color: var(--t3); }
.empty svg { width: 56px; height: 56px; opacity: .5; margin-bottom: 12px; }
.empty p { font-size: 13.5px; }
.empty.done svg { color: var(--ok); opacity: .65; }

/* ------------------------------ Toast ------------------------------ */
.toast {
  position: fixed; left: 50%; top: 38%; transform: translateX(-50%); z-index: 80;
  background: rgba(28, 33, 45, .92); color: #fff; padding: 12px 20px;
  border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.toast.ok::before  { content: "✓ "; color: #69db7c; font-weight: 700; }
.toast.err::before { content: "✕ "; color: #ff8787; font-weight: 700; }

/* ------------------------------ 顶栏头像 ------------------------------ */
.h-avatar {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, .6);
}
.h-avatar .ha-dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

/* ------------------------------ 登录页 ------------------------------ */
.login-screen {
  position: absolute; inset: 0; z-index: 60; overflow-y: auto;
  background: linear-gradient(160deg, #4263eb 0%, #5f3dc4 52%, #3b2c8f 100%);
  display: flex; flex-direction: column; padding: 0 26px;
}
.login-screen.hidden { display: none; }
.login-brand { text-align: center; color: #fff; margin-top: 64px; margin-bottom: 26px; }
.login-brand .logo {
  width: 66px; height: 66px; border-radius: 19px; margin: 0 auto 16px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.login-brand .logo svg { width: 36px; height: 36px; color: #fff; }
.login-brand h1 { font-size: 23px; font-weight: 700; letter-spacing: 2px; }
.login-brand p { font-size: 13px; opacity: .8; margin-top: 7px; letter-spacing: 1px; }

.login-card { background: #fff; border-radius: 18px; padding: 22px 20px 24px; box-shadow: 0 16px 40px rgba(20, 20, 60, .24); }
.login-card .l-field {
  display: flex; align-items: center; gap: 10px;
  border: 1.4px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; transition: border-color .18s;
}
.login-card .l-field.focus { border-color: var(--primary); }
.login-card .l-field svg { width: 18px; height: 18px; color: var(--t3); flex: none; }
.login-card .l-field input { border: none; outline: none; flex: 1; font-size: 15px; background: transparent; color: var(--t1); }
.login-card .l-eye { color: var(--t3); cursor: pointer; font-size: 12px; flex: none; user-select: none; }
.login-btn {
  width: 100%; margin-top: 6px; padding: 13px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 4px; cursor: pointer;
  background: var(--primary-grad); box-shadow: 0 8px 20px rgba(66, 99, 235, .4);
}
.login-btn:active { opacity: .92; transform: translateY(1px); }

/* ------------------------------ 个人中心弹层 ------------------------------ */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 18px; }
.profile-head .p-av { width: 56px; height: 56px; border-radius: 16px; color: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.profile-head .p-name { font-size: 19px; font-weight: 700; }
.profile-head .p-meta { font-size: 12.5px; color: var(--t2); margin-top: 4px; }
.profile-head .p-role { display: inline-block; font-size: 11px; font-weight: 600; color: var(--primary); background: #eef1fd; padding: 2px 9px; border-radius: 20px; margin-top: 7px; }
.profile-stat { display: flex; background: #f7f8fa; border-radius: 13px; padding: 14px 0; margin-bottom: 16px; }
.profile-stat > div { flex: 1; text-align: center; position: relative; }
.profile-stat > div + div::before { content: ""; position: absolute; left: 0; top: 18%; height: 64%; width: 1px; background: var(--line); }
.profile-stat .ps-num { font-size: 20px; font-weight: 700; }
.profile-stat .ps-lbl { font-size: 11.5px; color: var(--t2); margin-top: 3px; }
.profile-menu { border-radius: 13px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.profile-menu .pm { display: flex; align-items: center; gap: 11px; padding: 14px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14.5px; color: var(--t1); }
.profile-menu .pm:last-child { border-bottom: none; }
.profile-menu .pm:active { background: #fafbfc; }
.profile-menu .pm svg { width: 19px; height: 19px; color: var(--t2); flex: none; }
.profile-menu .pm .pm-arrow { margin-left: auto; color: var(--t3); }
.logout-btn { width: 100%; padding: 13px; border: 1px solid #ffd7d7; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--rej); background: #fff5f5; cursor: pointer; }
.logout-btn:active { background: #ffe9e9; }

/* ------------------------------ 骨架屏 / 加载 ------------------------------ */
.skeleton { position: relative; overflow: hidden; background: #e7eaf0; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .62), transparent);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: none; }
.sk-av { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.sk-main { flex: 1; }
.sk-l1 { height: 13px; width: 62%; border-radius: 5px; margin-bottom: 9px; }
.sk-l2 { height: 11px; width: 40%; border-radius: 5px; }
.sk-r { width: 50px; height: 22px; border-radius: 6px; flex: none; }
.sk-rolebar { height: 60px; border-radius: 14px; margin-bottom: 10px; }
.sk-big { height: 150px; border-radius: 18px; }
.sk-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.sk-stat { height: 64px; border-radius: 14px; }
.sk-sec { height: 15px; width: 32%; border-radius: 5px; margin: 20px 2px 12px; }
.sk-search { height: 38px; border-radius: 12px; margin-bottom: 12px; }
.sk-chips { display: flex; gap: 8px; margin-bottom: 12px; }
.sk-chip { width: 64px; height: 32px; border-radius: 20px; flex: none; }
.sk-field { height: 36px; border-radius: 7px; margin: 15px 0; }
.sk-btn { height: 48px; border-radius: 13px; margin-top: 16px; }
.sk-panel { height: 150px; border-radius: 14px; margin-bottom: 12px; }

/* 按钮加载转圈 */
.spinner { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-btn.loading, .submit-btn.loading, .af-actions button.loading { opacity: .9; cursor: default; }
.af-actions .cancel.loading .spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--t2); }
