/* ==========================================================================
   跨境电商审批系统 - 样式
   全部内联，不依赖任何外部资源（局域网可能无外网）
   ========================================================================== */

:root {
  /* 主色：参考图那套亮蓝。改这一个值，全站按钮 / 链接 / 选中态跟着变 */
  --c-primary: #2563EB;
  --c-primary-d: #1D4ED8;
  --c-primary-l: #EFF4FF;
  --c-primary-b: #BFD5FD;

  --c-bg: #F5F6F8;
  --c-bg-s: #F7F8FA;      /* 浅一档的底（跟进人条、卡片内嵌块） */
  --c-card: #FFFFFF;
  --c-border: #E9ECF2;
  --c-border-s: #F1F3F7;
  --line: #F1F3F7;        /* 列表行分隔线（历史上引用过但没定义，这里补上） */

  --t1: #111827;
  --t2: #4B5563;
  --t3: #9AA3AF;

  --s-idle-bg: #F1F3F6;  --s-idle-fg: #6B7280;
  --s-make-bg: #EFF4FF;  --s-make-fg: #2563EB;
  --s-wait-bg: #FFF5E6;  --s-wait-fg: #B45309;
  --s-ok-bg:   #E9F8EF;  --s-ok-fg:   #15803D;
  --s-bad-bg:  #FEECEC;  --s-bad-fg:  #DC2626;
  --s-pur-bg:  #F3EEFE;  --s-pur-fg:  #7C3AED;

  /* 四个强调色：KPI / 总览那几块按顺序轮着用，一眼能分清是哪一格 */
  --a-blue:   #2563EB;
  --a-green:  #16A34A;
  --a-amber:  #F59E0B;
  --a-purple: #8B5CF6;

  /* 深色侧栏（参考图的左栏）。这几项只在 .sidebar 作用域里用 */
  --sb-bg:    #141C2B;
  --sb-bg-2:  #1B2536;
  --sb-fg:    #94A3B8;
  --sb-fg-2:  #64748B;
  --sb-hi:    #E8EDF5;
  --sb-line:  rgba(255, 255, 255, .07);
  --sb-hover: rgba(255, 255, 255, .06);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-h: 0 2px 6px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
               system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--t1);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D1D8E0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #B4BEC9; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 布局 */
.app { display: flex; min-height: 100vh; }

/* 深色侧栏：参考图的左栏。整块用 #141C2B，选中项是实心蓝 pill，
   组标题压到很暗的灰蓝 —— 白底内容区一衬，层次比原来「白对白」清楚了 */
.sidebar {
  width: 250px; flex: 0 0 250px; background: var(--sb-bg);
  border-right: none;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  padding: 18px 18px 16px; border-bottom: 1px solid var(--sb-line);
}
.brand-t {
  font-size: 16.5px; font-weight: 700; letter-spacing: .2px;
  display: flex; align-items: center; gap: 10px; color: #FFF;
}
.brand-dot {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: linear-gradient(140deg, #3B82F6 0%, #1D4ED8 100%);
  box-shadow: 0 3px 12px rgba(37, 99, 235, .45);
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 14px; font-weight: 700; line-height: 1;
}
.brand-dot::after { content: "审"; }
/* 自定义企业 logo。跟 .brand-dot 同尺寸，这样有没有 logo 时文字都对齐。
   垫一层白底 + 3px 内边距：侧栏是深色的，透明底的 logo 直接放上去
   容易糊成一片，浅色 logo 更是直接看不见。 */
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: #FFF; padding: 3px; box-sizing: border-box;
  object-fit: contain; box-shadow: 0 3px 12px rgba(0, 0, 0, .28);
}
.brand-s { font-size: 11.5px; color: var(--sb-fg-2); margin-top: 8px; padding-left: 40px; }

.nav { padding: 12px 12px 6px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
.nav-group {
  font-size: 11.5px; font-weight: 600; color: var(--sb-fg-2);
  padding: 15px 12px 7px; letter-spacing: 1px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--sb-fg); font-size: 14.5px; font-weight: 500; cursor: pointer;
  margin-bottom: 3px; transition: background .14s, color .14s, box-shadow .14s;
  position: relative; user-select: none;
}
.nav-item:hover { background: var(--sb-hover); color: var(--sb-hi); }
.nav-item.on {
  background: var(--c-primary); color: #FFF; font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .38);
}
.nav-ico {
  width: 24px; flex: 0 0 24px; text-align: center;
  opacity: .9; font-size: 17px; line-height: 1;
}
.nav-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  margin-left: auto; background: #EF4444; color: #FFF;
  font-size: 11.5px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; min-width: 20px; text-align: center;
  flex: 0 0 auto; box-shadow: 0 2px 8px rgba(239, 68, 68, .45);
}
.nav-item.on .nav-badge { background: rgba(255,255,255,.25); box-shadow: none; }

/* 侧栏底部：小日历 + 四地时钟 + 我是谁。这块不参与滚动，永远钉在底部。 */
.side-panel {
  flex: 0 0 auto; border-top: 1px solid var(--sb-line);
  padding: 12px 12px 14px;
}

.cal { margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.cal-title { font-size: 12.5px; font-weight: 600; color: var(--sb-fg); flex: 1 1 auto; padding-left: 2px; }
.cal-nav {
  width: 22px; height: 22px; flex: 0 0 22px;
  border: 1px solid var(--sb-line); background: rgba(255,255,255,.04); color: var(--sb-fg);
  border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1;
  padding: 0; display: flex; align-items: center; justify-content: center;
}
.cal-nav:hover { background: var(--sb-hover); color: #FFF; }
.cal-today { width: auto; flex: 0 0 auto; padding: 0 7px; font-size: 11.5px; font-weight: 600; }
.cal-w { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.cal-w i { font-style: normal; font-size: 10.5px; color: var(--sb-fg-2); text-align: center; padding: 2px 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.cal-d {
  font-size: 11.5px; color: #C3CBD8; text-align: center;
  padding: 4px 0; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.cal-d.out { color: #414E66; }
.cal-d.today { background: var(--c-primary); color: #FFF; font-weight: 700; }

.clocks { border-top: 1px dashed var(--sb-line); padding-top: 10px; }
.clk-date { font-size: 12px; font-weight: 600; color: var(--sb-fg); margin-bottom: 7px; }
.clk-row { display: flex; align-items: baseline; gap: 6px; padding: 2.5px 0; }
.clk-t { width: 30px; flex: 0 0 30px; font-size: 12px; color: var(--sb-fg-2); }
.clk-v {
  font-size: 13.5px; font-weight: 600; color: var(--sb-hi);
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.clk-d { margin-left: auto; font-size: 10px; color: #F59E0B; }

.side-me {
  margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--sb-line);
  font-size: 11.5px; color: var(--sb-fg-2); line-height: 1.5;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏：一块横条里左标题、右账号栏。每个子项都 nowrap + 不收缩，
   窄屏时按优先级逐个收起（见文件末的媒体查询），保证账号栏永远钉在右上角。 */
.topbar {
  min-height: 58px; background: #FFF; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px; padding: 6px 20px;
  position: sticky; top: 0; z-index: 40; flex-wrap: nowrap;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .03);
}
.topbar h1 { font-size: 16px; font-weight: 600; }
.top-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 面包屑：参考图顶栏左上是「首页 / 当前页」 */
.crumb { font-size: 13px; color: var(--t3); white-space: nowrap; flex: 0 0 auto; }
.crumb-sep { font-size: 13px; color: #D3DAE3; flex: 0 0 auto; margin: 0 -4px; }
.topbar .sub {
  font-size: 12px; color: var(--t2); white-space: nowrap; flex: 0 0 auto;
  background: var(--c-bg-s); border: 1px solid var(--c-border-s);
  padding: 3px 10px; border-radius: 20px; font-variant-numeric: tabular-nums;
}
/* 顶栏右侧的状态胶囊：待办数是真的（走 bootstrap 里的待我处理），不是装饰 */
.top-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 20px;
  white-space: nowrap;
}
.top-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
.top-chip.ok { background: var(--s-ok-bg); color: var(--s-ok-fg); }
.top-chip.work { background: var(--s-make-bg); color: var(--s-make-fg); }
.spacer { flex: 1 1 auto; min-width: 0; }
.top-opt { white-space: nowrap; flex: 0 0 auto; }

.user-box { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.user-box label { font-size: 12.5px; color: var(--t3); }
.ub-txt { min-width: 0; }
.avatar-wrap { position: relative; flex: 0 0 auto; cursor: pointer; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(140deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex: 0 0 32px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}
.dot-n {
  position: absolute; top: -3px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: #EF4444; color: #FFF; box-shadow: 0 0 0 2px #FFF;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

.page { padding: 20px 22px 60px; max-width: 1500px; }

/* ---------------------------------------------------------------- 通用 */
.card {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--c-border-s);
  display: flex; align-items: center; gap: 10px;
}
/* 标题前的小蓝方块：参考图每张卡头的做法，比纯文字标题更有「块」感 */
.card-head h3 {
  font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.card-head h3::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px;
  background: var(--c-primary); flex: 0 0 4px;
}
.card-head .hint { font-size: 12px; color: var(--t3); }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-s); font-size: 13px;
  background: #FFF; border: 1px solid var(--c-border); color: var(--t1);
  transition: all .14s; white-space: nowrap;
}
.btn:hover { border-color: #CDD5DE; background: #F8FAFC; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--c-primary); border-color: var(--c-primary); color: #FFF; font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.btn-primary:hover {
  background: var(--c-primary-d); border-color: var(--c-primary-d);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .34);
}
.btn-ok { background: #15803D; border-color: #15803D; color: #FFF; font-weight: 600; }
.btn-ok:hover { background: #14532D; border-color: #14532D; }
.btn-bad { background: #FFF; border-color: #F7C9C9; color: #DC2626; }
.btn-bad:hover { background: #FEECEC; border-color: #F0A9A9; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-lg { padding: 10px 22px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 12px;
  font-weight: 600; white-space: nowrap;
}
.b-idle { background: var(--s-idle-bg); color: var(--s-idle-fg); }
.b-make { background: var(--s-make-bg); color: var(--s-make-fg); }
.b-wait { background: var(--s-wait-bg); color: var(--s-wait-fg); }
.b-ok   { background: var(--s-ok-bg);   color: var(--s-ok-fg); }
.b-bad  { background: var(--s-bad-bg);  color: var(--s-bad-fg); }
.b-plain{ background: #F1F3F6; color: var(--t2); }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 11.5px; background: #F1F3F6; color: var(--t2); margin-right: 4px;
}

.empty { padding: 46px 20px; text-align: center; color: var(--t3); font-size: 13px; }
.empty-ico { font-size: 26px; opacity: .35; margin-bottom: 8px; }

/* ---------------------------------------------------------------- 表单 */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; color: var(--t2); margin-bottom: 5px; font-weight: 600; }
.field > label .req { color: #EF4444; }
.input, .select, .textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--c-border);
  border-radius: var(--r-s); background: #FFF; color: var(--t1);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--c-primary-b);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, .1);
}
.textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.f-help { font-size: 11.5px; color: var(--t3); margin-top: 4px; }

.chk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--c-border); border-radius: var(--r-s); padding: 10px;
}
.chk {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 5px 7px; border-radius: 5px; cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
.chk:hover { background: #F6F8FB; }
.chk input { accent-color: var(--c-primary); }
.chk.on { background: var(--c-primary-l); border-color: var(--c-primary-b); }

/* 分段控件（参考图的「月度 / 季度 / 年度」那种）：
   灰底圆角容器 + 选中的那颗浮起来变白。任务总表的筛选、审批单的类型切换、
   录入的单条/批量都用它 */
.tabs {
  display: inline-flex; align-items: center; gap: 3px;
  background: #F1F3F6; border: none; border-radius: 11px; padding: 3px;
  margin-bottom: 16px; max-width: 100%; overflow-x: auto; flex-wrap: nowrap;
}
.tab {
  padding: 7px 15px; font-size: 13px; color: var(--t2);
  border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s, box-shadow .14s;
}
.tab:hover { color: var(--t1); }
.tab.on {
  background: #FFF; color: var(--c-primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

/* ---------------------------------------------------------------- 看板 */
/* KPI 卡：左边一条强调色，右上角一小片同色淡晕（参考图那四张卡的观感）。
   颜色由一个 --accent 变量统一驱动，加新色只要加一行类 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  --accent: var(--c-primary);
  background: #FFF; border: 1px solid var(--c-border); border-radius: var(--r-m);
  padding: 15px 17px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: box-shadow .16s, transform .16s;
}
.kpi:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.kpi::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.kpi::before {
  content: ""; position: absolute; right: -46px; top: -46px;
  width: 148px; height: 148px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(255,255,255,0) 70%);
  opacity: .14; pointer-events: none;
}
.kpi.k-blue { --accent: var(--a-blue); }
.kpi.k-ok   { --accent: var(--a-green); }
.kpi.k-warn { --accent: var(--a-amber); }
.kpi.k-bad  { --accent: #EF4444; }
.kpi.k-info { --accent: var(--a-purple); }
.kpi-l { font-size: 12.5px; color: var(--t2); display: flex; align-items: center; gap: 5px; }
.kpi-v {
  font-size: 27px; font-weight: 600; margin-top: 7px; letter-spacing: -.5px;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.kpi-v small { font-size: 13px; font-weight: 500; color: var(--t3); margin-left: 2px; }
.kpi-s { font-size: 11.5px; color: var(--t3); margin-top: 5px; }
.kpi.k-warn .kpi-v { color: #B45309; }
.kpi.k-bad .kpi-v  { color: #DC2626; }
.kpi.k-ok .kpi-v   { color: #15803D; }
.kpi.k-info .kpi-v { color: #7C3AED; }

.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { font-size: 13px; }
.bar-top { display: flex; justify-content: space-between; margin-bottom: 5px; }
.bar-top .n { color: var(--t2); }
.bar-top .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-rail { height: 7px; background: #F1F3F6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }

.chart-wrap { width: 100%; overflow-x: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--t2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid var(--c-border-s); font-size: 13px; cursor: pointer;
}
.mini-item:last-child { border-bottom: none; }
.mini-item:hover { background: #F8FAFC; }
.mini-item .tno { font-weight: 600; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.mini-item .mdl { color: var(--t2); }
.mini-item .rt { margin-left: auto; font-size: 12px; color: var(--t3); white-space: nowrap; }

/* ---------------------------------------------------------------- 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600;
  color: var(--t3); background: #F7F8FA; border-bottom: 1px solid var(--c-border);
  white-space: nowrap; position: sticky; top: 0; z-index: 5;
  letter-spacing: .2px;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--c-border-s); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: #F8FAFC; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .tno { font-weight: 600; color: var(--c-primary); }
.tbl-scroll { max-height: 66vh; overflow: auto; }

/* ---------------------------------------------------------------- 进度条 */
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; flex: 1; min-width: 0; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
  background: #F1F3F6; color: var(--t3); border: 2px solid transparent;
}
.step-lbl { font-size: 12px; color: var(--t3); margin-left: 7px; white-space: nowrap; }
.step-line { flex: 1; height: 2px; background: #E8EBF0; margin: 0 8px; min-width: 12px; }

.step.s-done .step-dot { background: #16A34A; color: #FFF; }
.step.s-done .step-lbl { color: #15803D; font-weight: 600; }
.step.s-done .step-line { background: #4ADE80; }
.step.s-wait .step-dot { background: #F59E0B; color: #FFF; }
.step.s-wait .step-lbl { color: #B45309; font-weight: 600; }
.step.s-bad  .step-dot { background: #EF4444; color: #FFF; }
.step.s-bad  .step-lbl { color: #DC2626; font-weight: 600; }
.step.s-open .step-dot { background: var(--c-primary-l); color: var(--c-primary-d); border-color: var(--c-primary-b); }
.step.s-open .step-lbl { color: var(--c-primary-d); font-weight: 600; }
.step.s-lock .step-dot { background: #F5F6F8; color: #C7CEDA; }
.step.s-lock .step-lbl { color: #B9C1CC; }

.pbar { height: 6px; background: #F1F3F6; border-radius: 4px; overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--c-primary); border-radius: 4px; }

/* ---------------------------------------------------------------- 环节块 */
.stage {
  border: 1px solid var(--c-border); border-radius: var(--r-m);
  margin-bottom: 14px; overflow: hidden; background: #FFF;
}
.stage.is-lock { background: #F9FAFB; border-style: dashed; }
.stage.is-wait { border-color: #FADFAF; }
.stage.is-ok   { border-color: #BBE7C9; }
.stage.is-bad  { border-color: #F7C9C9; }

.stage-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: #F8FAFC; border-bottom: 1px solid var(--c-border-s);
}
.stage.is-lock .stage-head { background: #F7F8FA; }
.stage-no {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-l); color: var(--c-primary-d);
  font-size: 12.5px; font-weight: 700;
}
.stage.is-lock .stage-no { background: #EDF0F4; color: #AEB7C2; }
.stage-name { font-size: 14px; font-weight: 600; }
.stage-meta { font-size: 12px; color: var(--t3); margin-left: auto; text-align: right; line-height: 1.5; }
.stage-body { padding: 16px; }
.stage.is-lock .stage-body { padding: 16px; }

.lock-note {
  display: flex; align-items: center; gap: 9px; font-size: 13px;
  color: var(--t3); padding: 6px 0;
}
.lock-ico { font-size: 15px; opacity: .6; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.thumb {
  width: 108px; border: 1px solid var(--c-border); border-radius: var(--r-s);
  overflow: hidden; background: #FFF; position: relative;
}
.thumb img { width: 100%; height: 88px; object-fit: cover; display: block; cursor: zoom-in; background: #F4F6FA; }
.thumb .fn {
  font-size: 11px; color: var(--t2); padding: 5px 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb .sz { font-size: 10.5px; color: var(--t3); padding: 0 7px 5px; }
.thumb .del {
  position: absolute; top: 5px; right: 5px; width: 19px; height: 19px;
  border-radius: 50%; background: rgba(255,255,255,.92); color: #DC2626;
  display: none; align-items: center; justify-content: center; font-size: 13px;
  border: 1px solid #F7C9C9;
}
.thumb:hover .del { display: flex; }
.thumb.file { display: flex; flex-direction: column; justify-content: center; height: 118px; }
.thumb.file .ico { font-size: 24px; text-align: center; opacity: .4; margin-bottom: 4px; }
/* 视频素材：比图片缩略图宽一些，能在原地直接播 */
.thumb.vid { width: 236px; }
.thumb video {
  width: 100%; height: 132px; object-fit: contain; display: block;
  background: #0B0F14; border-radius: var(--r-s) var(--r-s) 0 0;
}

.upload-zone {
  border: 1.5px dashed #CFD8E3; border-radius: var(--r-m);
  padding: 20px; text-align: center; background: #F8FAFC;
  transition: all .15s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--c-primary); background: var(--c-primary-l); }
.upload-zone .u1 { font-size: 13.5px; font-weight: 600; color: var(--t1); }
.upload-zone .u2 { font-size: 12px; color: var(--t3); margin-top: 5px; }

.review-box {
  border-top: 1px dashed var(--c-border); margin-top: 14px; padding-top: 14px;
}
.review-box .rb-title { font-size: 12.5px; font-weight: 600; color: var(--t2); margin-bottom: 9px; }
.verdict {
  display: flex; align-items: flex-start; gap: 10px;
  background: #F8FAFC; border: 1px solid var(--c-border); border-radius: var(--r-s);
  padding: 11px 13px; font-size: 13px; line-height: 1.65;
}
.verdict .who { font-weight: 600; }
.verdict.ok { background: var(--s-ok-bg); border-color: #BBE7C9; }
.verdict.bad { background: var(--s-bad-bg); border-color: #F7C9C9; }

/* ---------------------------------------------------------------- 详情 */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.info-i { min-width: 0; }
.info-i .k { font-size: 11.5px; color: var(--t3); margin-bottom: 3px; }
.info-i .v { font-size: 13.5px; word-break: break-word; }
.info-i .v.big { font-size: 17px; font-weight: 600; }

.timeline { display: flex; flex-direction: column; }
.tl-i { display: flex; gap: 11px; padding-bottom: 15px; position: relative; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i::before {
  content: ""; position: absolute; left: 5px; top: 15px; bottom: 0;
  width: 1px; background: var(--c-border);
}
.tl-i:last-child::before { display: none; }
.tl-dot {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px;
  background: #FFF; border: 2px solid var(--c-primary-b); margin-top: 3px;
}
.tl-i.ok .tl-dot { border-color: #4ADE80; background: #4ADE80; }
.tl-i.bad .tl-dot { border-color: #EF4444; background: #EF4444; }
.tl-c { font-size: 12.5px; line-height: 1.55; }
.tl-c .a { font-weight: 600; }
.tl-c .d { color: var(--t2); margin-top: 2px; }
.tl-c .t { color: var(--t3); font-size: 11.5px; margin-top: 2px; }

/* ---------------------------------------------------------------- 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(14, 22, 33, .55);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  padding: 24px;
}
.modal {
  background: #FFF; border-radius: var(--r-l); width: 100%; max-width: 520px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 12px 48px rgba(10, 20, 35, .28);
}
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--c-border-s);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--c-border-s);
  display: flex; justify-content: flex-end; gap: 10px;
}
.x-btn { margin-left: auto; color: var(--t3); font-size: 19px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.x-btn:hover { background: #F4F6FA; color: var(--t1); }

.lightbox {
  position: fixed; inset: 0; background: rgba(8, 14, 22, .93);
  display: flex; align-items: center; justify-content: center; z-index: 300;
  flex-direction: column; gap: 14px; padding: 30px;
}
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 6px; background: #FFF; }
.lightbox .lb-bar { display: flex; align-items: center; gap: 14px; color: #E7EDF4; font-size: 13px; }
.lightbox .lb-bar button { color: #E7EDF4; padding: 6px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; font-size: 13px; }
.lightbox .lb-bar button:hover { background: rgba(255,255,255,.13); }

.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 10px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  background: #1F2937; color: #FFF; box-shadow: 0 6px 22px rgba(0,0,0,.22);
  animation: tin .22s ease; max-width: 74vw;
}
.toast.ok { background: #15803D; }
.toast.bad { background: #B91C1C; }
@keyframes tin { from { opacity: 0; transform: translateY(-9px); } to { opacity: 1; transform: none; } }

.loading { padding: 60px; text-align: center; color: var(--t3); font-size: 13px; }

/* ---------------------------------------------------------------- 设置 */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F3F5F9; border: 1px solid var(--c-border);
  border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 12.5px;
}
.chip b { font-weight: 600; }
.chip .rm {
  width: 17px; height: 17px; border-radius: 50%; background: #FFF;
  color: var(--t3); display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: 1px solid var(--c-border);
}
.chip .rm:hover { background: #FEECEC; color: #DC2626; border-color: #F7C9C9; }
.chip .rm.pen:hover { background: #EEF3FB; color: #2563EB; border-color: #C7D9F8; }

/* ============================== 登录页 ============================== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 520px at 12% -10%, #DBEAFE 0%, rgba(219,234,254,0) 62%),
    radial-gradient(760px 460px at 100% 108%, #E0E7FF 0%, rgba(224,231,255,0) 60%),
    linear-gradient(170deg, #F7F9FC 0%, #F1F4F9 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 384px; background: var(--c-card);
  border: 1px solid var(--c-border); border-radius: 18px;
  box-shadow: 0 10px 40px rgba(16, 24, 40, .1), 0 2px 6px rgba(16, 24, 40, .04);
  padding: 34px 30px 26px;
}
.login-brand {
  font-size: 19px; font-weight: 700; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 11px;
}
.login-brand .brand-dot {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 32px;
  background: linear-gradient(140deg, #3B82F6 0%, #1D4ED8 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 15px; font-weight: 700; line-height: 1;
}
.login-sub { font-size: 12.5px; color: var(--t3); margin: 10px 0 24px; padding-left: 43px; }
.login-brand .brand-logo {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 32px;
  padding: 3px; background: #FFF; box-sizing: border-box;
  object-fit: contain; box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

/* 设置页「企业标识」的实时预览。故意铺深色底 —— 侧栏就是深色的，
   在白底卡片里预览根本看不出实际效果。 */
.brand-prev {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-radius: 11px; margin-bottom: 14px;
  background: var(--sb-bg, #141C2B); position: relative; overflow: hidden;
}
.brand-prev .bp-name { font-size: 15.5px; font-weight: 700; color: #FFF; letter-spacing: .2px; }
.brand-prev .bp-tag {
  position: absolute; right: 11px; top: 9px;
  font-size: 10.5px; color: rgba(255, 255, 255, .48); letter-spacing: .6px;
}
.login-lab {
  display: block; font-size: 12.5px; color: var(--t2); font-weight: 600;
  margin: 0 0 6px;
}
.login-card .input { margin-bottom: 15px; }
.login-btn { width: 100%; justify-content: center; padding: 11px; font-size: 14px; margin-top: 6px; border-radius: 9px; }
.login-err {
  background: var(--s-bad-bg); border: 1px solid #F7C9C9; color: #DC2626;
  font-size: 12.5px; padding: 9px 11px; border-radius: var(--r-s); margin-bottom: 15px;
}
.login-tip {
  font-size: 11.5px; color: var(--t3); line-height: 1.75; margin-top: 18px;
  padding-top: 15px; border-top: 1px solid var(--c-border-s);
}

/* ============================== 顶栏用户区 ============================== */
.ub-name {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.ub-role { font-size: 11.5px; color: var(--t3); line-height: 1.35; white-space: nowrap; }
.ub-menu { display: flex; gap: 6px; margin-left: 4px; flex: 0 0 auto; }
.ub-menu .btn { white-space: nowrap; }
.b-rev { background: #F3EEFE; color: #7C3AED; }

/* ============================== 我的主页 ============================== */
/* 整块做成参考图那种深色渐变问候卡：白字 + 右侧一个大数字。
   原来它是白底卡片，跟下面的 KPI 卡糊在一起、看不出是「页头」 */
.me-head {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(118deg, #16233A 0%, #1E3A8A 55%, #1D4ED8 100%);
  border: none; border-radius: var(--r-l);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .22);
  padding: 22px 24px; color: #FFF;
  position: relative; overflow: hidden;
}
.me-head::after {
  content: ""; position: absolute; right: -70px; top: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.me-head > div { position: relative; z-index: 1; }
.me-head .badge { background: rgba(255,255,255,.18); color: #FFF; }
.me-name { font-size: 19px; font-weight: 600; color: #FFF; display: flex; align-items: center; gap: 7px; }
.me-line { font-size: 13px; color: rgba(255,255,255,.78); margin-top: 9px; line-height: 1.7; max-width: 820px; }
.me-todo { margin-left: auto; text-align: right; }
.me-todo-n {
  font-size: 36px; font-weight: 700; line-height: 1; color: #4ADE80;
  font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.me-todo-n.hot { color: #FCD34D; }
.me-todo-t { font-size: 11.5px; color: rgba(255,255,255,.72); margin-top: 6px; }

.prog-t { font-size: 11px; color: var(--t3); margin-top: 3px; }
.mono { font-variant-numeric: tabular-nums; color: var(--t3); font-size: 12px; }

.feed { display: flex; flex-direction: column; }
.feed-i { padding: 11px 18px; border-bottom: 1px solid var(--c-border-s); }
.feed-i:last-child { border-bottom: none; }
.feed-i.clickable { cursor: pointer; }
.feed-i.clickable:hover { background: #F8FAFC; }
.feed-t { font-size: 13px; }
.feed-d { font-size: 11.5px; color: var(--t3); margin-top: 3px; }

/* ============================== 账号管理 ============================== */
.chip-role {
  font-size: 11px; color: var(--t2); background: #F1F3F6;
  padding: 1px 6px; border-radius: 4px;
}
.chip-acct {
  font-size: 11.5px; color: var(--t3); font-family: ui-monospace, Menlo, Consolas, monospace;
}
.chip-flag {
  font-size: 10.5px; color: #B45309; background: var(--s-wait-bg);
  padding: 1px 6px; border-radius: 4px;
}
.chip-me { border-color: var(--c-primary-b); background: var(--c-primary-l); }
.chip .rm.key { font-size: 10px; }
.chip .rm.key:hover { background: #FFF5E6; color: #B45309; border-color: #FADFAF; }
.acct-help { font-size: 12.5px; color: var(--t2); line-height: 1.95; }
.acct-help span { color: var(--c-primary-d); font-weight: 600; }

/* ---- AI 产品分析报告 ---- */
.rep-pick {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1.5px dashed var(--c-border);
  border-radius: var(--r-s); background: #F9FAFB;
  cursor: pointer; font-size: 13px; color: var(--t3);
  transition: border-color .15s, background .15s, color .15s;
}
.rep-pick:hover { border-color: var(--c-primary); background: var(--c-primary-l); color: var(--t2); }
.rep-pick.has { border-style: solid; border-color: var(--c-primary-b); background: var(--c-primary-l); color: var(--t1); }
.rep-pick.has b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-pick a { flex: none; font-size: 12.5px; color: #DC2626; text-decoration: none; }
.rep-pick a:hover { text-decoration: underline; }
.rep-ico { flex: none; font-size: 15px; line-height: 1; }
.rep-sz { flex: none; font-size: 12px; color: var(--t3); }
.rep-dot { cursor: help; }

.rep-file {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--c-border);
  border-radius: var(--r-s); background: #F9FAFB;
}
.rep-file .btn { flex: none; }
.rep-meta { flex: 1; min-width: 0; }
.rep-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-sub { font-size: 12px; color: var(--t3); margin-top: 3px; }
.rep-empty {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--t2);
  background: #F9FAFB; border: 1px dashed var(--c-border);
  border-radius: var(--r-s); padding: 12px;
}

/* ---------------------------------------------------------------- 业务审批 */
/* 起单时先挑一条流程：卡片网格 */
.ap-kinds {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
}
.ap-kind {
  border: 1px solid var(--c-border); border-radius: var(--r-m);
  padding: 14px 15px; background: #FFF; cursor: pointer;
  transition: border-color .14s, background .14s, box-shadow .14s, transform .14s;
}
.ap-kind:hover {
  border-color: var(--c-primary); background: var(--c-primary-l);
  box-shadow: var(--shadow); transform: translateY(-1px);
}
.ap-kind-t { font-size: 14px; font-weight: 600; }
.ap-kind-d {
  font-size: 12.5px; color: var(--t2); line-height: 1.62;
  margin-top: 6px; min-height: 40px;
}
.ap-kind-s {
  font-size: 11.5px; color: var(--t3); margin-top: 8px;
  padding-top: 8px; border-top: 1px dashed var(--c-border-s);
}

/* 流程步骤预览条（横向 1 → 2 → 3 …） */
.ap-track { display: flex; align-items: flex-start; flex-wrap: wrap; row-gap: 10px; }
.ap-track-item {
  display: flex; flex-direction: column; align-items: center;
  width: 112px; flex: 0 0 112px; text-align: center;
}
.ap-track-no {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-l); color: var(--c-primary-d);
  font-size: 12px; font-weight: 700;
}
.ap-track-name { font-size: 12.5px; font-weight: 600; margin-top: 7px; line-height: 1.4; }
.ap-track-role { font-size: 11px; color: var(--t3); margin-top: 3px; line-height: 1.5; }
.ap-track-line {
  flex: 1; min-width: 14px; height: 2px; border-radius: 2px;
  background: #E2E7F0; margin-top: 11px;
}

/* 步骤块里的小标题：该你提交了 / 等你审批 */
.ap-step-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--c-primary-d);
  background: var(--c-primary-l); border: 1px solid var(--c-primary-b);
  border-radius: var(--r-s); padding: 8px 12px; margin: 14px 0 12px;
}

/* 已填字段的只读展示（键值表） */
.ap-kv {
  border: 1px solid var(--c-border-s); border-radius: var(--r-s);
  overflow: hidden; margin-bottom: 12px;
}
.ap-kv-row {
  display: flex; gap: 12px; padding: 8px 12px; font-size: 13px;
  border-bottom: 1px solid var(--c-border-s); line-height: 1.6;
}
.ap-kv-row:last-child { border-bottom: none; }
.ap-kv-row:nth-child(odd) { background: #F8FAFC; }
.ap-kv-k { flex: 0 0 148px; color: var(--t2); }
.ap-kv-v { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }

/* 自定义审批单：发起人自己加的字段行（字段名 / 类型 / 内容 / 删除） */
.ap-cf {
  border: 1px solid var(--c-border-s); border-radius: var(--r-s);
  background: #FAFBFD; padding: 12px;
}
.ap-cf-empty {
  font-size: 12.5px; color: var(--t3); line-height: 1.7; padding: 2px 0 6px;
}
.ap-cf-row {
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px;
}
.ap-cf-name { flex: 0 0 200px; }
.ap-cf-type { flex: 0 0 108px; }
.ap-cf-v { flex: 1; min-width: 0; }
.ap-cf-v[rows] { min-height: 60px; resize: vertical; }
.ap-cf-del { flex: 0 0 auto; color: var(--t2); }
/* 窄屏放不下一行四件，折成上下两行 */
@media (max-width: 900px) {
  .ap-cf-row { flex-wrap: wrap; }
  .ap-cf-name { flex: 1 1 100%; }
  .ap-cf-type { flex: 0 0 120px; }
}

/* 单头信息行 */
.ap-meta { font-size: 12.5px; color: var(--t2); line-height: 1.85; }

/* 跟进人：自定义单批下来之后由谁盯着落实。默认低调，指派到自己头上才提亮 */
.ap-follow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 7px 12px; border-radius: 8px;
  background: var(--c-bg-s); border: 1px solid var(--c-border-s);
  font-size: 13px; color: var(--t1);
}
.ap-follow-k {
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  color: var(--t2); background: #FFF; border: 1px solid var(--c-border);
  padding: 1px 8px; border-radius: 9px;
}
.ap-follow.mine { background: #FFFBEF; border-color: #FADFAF; }
.ap-follow.mine .ap-follow-k { color: #B45309; border-color: #FADFAF; }
.ap-follow-tip { font-size: 12px; color: #B45309; }

/* 完成时间节点（交期）：只有「已超期 / 临期」才出横幅 —— 都正常时挂条绿横幅
   等于没有重点，跟单头那堆灰字一个效果 */
.ap-due-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; padding: 7px 12px; border-radius: 8px;
  font-size: 13px; line-height: 1.5;
}
.ap-due-bar b { font-size: 13.5px; }
.ap-due-bar span { font-size: 12.5px; opacity: .92; }
.ap-due-bar.bad  { background: var(--s-bad-bg);  color: var(--s-bad-fg); }
.ap-due-bar.warn { background: var(--s-wait-bg); color: var(--s-wait-fg); }

/* 交期两个框：日期在前（要填就至少填它），时刻在后（选填，填了才算到分）。
   时刻框窄一点，别让「年-月-日」被挤成半行 —— 那玩意儿是每天都要点的 */
.ap-due-row { display: flex; gap: 8px; align-items: center; }
.ap-due-row input[type="date"] { flex: 1 1 auto; min-width: 0; }
.ap-due-row input[type="time"] { flex: 0 0 118px; width: 118px; }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hr { height: 1px; background: var(--c-border-s); margin: 16px 0; }
.ap-ta { resize: vertical; min-height: 68px; line-height: 1.6; }

/* 待提交的当前步：用实线蓝框顶出来，跟锁住的步骤区分开 */
.stage.is-open { border-color: var(--c-primary-b); box-shadow: 0 0 0 3px rgba(24, 95, 165, .07); }
.stage.is-open .stage-head { background: var(--c-primary-l); }
.stage.is-open .stage-no { background: var(--c-primary); color: #FFF; }

/* ============================== 站内通知 ============================== */
.note-un {
  margin-left: 8px; font-size: 12px; font-weight: 600;
  color: #C2410C; background: #FFF5E6; padding: 1px 8px; border-radius: 9px;
}
.note-i.on { background: #F3F7FF; }
.note-h { display: flex; align-items: baseline; gap: 10px; }
.note-t {
  font-size: 13.5px; font-weight: 600; color: var(--t1);
  display: flex; align-items: center; gap: 7px; min-width: 0;
}
.note-dot { width: 7px; height: 7px; border-radius: 50%; background: #EF4444; flex: 0 0 7px; }
.note-ts {
  margin-left: auto; flex: 0 0 auto;
  font-size: 11.5px; color: var(--t3); font-variant-numeric: tabular-nums;
}
.note-b { font-size: 12.5px; color: var(--t2); margin-top: 4px; line-height: 1.6; }
.note-go { margin-left: 8px; color: var(--c-primary-d); font-size: 11.5px; white-space: nowrap; }

/* 代批提示：黄色，跟普通的绿色「通过意见」区分开 */
.verdict.tip { background: #FFFBEF; border-color: #FADFAF; color: #92400E; }

/* ========================== 审批单的详细文件 ========================== */
.apf-n {
  margin-left: 8px; font-size: 12px; font-weight: 600;
  color: var(--c-primary-d); background: var(--c-primary-l);
  padding: 1px 8px; border-radius: 9px;
}
.apf-clip {
  font-size: 11.5px; color: var(--t3); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.apf-list { display: flex; flex-direction: column; }
.apf {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 16px; border-bottom: 1px solid var(--line);
}
.apf:last-child { border-bottom: none; }
.apf:hover { background: #F8FAFC; }
.apf-ico {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 7px;
  background: #F1F3F7; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.apf-ico.img { background: #F4F6FA; }
.apf-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apf-ext { font-size: 10.5px; font-weight: 700; color: var(--t2); letter-spacing: .3px; }
.apf-main { flex: 1; min-width: 0; }
.apf-name {
  font-size: 13.5px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.apf-meta {
  font-size: 11.5px; color: var(--t3); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.apf-tag {
  background: #F1F3F7; color: var(--t2); border-radius: 4px;
  padding: 0 5px; font-size: 11px;
}
.apf-note { color: var(--t2); }
/* 发起页「挑好了、还没随单上传」的附件 —— 跟已经传上去的区分开，
   免得用户以为文件已经进单子了 */
.apf-pend {
  background: #FFF4E0; color: #9A6400; border-radius: 4px;
  padding: 0 5px; font-size: 11px;
}
.apf-ico.pend { background: #FFF4E0; }
.apf-ico.pend .apf-ext { color: #9A6400; }
.apf-act { flex: 0 0 auto; display: flex; gap: 6px; white-space: nowrap; }
.apf-act .btn { text-decoration: none; }

@media (max-width: 780px) {
  .apf { flex-wrap: wrap; }
  .apf-act { flex: 1 0 100%; }
}

@media (max-width: 1180px) {
  .detail-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .sidebar { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .f2, .f3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .me-head { flex-wrap: wrap; }
  .me-todo { margin-left: 0; text-align: left; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  /* 业务审批：窄屏下键值表改上下排、流程条允许换行折断 */
  .ap-kv-row { flex-direction: column; gap: 2px; }
  .ap-kv-k { flex: none; }
  .ap-track-item { width: 88px; flex: 0 0 88px; }
  .head-actions { margin-left: 0; width: 100%; }
}

/* --------------------------------------------------------------------
   顶栏降级：按「最不常用 → 最常用」的顺序逐个收起。
   缩放到多窄（浏览器缩放同样按 CSS 像素算，所以一样生效），
   右上角的账号栏和「退出」都不会被挤走或裁掉。
   -------------------------------------------------------------------- */
@media (max-width: 1280px) { .topbar .sub { display: none; } }
@media (max-width: 1120px) { .topbar .top-export, .topbar .top-chip { display: none; } }
@media (max-width: 980px) { .topbar .top-review { display: none; } }
@media (max-width: 820px) { .ub-menu .btn:not(:last-child) { display: none; } }

/* 顶部问候横幅：参考图那张深色 greeting 卡（左侧问候语 + 右侧几个数）。
   数字全部来自后端，没有一个是编的 */
.hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(118deg, #16233A 0%, #1E3A8A 55%, #1D4ED8 100%);
  border-radius: var(--r-l); padding: 20px 22px; color: #FFF;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .22);
  position: relative; overflow: hidden; margin-bottom: 18px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-t { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.hero-s { font-size: 12.5px; color: rgba(255,255,255,.76); margin-top: 8px; line-height: 1.65; }
.hero-chips { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.hero-chip {
  background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px; padding: 9px 14px; min-width: 96px;
}
.hero-chip .k { font-size: 11.5px; color: rgba(255,255,255,.72); white-space: nowrap; }
.hero-chip .v {
  font-size: 19px; font-weight: 700; margin-top: 4px;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.hero-chip.warn .v { color: #FCD34D; }
.hero-chip.bad  .v { color: #FCA5A5; }
.hero-chip.ok   .v { color: #86EFAC; }
@media (max-width: 900px) { .hero-chips { margin-left: 0; } }

/* --------------------------------------------------------------------
   全公司看板：顶部「全公司总览」+ 上下两区的分区标题 + 审批区的行样式。
   总览那四块刻意做得比下面的 .kpi 稍大一点、左侧色条更粗 ——
   一眼能分出「这是全公司合起来看的数」还是「这是任务那半的数」。
   四块分别取蓝 / 绿 / 琥珀 / 紫，跟参考图那排 KPI 卡一个节奏。
   -------------------------------------------------------------------- */
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sum-tile {
  --accent: var(--c-primary);
  background: #FFF; border: 1px solid var(--c-border); border-radius: var(--r-m);
  padding: 15px 17px 14px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: box-shadow .16s, transform .16s;
}
.sum-tile:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.sum-tile::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.sum-tile::before {
  content: ""; position: absolute; right: -46px; top: -46px;
  width: 148px; height: 148px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(255,255,255,0) 70%);
  opacity: .14; pointer-events: none;
}
.sum-tile.s-blue   { --accent: var(--a-blue); }
.sum-tile.s-green  { --accent: var(--a-green); }
.sum-tile.s-amber  { --accent: var(--a-amber); }
.sum-tile.s-purple { --accent: var(--a-purple); }
.sum-tile.s-warn   { --accent: var(--a-amber); }
.sum-l { font-size: 12.5px; color: var(--t2); }
.sum-v {
  font-size: 28px; font-weight: 600; margin-top: 7px; letter-spacing: -.6px;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.sum-v small { font-size: 13px; font-weight: 500; color: var(--t3); margin-left: 2px; }
.sum-s { font-size: 11.5px; color: var(--t3); margin-top: 5px; }
.sum-tile.s-warn .sum-v { color: #B45309; }

.board-sec { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.board-sec h2 {
  font-size: 15px; font-weight: 600; color: var(--t1); margin: 0;
  position: relative; padding-left: 11px; white-space: nowrap;
}
.board-sec h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 2px; background: var(--c-primary);
}
.board-sec .hint { font-size: 12px; color: var(--t3); white-space: nowrap; }
.board-sec-line { flex: 1; height: 1px; background: var(--c-border-s); min-width: 20px; }

/* 「卡在谁手上」：一档一行，行里挂可点的单号 */
.apk-hold { padding: 11px 0; border-bottom: 1px solid var(--c-border-s); }
.apk-hold:last-child { border-bottom: none; }
.apk-hold-top { display: flex; align-items: baseline; gap: 9px; font-size: 13px; }
.apk-role { font-weight: 600; color: var(--t1); white-space: nowrap; }
.apk-who { color: var(--t2); font-size: 12.5px; flex: 1; }
.apk-cnt { font-size: 12.5px; color: var(--t3); white-space: nowrap; }
.apk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.apk-chip {
  font-size: 11.5px; color: var(--c-primary); background: var(--c-primary-l);
  border-radius: 4px; padding: 2px 7px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.apk-chip:hover { background: var(--c-primary-b); }
.apk-sub { font-size: 11.5px; color: var(--t3); margin-top: 5px; }
.apk-sub b { font-weight: 600; }
.apk-over { color: #DC2626; }
.apk-soon { color: #B45309; }
.apk-more { padding: 10px 16px 2px; font-size: 12px; color: var(--t3); }
.empty-s { font-size: 12px; color: var(--t3); margin-top: 6px; }

@media (max-width: 1100px) {
  .sum-grid { grid-template-columns: repeat(2, 1fr); }
  .board-sec .hint { display: none; }
}
