/* ==========================================================================
   别墅室内装修 · 项目管理系统  样式表
   ========================================================================== */

:root {
  --navy-900: #12263d;
  --navy-800: #1b3a5c;
  --navy-700: #24507c;
  --navy-100: #e8eef6;
  --gold-500: #c99342;
  --gold-400: #e8b464;
  --gold-100: #fbf3e4;
  --ink-900: #1c2430;
  --ink-700: #46536a;
  --ink-500: #7a869a;
  --ink-300: #b9c2d0;
  --line: #e4e9f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --green: #17a673;
  --green-bg: #e6f7f1;
  --red: #e0574d;
  --red-bg: #fdeceb;
  --orange: #e08b2e;
  --orange-bg: #fdf2e2;
  --blue: #2f7fd4;
  --blue-bg: #e9f2fc;
  --purple: #7b61ff;
  --purple-bg: #efecff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(28, 36, 48, .06), 0 8px 24px rgba(28, 36, 48, .05);
  --shadow-lg: 0 12px 40px rgba(18, 38, 61, .18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.boot {
  display: flex; align-items: center; justify-content: center;
  height: 100vh; color: var(--ink-500); font-size: 15px;
}

a { color: var(--navy-700); text-decoration: none; }
button { font-family: inherit; }

/* ------------------------------- 登录页 ------------------------------- */

.login-wrap {
  display: flex; min-height: 100vh;
}
.login-brand {
  flex: 1.15;
  background:
    radial-gradient(1000px 500px at 15% 15%, rgba(232,180,100,.20), transparent 60%),
    linear-gradient(150deg, #12263d 0%, #1b3a5c 45%, #24507c 100%);
  color: #fff;
  padding: 60px 64px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: linear-gradient(140deg, rgba(232,180,100,.22), transparent 70%);
}
.brand-logo { display: flex; align-items: center; gap: 14px; font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.brand-logo .mark {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.2);
}
.login-brand h1 { font-size: 40px; line-height: 1.35; margin: 0 0 18px; font-weight: 600; letter-spacing: 1px; }
.login-brand h1 em { font-style: normal; color: var(--gold-400); }
.login-brand p { color: rgba(255,255,255,.72); font-size: 15px; line-height: 2; margin: 0; max-width: 520px; }
.brand-feats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; position: relative; z-index: 1; }
.brand-feat { max-width: 190px; }
.brand-feat b { display: block; color: var(--gold-400); font-size: 22px; margin-bottom: 6px; }
.brand-feat span { color: rgba(255,255,255,.62); font-size: 13px; line-height: 1.7; }
.brand-foot { color: rgba(255,255,255,.4); font-size: 12.5px; position: relative; z-index: 1; }

.login-panel {
  width: 470px; background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-box { width: 100%; max-width: 340px; }
.login-box h2 { margin: 0 0 6px; font-size: 24px; }
.login-box .sub { color: var(--ink-500); margin-bottom: 30px; font-size: 13.5px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--ink-700); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(36,80,124,.12);
}
.field textarea { resize: vertical; min-height: 74px; }
.field .hint { font-size: 12px; color: var(--ink-500); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--line); background: #fff; color: var(--ink-900);
  border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-300); background: #fafbfd; }
.btn-primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.btn-gold:hover { background: #b8832f; border-color: #b8832f; }
.btn-danger { color: var(--red); border-color: #f3c9c5; background: #fff; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--navy-100); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.login-tip {
  margin-top: 22px; padding: 12px 14px; background: var(--gold-100); border: 1px solid #f0e0c4;
  border-radius: 8px; font-size: 12.5px; color: #8a6a33; line-height: 1.9;
}
.login-tip b { color: #6d5223; }
.login-error {
  background: var(--red-bg); color: var(--red); padding: 10px 13px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px; border: 1px solid #f3c9c5;
}

/* -------------------------------- 布局 -------------------------------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 226px; background: var(--navy-900); color: #fff; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo {
  padding: 20px 18px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.sidebar-logo .mark {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(232,180,100,.16);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-logo b { font-size: 14.5px; letter-spacing: .3px; display: block; }
.sidebar-logo span { font-size: 11px; color: rgba(255,255,255,.42); }

.nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  padding: 12px 12px 6px; font-size: 11px; color: rgba(255,255,255,.34);
  letter-spacing: 1.2px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: rgba(255,255,255,.76); cursor: pointer; font-size: 13.5px; margin-bottom: 2px;
  transition: all .13s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(232,180,100,.15); color: var(--gold-400); font-weight: 500; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--gold-400); border-radius: 0 3px 3px 0;
}
.nav-item .ico { width: 17px; text-align: center; flex-shrink: 0; font-size: 15px; }
.nav-item .badge-dot {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; padding: 0 5px; font-weight: 600;
}

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

.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; }
.topbar .crumb { color: var(--ink-500); font-size: 12.5px; margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-icon {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--ink-700); position: relative;
}
.topbar-icon:hover { background: var(--bg); }
.topbar-icon .badge-dot {
  position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px;
  border-radius: 20px; cursor: pointer; border: 1px solid var(--line);
}
.user-chip:hover { background: var(--bg); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy-800); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600;
}
.user-chip .meta { line-height: 1.3; }
.user-chip .meta b { font-size: 13px; display: block; }
.user-chip .meta span { font-size: 11px; color: var(--ink-500); }

.content { padding: 20px 24px 40px; flex: 1; }

.page-head { display: flex; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.page-head .desc { color: var(--ink-500); font-size: 12.5px; }
.page-head .spacer { flex: 1; }

/* -------------------------------- 卡片 -------------------------------- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head .sub { color: var(--ink-500); font-size: 12.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1400px) { .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1180px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { width: 100%; }
}

/* ---------------------------- 移动端适配（手机/平板） ---------------------------- */

.mobile-only { display: none; }
.nav-mask { display: none; }

@media (max-width: 820px) {
  .mobile-only { display: inline-flex; }

  /* 侧边导航改为抽屉式，点左上角 ☰ 展开 */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh;
    z-index: 120; transform: translateX(-100%);
    transition: transform .22s ease; width: 246px;
  }
  .layout.nav-open .sidebar { transform: none; box-shadow: 8px 0 32px rgba(18, 38, 61, .3); }
  .layout.nav-open .nav-mask {
    display: block; position: fixed; inset: 0;
    background: rgba(18, 38, 61, .45); z-index: 110; animation: fadeIn .15s;
  }

  .topbar { padding: 0 12px; gap: 10px; height: 54px; }
  .topbar h1 { font-size: 15.5px; }
  .topbar .crumb { font-size: 11px; }
  .user-chip { padding: 4px; border-color: transparent; }
  .user-chip .meta { display: none; }

  .content { padding: 14px 12px 34px; }
  .page-head h2 { font-size: 17px; }
  .card-head { padding: 13px 14px; }
  .card-body { padding: 14px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 22px; }
  .stat .ico-bg { right: 10px; top: 10px; width: 32px; height: 32px; font-size: 15px; }

  .modal-mask { padding: 14px 10px; }
  .modal-body { max-height: 72vh; padding: 16px; }
  .modal-head, .modal-foot { padding: 13px 16px; }
  .drawer { width: 100%; max-width: 100%; }
  .drawer-body { padding: 16px; }

  .filter-bar { gap: 8px; }
  .filter-bar input, .filter-bar select { min-width: 108px; flex: 1; }
  .tbl-foot { padding: 11px 12px; font-size: 12.5px; }
  .kv { grid-template-columns: 88px 1fr; }
  .timeline { padding-left: 18px; }
  .step .info .cm { padding: 7px 9px; }
  table.tbl th, table.tbl td { padding: 9px 10px; }
}

@media (max-width: 480px) {
  .login-panel { padding: 26px 20px; }
  .login-box h2 { font-size: 21px; }
  .grid { gap: 12px; }
  .stat .value { font-size: 20px; }
  .filters-inline { flex-direction: column; align-items: stretch; }
}

/* 指标卡 */
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .label { color: var(--ink-500); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 600; margin: 10px 0 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--ink-500); margin-left: 2px; }
.stat .foot { font-size: 12px; color: var(--ink-500); display: flex; align-items: center; gap: 6px; }
.stat .ico-bg {
  position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.stat.navy .ico-bg { background: var(--navy-100); }
.stat.gold .ico-bg { background: var(--gold-100); }
.stat.green .ico-bg { background: var(--green-bg); }
.stat.red .ico-bg { background: var(--red-bg); }
.stat.blue .ico-bg { background: var(--blue-bg); }
.stat.purple .ico-bg { background: var(--purple-bg); }
.stat.green .value { color: var(--green); }
.stat.red .value { color: var(--red); }
.stat.gold .value { color: #a8762b; }
.stat.blue .value { color: var(--blue); }

/* -------------------------------- 表格 -------------------------------- */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; padding: 11px 14px; background: #f8fafc; color: var(--ink-700);
  font-weight: 600; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbfd; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl .muted { color: var(--ink-500); font-size: 12.5px; }
.tbl-empty { padding: 46px; text-align: center; color: var(--ink-500); font-size: 13.5px; }
.tbl-foot {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line);
  background: #fcfdfe; flex-wrap: wrap;
}
.tbl-foot .sum { font-weight: 600; font-variant-numeric: tabular-nums; }

/* -------------------------------- 徽标 -------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent;
}
.badge.gray { background: #f1f3f7; color: var(--ink-700); border-color: #e3e8ef; }
.badge.blue { background: var(--blue-bg); color: #1f6bb8; border-color: #cfe3f8; }
.badge.green { background: var(--green-bg); color: #0d7d55; border-color: #c8ece0; }
.badge.red { background: var(--red-bg); color: #c0392b; border-color: #f7d3d0; }
.badge.orange { background: var(--orange-bg); color: #b06f16; border-color: #f5e0bd; }
.badge.purple { background: var(--purple-bg); color: #5a44cc; border-color: #ddd6ff; }
.badge.gold { background: var(--gold-100); color: #98702a; border-color: #eddfc2; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--bg);
  font-size: 12px; color: var(--ink-700); border: 1px solid var(--line);
}

/* ------------------------------- 进度条 ------------------------------- */

.bar { height: 7px; background: #eef1f6; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-700), var(--gold-500)); border-radius: 4px; transition: width .4s; }
.bar.green > i { background: linear-gradient(90deg, #14a06d, #4fd1a5); }
.bar.red > i { background: linear-gradient(90deg, #d8463c, #f0867d); }
.bar-row { display: flex; align-items: center; gap: 9px; }
.bar-row .pct { font-size: 12.5px; color: var(--ink-700); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------- 标签页 ------------------------------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.tab {
  padding: 12px 14px; font-size: 13.5px; color: var(--ink-700); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; transition: all .15s;
}
.tab:hover { color: var(--navy-800); }
.tab.active { color: var(--navy-800); border-bottom-color: var(--navy-800); font-weight: 600; }
.tab .cnt { color: var(--ink-500); font-size: 12px; margin-left: 3px; }

/* -------------------------------- 表单 -------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.filter-bar input, .filter-bar select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px;
  font-family: inherit; background: #fff; min-width: 130px;
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--navy-700); }
.filter-bar input[type="date"] { min-width: 145px; }

.switch { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }

/* -------------------------------- 模态框 -------------------------------- */

.modal-mask {
  position: fixed; inset: 0; background: rgba(18,38,61,.45); display: flex;
  align-items: flex-start; justify-content: center; z-index: 100; padding: 48px 20px;
  overflow-y: auto; animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 620px;
  box-shadow: var(--shadow-lg); animation: slideUp .18s; margin: auto 0;
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 440px; }
@keyframes slideUp { from { transform: translateY(14px); opacity: .6 } to { transform: none; opacity: 1 } }
.modal-head {
  padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .close {
  margin-left: auto; cursor: pointer; color: var(--ink-500); font-size: 20px; line-height: 1;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
}
.modal-head .close:hover { background: var(--bg); color: var(--ink-900); }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px;
  justify-content: flex-end; background: #fcfdfe; border-radius: 0 0 12px 12px;
}

/* -------------------------------- 提示 -------------------------------- */

.toast-root {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 9px; align-items: center; pointer-events: none;
}
.toast {
  background: #fff; padding: 11px 18px; border-radius: 9px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; border-left: 3px solid var(--navy-700); animation: dropIn .2s;
  max-width: 520px;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
@keyframes dropIn { from { transform: translateY(-12px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ------------------------------ 项目卡片 ------------------------------ */

.proj-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; box-shadow: var(--shadow); cursor: pointer; transition: all .16s;
}
.proj-card:hover { border-color: var(--navy-700); box-shadow: 0 6px 22px rgba(27,58,92,.12); transform: translateY(-1px); }
.proj-card .top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.proj-card .name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.proj-card .code { font-size: 11.5px; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.proj-card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-700); margin-bottom: 12px; }
.proj-card .meta span b { color: var(--ink-900); font-variant-numeric: tabular-nums; }
.proj-card .divider { height: 1px; background: var(--line); margin: 12px 0; }
.proj-card .amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.proj-card .amounts div { font-size: 11.5px; color: var(--ink-500); }
.proj-card .amounts b { display: block; font-size: 14px; color: var(--ink-900); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ------------------------------- 时间线 ------------------------------- */

.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: #fff; border: 2.5px solid var(--ink-300);
}
.tl-item.done::before { border-color: var(--green); background: var(--green); }
.tl-item.doing::before { border-color: var(--gold-500); background: var(--gold-500); box-shadow: 0 0 0 4px rgba(201,147,66,.16); }
.tl-item.fail::before { border-color: var(--red); background: var(--red); }
.tl-item .tl-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tl-meta { font-size: 12px; color: var(--ink-500); margin-top: 4px; line-height: 1.7; }

/* ------------------------------ 审批步骤条 ------------------------------ */

.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 12px; padding: 12px 0; position: relative;
}
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; background: #f1f3f7; color: var(--ink-500);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
  flex-shrink: 0; z-index: 1; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.step.done .dot { background: var(--green); color: #fff; box-shadow: 0 0 0 1px var(--green); }
.step.pending .dot { background: var(--gold-500); color: #fff; box-shadow: 0 0 0 3px rgba(201,147,66,.18); }
.step.rejected .dot { background: var(--red); color: #fff; box-shadow: 0 0 0 1px var(--red); }
.step .info { flex: 1; min-width: 0; }
.step .info .nm { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step .info .cm { font-size: 12.5px; color: var(--ink-700); margin-top: 5px; background: var(--bg); padding: 8px 11px; border-radius: 7px; line-height: 1.7; }
.step .info .tm { font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }

/* -------------------------------- 图表 -------------------------------- */

.chart { width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-700); margin-top: 10px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* ------------------------------- 其他 ------------------------------- */

.kv { display: grid; grid-template-columns: 108px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-500); }
.kv dd { margin: 0; color: var(--ink-900); word-break: break-word; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-500); font-size: 13.5px; }
.empty .ico { font-size: 34px; opacity: .3; margin-bottom: 10px; }

.section-title {
  font-size: 13px; font-weight: 600; color: var(--ink-700); margin: 18px 0 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.section-title:first-child { margin-top: 0; }

.alert-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.alert-item:last-child { border-bottom: none; }
.alert-item .ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-item .txt { flex: 1; min-width: 0; }
.alert-item .txt b { display: block; font-size: 13px; margin-bottom: 2px; }
.alert-item .txt span { font-size: 12px; color: var(--ink-500); }

.drawer-mask { position: fixed; inset: 0; background: rgba(18,38,61,.4); z-index: 90; animation: fadeIn .15s; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 520px; max-width: 92vw; background: #fff;
  z-index: 95; box-shadow: -8px 0 32px rgba(18,38,61,.16); display: flex; flex-direction: column;
}
.drawer-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.textarea-inline {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 13.5px; min-height: 68px; resize: vertical;
}
.textarea-inline:focus { outline: none; border-color: var(--navy-700); }

.loading { padding: 50px; text-align: center; color: var(--ink-500); font-size: 13.5px; }
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--navy-700);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg) } }

.role-matrix { display: grid; grid-template-columns: 200px 1fr; gap: 0; font-size: 13px; }
.role-matrix .cell { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.role-matrix .head { background: #f8fafc; font-weight: 600; color: var(--ink-700); position: sticky; top: 0; }
.perm-check { display: inline-flex; align-items: center; gap: 5px; margin: 3px 12px 3px 0; font-size: 12.5px; }
