/* ==========================================================================
   项目报备管理平台 · 蓝白主题
   ========================================================================== */
:root {
  --brand-900: #082044;
  --brand-800: #0c2b58;
  --brand-700: #10396f;
  --brand-600: #14498c;
  --brand-500: #1667d6;
  --brand-450: #2f7ae5;
  --brand-300: #86b4f4;
  --brand-100: #dbe9fc;
  --brand-50: #eff6ff;

  --ink: #10233d;
  --ink-2: #33496a;
  --ink-3: #63799a;
  --ink-4: #93a5bf;

  --line: #e3ecf8;
  --line-2: #eef3fa;
  --bg: #f2f6fc;
  --white: #ffffff;

  --ok: #0d7a45;
  --ok-bg: #e9f7ef;
  --warn: #a3600a;
  --warn-bg: #fff4e4;
  --danger: #c02626;
  --danger-bg: #fdecec;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --shadow-1: 0 1px 2px rgba(10, 38, 80, .05), 0 4px 14px rgba(10, 38, 80, .05);
  --shadow-2: 0 6px 24px rgba(10, 38, 80, .09);
  --shadow-3: 0 24px 60px rgba(6, 26, 58, .18);

  --sidebar-w: 272px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-500); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button, input, select, textarea { font-family: inherit; font-size: 16px; color: var(--ink); }
::selection { background: var(--brand-100); }

/* 内联图标默认尺寸，避免 SVG 撑开容器 */
.ic { width: 20px; height: 20px; flex: none; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  font-size: 16px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--brand-500); color: #fff;
  cursor: pointer; white-space: nowrap;
  transition: background .16s, box-shadow .16s, transform .06s, color .16s, border-color .16s;
}
.btn:hover { background: #1159bd; box-shadow: 0 6px 18px rgba(22, 103, 214, .28); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 20px; height: 20px; }

.btn-lg { height: 54px; padding: 0 30px; font-size: 17px; border-radius: 12px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 15px; border-radius: 8px; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); box-shadow: none; }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); box-shadow: none; }
.btn-danger { background: #d63b3b; }
.btn-danger:hover { background: #bc2f2f; box-shadow: 0 6px 18px rgba(214, 59, 59, .25); }
.btn-danger-ghost { background: #fff; color: var(--danger); border-color: #f3d2d2; }
.btn-danger-ghost:hover { background: var(--danger-bg); box-shadow: none; }
.btn-ok { background: #12915a; }
.btn-ok:hover { background: #0e7c4c; box-shadow: 0 6px 18px rgba(18, 145, 90, .25); }
.btn-block { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  color: var(--brand-500); font-size: 15.5px; font-weight: 600; border-radius: 6px;
}
.link-btn:hover { background: var(--brand-50); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-bg); }

/* ---------------- 登录页 ---------------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  background: linear-gradient(135deg, #071c3c 0%, #0e3466 42%, #1657a8 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(70, 150, 255, .32), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(38, 120, 230, .26), transparent 48%);
}
.login-page::after {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 40%, #000, transparent 72%);
}
.login-hero, .login-panel { position: relative; z-index: 1; }
.login-hero {
  padding: 72px 76px; color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.login-hero .brand-mark { width: 62px; height: 62px; border-radius: 18px; }
.login-hero h1 { font-size: 44px; line-height: 1.22; margin: 34px 0 20px; letter-spacing: -.02em; }
.login-hero h1 span { color: #8ec0ff; }
.login-hero p.lead { font-size: 19px; line-height: 1.85; color: rgba(255,255,255,.82); max-width: 520px; margin: 0 0 44px; }
.hero-points { display: grid; gap: 18px; max-width: 520px; }
.hero-point { display: flex; gap: 14px; align-items: flex-start; font-size: 16.5px; color: rgba(255,255,255,.9); }
.hero-point .dot {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  background: rgba(255,255,255,.14); display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18);
}
.hero-point svg { width: 15px; height: 15px; stroke: #a9cdff; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card {
  width: 100%; max-width: 452px; background: #fff; border-radius: 24px;
  padding: 46px 44px 40px; box-shadow: var(--shadow-3);
}
.login-card h2 { font-size: 27px; margin-bottom: 8px; }
.login-card .sub { color: var(--ink-3); font-size: 15.5px; margin: 0 0 30px; }
.login-card .divider {
  display: flex; align-items: center; gap: 14px; color: var(--ink-4);
  font-size: 13.5px; margin: 26px 0 22px;
}
.login-card .divider::before, .login-card .divider::after {
  content: ""; height: 1px; flex: 1; background: var(--line);
}
.btn-wecom {
  width: 100%; height: 56px; font-size: 17.5px; border-radius: 12px;
  background: #1a7ee6; box-shadow: 0 10px 26px rgba(26, 126, 230, .3);
}
.btn-wecom:hover { background: #1470d2; }
.login-foot { margin-top: 26px; font-size: 14px; color: var(--ink-4); line-height: 1.8; }
.dev-box { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 20px; }
.dev-box .t { font-size: 13.5px; color: var(--ink-4); margin-bottom: 12px; letter-spacing: .02em; }
.dev-box .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 登录方式切换 */
.login-tabs {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 24px;
  background: #f2f6fc; border: 1px solid var(--line-2); border-radius: 12px;
}
.login-tab {
  flex: 1; height: 42px; border: 0; background: none; border-radius: 9px;
  font-size: 15.5px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.login-tab:hover { color: var(--brand-600); }
.login-tab.active { background: #fff; color: var(--brand-600); box-shadow: 0 2px 10px rgba(10, 38, 80, .1); }
.login-card #loginForm .input { height: 50px; font-size: 16.5px; }
.login-card #loginForm .btn { margin-top: 6px; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(178deg, #0a2550 0%, #0f3a72 52%, #12498f 100%);
  color: #fff; display: flex; flex-direction: column; z-index: 40;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 80% 0%, rgba(86, 160, 255, .22), transparent 55%);
}
.brand-block {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 24px 26px; position: relative; z-index: 1;
}
.brand-block .names { min-width: 0; }
.brand-block .n1 { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand-block .n2 { font-size: 12.5px; color: rgba(255,255,255,.55); letter-spacing: .16em; text-transform: uppercase; margin-top: 2px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 6px 18px rgba(4, 22, 48, .35);
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }

.nav { padding: 6px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; flex: 1; overflow-y: auto; }
.nav-title {
  font-size: 12.5px; color: rgba(255,255,255,.42); letter-spacing: .12em;
  padding: 18px 12px 8px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 11px; color: rgba(255,255,255,.82);
  font-size: 16.5px; font-weight: 500; cursor: pointer; position: relative;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; border-color: rgba(255,255,255,.14); }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: #7db4ff;
}
.nav-item svg { width: 21px; height: 21px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; opacity: .92; }
.nav-badge {
  margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px;
  border-radius: 12px; background: #ff6b4a; color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.sidebar-foot {
  padding: 16px 22px 22px; border-top: 1px solid rgba(255,255,255,.1);
  position: relative; z-index: 1; font-size: 13px; color: rgba(255,255,255,.45);
  display: flex; align-items: center; gap: 8px;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 76px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 32px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 19px; font-weight: 700; }
.topbar .page-desc { font-size: 14.5px; color: var(--ink-3); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.user-chip {
  display: flex; align-items: center; gap: 11px; padding: 6px 14px 6px 6px;
  border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover;
  background: linear-gradient(150deg, #4b93f0, #1a63c8); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(10,38,80,.14);
}
.user-chip .u-name { font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.user-chip .u-role { font-size: 12.5px; color: var(--brand-600); font-weight: 600; }
.role-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.role-tag.admin { background: #fff1e0; color: #a3600a; border: 1px solid #ffd9a8; }
.role-tag.user { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }

.content { padding: 28px 32px 56px; flex: 1; }
.content-inner { max-width: 1440px; margin: 0 auto; }

/* ---------------- 卡片 / 统计 ---------------- */
.card {
  background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.card + .card { margin-top: 20px; }
.card-head {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 18px; }
.card-head .sub { font-size: 14.5px; color: var(--ink-3); }
.card-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.card-body { padding: 24px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: var(--brand-50);
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-500); position: relative; z-index: 1;
}
.stat-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.stat-icon.warn { background: var(--warn-bg); color: var(--warn); }
.stat-icon.ok { background: var(--ok-bg); color: var(--ok); }
.stat-icon.gray { background: #f0f4fa; color: var(--ink-3); }
.stat-meta { position: relative; z-index: 1; min-width: 0; }
.stat-label { font-size: 14.5px; color: var(--ink-3); font-weight: 500; }
.stat-value { font-size: 34px; font-weight: 700; line-height: 1.14; letter-spacing: -.02em; margin-top: 2px; }
.stat-value small { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-size: 15px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.req { color: #d63b3b; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px;
  background: #fbfdff; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 116px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-400, #3b86ea); background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 103, 214, .12);
}
.select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363799a' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px;
}
.hint { font-size: 13.5px; color: var(--ink-4); line-height: 1.6; }
/* 只读 / 禁用输入框：与可编辑框明确区分 */
.input:disabled, .select:disabled, .textarea:disabled,
.input[readonly], .textarea[readonly] {
  background: #f2f5fa; border-color: #e3e9f2; color: var(--ink-2, #4a5b74);
  cursor: not-allowed; box-shadow: none;
}
.input:disabled:focus, .select:disabled:focus, .textarea:disabled:focus,
.input[readonly]:focus, .textarea[readonly]:focus {
  border-color: #e3e9f2; box-shadow: none; background: #f2f5fa;
}
.field-error { font-size: 13.5px; color: var(--danger); }

/* ---------------- 附件上传 ---------------- */
.upload-box {
  border: 1.5px dashed var(--brand-100); border-radius: var(--r);
  background: #fbfdff; padding: 14px 16px 16px;
}
.upload-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-head .btn-sm { height: 38px; padding: 0 14px; }
.upload-head .hint { margin-left: auto; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.fi-thumb {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover;
  background: var(--brand-50); border: 1px solid var(--line-2); flex: none;
}
.fi-thumb.pdf, .ai-thumb .pdf-tag {
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  color: #b04a4a; background: #fdf2f2; letter-spacing: .04em;
}
.fi-meta { min-width: 0; flex: 1; }
.fi-name {
  font-size: 14.5px; color: var(--ink); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fi-size { font-size: 13px; color: var(--ink-4); margin-top: 2px; }
.fi-del {
  width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px;
  background: #f4f7fc; color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
}
.fi-del:hover { background: var(--danger-bg); color: var(--danger); }
.fi-del svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.upload-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 18px 10px; color: var(--ink-4); font-size: 14.5px;
  background: #fff; border: 1px dashed var(--line); border-radius: 10px; margin-top: 12px;
}
.upload-empty svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.upload-tip {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px;
  font-size: 14px; color: var(--brand-600); line-height: 1.6;
}
.upload-tip svg { width: 16px; height: 16px; flex: none; margin-top: 3px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 已上传附件 */
.attach-block { margin-top: 22px; }
.attach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.attach-title { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.attach-head .cnt {
  font-size: 13px; font-weight: 700; color: var(--brand-600);
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 7px; padding: 1px 8px;
}
.attach-head .hint { margin-left: auto; }
.attach-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.attach-grid.small { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.attach-item {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.attach-item:hover { border-color: var(--brand-300); box-shadow: 0 4px 14px rgba(12, 43, 88, .08); }
.ai-thumb {
  display: block; height: 108px; background: #f4f8fd;
  border-bottom: 1px solid var(--line-2); overflow: hidden;
}
.attach-grid.small .ai-thumb { height: 92px; }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-thumb .pdf-tag { width: 100%; height: 100%; font-size: 15px; }
.ai-meta { padding: 9px 11px 11px; }
.ai-name {
  font-size: 13.5px; color: var(--ink-2); font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; min-height: 2.9em;
}
.ai-sub { font-size: 12.5px; color: var(--ink-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-del {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0;
  border-radius: 7px; background: rgba(255, 255, 255, .92); color: var(--ink-2);
  cursor: pointer; display: grid; place-items: center; opacity: .9;
  box-shadow: 0 1px 5px rgba(8, 26, 54, .14); transition: opacity .15s, color .15s, background .15s;
}
.attach-item:hover .ai-del { opacity: 1; }
.ai-del:hover { background: #fff; color: var(--danger); }
.ai-del svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.filter-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  padding: 18px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-1); margin-bottom: 18px;
}
.filter-bar .input, .filter-bar .select { height: 44px; font-size: 15.5px; }
.search-box { position: relative; flex: 1; min-width: 240px; max-width: 380px; }
.search-box .input { padding-left: 42px; }
.search-box svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; stroke: var(--ink-4); fill: none; stroke-width: 2;
}
.filter-bar .select { min-width: 132px; width: auto; }
.filter-bar .spacer { flex: 1; }

.align-right { text-align: right; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 16px; }
table.data thead th {
  background: #f7fafe; color: var(--ink-3); font-size: 14.5px; font-weight: 700;
  text-align: left; padding: 14px 18px; white-space: nowrap;
  border-bottom: 1px solid var(--line); letter-spacing: .02em;
}
table.data tbody td {
  padding: 17px 18px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; color: var(--ink-2);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f8fbff; }
.no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; color: var(--brand-600); font-weight: 600; white-space: nowrap; }
table.data .strong { color: var(--ink); font-weight: 600; }
table.data .muted { color: var(--ink-4); font-size: 14px; }
table.data .money { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
table.data td.ops { white-space: nowrap; }
table.data td.ops .link-btn { padding: 4px 8px; }
table.data td.nw { white-space: nowrap; }
/* 账号表列较多，保证不挤压姓名等列，超出横向滚动 */
table.data.data-accounts { min-width: 1010px; font-size: 15px; }
table.data.data-accounts th, table.data.data-accounts td {
  white-space: nowrap; padding-left: 10px; padding-right: 10px;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.pending { background: var(--warn-bg); color: var(--warn); border-color: #ffe0b2; }
.pill.approved { background: var(--ok-bg); color: var(--ok); border-color: #bfe9d1; }
.pill.rejected { background: var(--danger-bg); color: var(--danger); border-color: #f6cfcf; }
.pill.expired { background: #f0f3f8; color: #6c7f99; border-color: #e2e8f1; }
.pill.plain { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }
.pill.plain::before { display: none; }

.pager { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line-2); }
.pager .info { font-size: 14.5px; color: var(--ink-3); margin-right: auto; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--brand-300); color: var(--brand-600); }
.pager button.active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 空状态 / 加载 ---------------- */
.empty { padding: 64px 24px; text-align: center; }
.empty .art {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 20px;
  background: var(--brand-50); display: grid; place-items: center;
}
.empty .art svg { width: 36px; height: 36px; stroke: var(--brand-300); fill: none; stroke-width: 1.6; }
.empty h4 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-3); font-size: 15px; margin: 0 0 20px; }

.skeleton { padding: 20px; }
.sk-line { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #eef3fa 25%, #f7fafd 50%, #eef3fa 75%); background-size: 300% 100%; animation: sk 1.3s infinite; margin-bottom: 14px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.spinner.dark { border-color: rgba(22,103,214,.25); border-top-color: var(--brand-500); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 26, 54, .48); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 40px;
  z-index: 100; overflow-y: auto; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 660px; background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--shadow-3); animation: rise .2s ease; overflow: hidden;
}
.modal.wide { max-width: 860px; }
.modal.wide .modal-body { max-height: 74vh; }
.modal.narrow { max-width: 480px; }
@keyframes rise { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: flex-start; gap: 14px; padding: 24px 28px;
  border-bottom: 1px solid var(--line-2);
}
.modal-head h3 { font-size: 20px; }
.modal-head .sub { font-size: 14.5px; color: var(--ink-3); margin-top: 4px; }
.modal-head .x {
  margin-left: auto; width: 36px; height: 36px; border-radius: 9px; border: 0;
  background: #f4f7fc; color: var(--ink-3); cursor: pointer; font-size: 20px;
  display: grid; place-items: center; flex: none;
}
.modal-head .x:hover { background: #e9eefa; color: var(--ink); }
.modal-body { padding: 26px 28px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 12px; padding: 18px 28px;
  border-top: 1px solid var(--line-2); background: #fbfdff;
}
.modal-foot .spacer { flex: 1; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.kv .k { font-size: 13.5px; color: var(--ink-4); margin-bottom: 3px; }
.kv .v { font-size: 16px; color: var(--ink); font-weight: 500; word-break: break-word; }
.kv .full { grid-column: span 2; }
.kv .v.block { font-weight: 400; color: var(--ink-2); line-height: 1.8; white-space: pre-wrap; }

.timeline { margin-top: 6px; }
.tl-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line);
}
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 2px;
  background: #fff; border: 3px solid var(--brand-300); z-index: 1;
}
.tl-dot.ok { border-color: #3ec282; }
.tl-dot.bad { border-color: #ec8a8a; }
.tl-body .t { font-size: 15px; font-weight: 600; }
.tl-body .d { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.tl-body .m { font-size: 13px; color: var(--ink-4); margin-top: 3px; }

/* ---------------- 提示 ---------------- */
.alert {
  display: flex; gap: 12px; padding: 15px 18px; border-radius: var(--r);
  font-size: 15px; line-height: 1.7; border: 1px solid;
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 2; }
.alert.info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.alert.warn { background: var(--warn-bg); border-color: #ffe1b8; color: var(--warn); }
.alert.danger { background: var(--danger-bg); border-color: #f6d0d0; color: var(--danger); }
.alert.ok { background: var(--ok-bg); border-color: #c6ebd6; color: var(--ok); }
.alert + .alert { margin-top: 12px; }

.toast-wrap {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 13px 22px;
  background: #0f2b52; color: #fff; border-radius: 11px; font-size: 15.5px; font-weight: 500;
  box-shadow: 0 14px 40px rgba(6, 26, 58, .3); animation: toastIn .22s ease;
  max-width: 80vw;
}
.toast.ok { background: #0e7c4c; }
.toast.err { background: #b82828; }
.toast svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2.4; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------------- 审批卡片 ---------------- */
.review-grid { display: grid; gap: 16px; }
.review-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-400, #3b86ea);
  border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow-1);
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.review-card .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.review-card h4 { font-size: 18.5px; }
.review-card .cust { font-size: 15.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.review-card .cust .ic { width: 18px; height: 18px; color: var(--ink-4); }
.review-card .meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-3); margin-top: 8px; }
.review-card .meta b { color: var(--ink-2); font-weight: 600; }
.review-card .meta .no-attach b { color: var(--warn); }
.review-card .desc { font-size: 15px; color: var(--ink-3); margin-top: 10px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review-actions { display: flex; gap: 10px; }

/* ---------------- 页面头 ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head h2 { font-size: 25px; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; font-size: 15px; color: var(--ink-3); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 18px; }
.section-title .bar { width: 4px; height: 18px; border-radius: 2px; background: var(--brand-500); }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px dashed var(--line); }

.success-box { text-align: center; padding: 26px 10px 8px; }
.narrow-card { max-width: 720px; margin: 0 auto; }
.success-box .big {
  width: 78px; height: 78px; border-radius: 50%; background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 22px;
}
.success-box .big svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.success-box h3 { font-size: 23px; margin-bottom: 8px; }
.success-box p { color: var(--ink-3); font-size: 15.5px; margin: 0 0 6px; }
.success-box .no {
  display: inline-block; margin: 14px 0 24px; padding: 10px 22px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand-600); border: 1px dashed var(--brand-300);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 700;
  letter-spacing: .06em;
}

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab {
  padding: 11px 20px; font-size: 16px; font-weight: 600; color: var(--ink-3);
  background: none; border: 0; cursor: pointer; position: relative; border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--brand-600); background: var(--brand-50); }
.tab.active { color: var(--brand-600); }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--brand-500);
}
.tab .cnt { font-size: 13.5px; color: var(--ink-4); margin-left: 5px; font-weight: 600; }

/* ---------------- 说明页 ---------------- */
.doc h3 { font-size: 18px; margin: 26px 0 12px; display: flex; align-items: center; gap: 9px; }
.doc h3:first-child { margin-top: 0; }
.doc h3 .n {
  width: 26px; height: 26px; border-radius: 8px; background: var(--brand-50); color: var(--brand-600);
  font-size: 14px; display: grid; place-items: center; flex: none;
}
.doc p, .doc li { font-size: 15.5px; color: var(--ink-2); line-height: 1.9; }
.doc ul { margin: 8px 0; padding-left: 22px; }
.doc code {
  background: #f2f6fc; border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: 14px; color: var(--brand-600);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------- 响应式 ---------------- */
.nav-toggle { display: none; }
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .kv { grid-template-columns: 1fr; }
  .kv .full { grid-column: span 1; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .24s ease; box-shadow: 0 0 40px rgba(6,26,58,.4);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(8,26,54,.45); z-index: 35;
  }
  .nav-toggle {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; flex: none;
  }
  .nav-toggle svg { width: 22px; height: 22px; stroke: var(--ink-2); fill: none; stroke-width: 2; }
  .topbar { padding: 0 18px; height: 68px; }
  .topbar .page-desc { display: none; }
  .content { padding: 18px 16px 48px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; gap: 12px; }
  .stat-value { font-size: 26px; }
  .stat-icon { width: 42px; height: 42px; border-radius: 11px; }
  .user-chip .u-name, .user-chip .u-role { display: none; }
  .user-chip { padding: 4px; background: none; border: 0; }
  .hide-sm { display: none !important; }
  .review-card { grid-template-columns: 1fr; }
  .review-actions { justify-content: flex-end; }
  .modal-body { max-height: 72vh; padding: 20px; }
  .modal-head, .modal-foot { padding: 18px 20px; }
  .login-card { padding: 34px 26px; border-radius: 20px; }
  .filter-bar { padding: 14px; }
  .search-box { max-width: none; }
  table.data { font-size: 15px; min-width: 860px; }
  table.data thead th, table.data tbody td { padding: 13px 12px; }
  .card-head { flex-wrap: wrap; padding: 16px 18px; }
  .card-head .sub { flex-basis: 100%; order: 3; }
}
@media (max-width: 620px) {
  .stats { gap: 10px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 7px; padding: 14px; }
  .stat-icon { width: 34px; height: 34px; border-radius: 9px; }
  .stat-icon svg { width: 18px; height: 18px; }
  .stat-value { font-size: 21px; white-space: nowrap; }
  .stat-value small { font-size: 12px; margin-left: 3px; }
  .stat-label { font-size: 13px; }
  .card-head .sub { display: none; }
  .page-head h2 { font-size: 21px; }
  .content { padding: 16px 12px 44px; }
  .topbar { padding: 0 14px; }
  .modal { border-radius: 16px; }
  .review-card { padding: 18px; }
  .review-card h4 { font-size: 17px; }
  .attach-grid, .attach-grid.small { grid-template-columns: repeat(2, 1fr); }
  .attach-grid .ai-thumb { height: 96px; }
}
