/* 算数-建筑资质代办 CRM（外观基线参考物流系统，业务为资质代办 + 证书挂靠） */
:root {
  --bg: #f0f4f8;
  --sidebar: #1a2b3c;
  --sidebar-text: #c5d0dc;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  /* 全站字体：一套字族 + 一套 7 档字号阶梯（数据类系统偏紧凑，避免字号散乱、整体偏大） */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  --fs-root: 15px;          /* 基准字号（原 16px 偏大，整体收敛一档） */
  --fs-2xs: .68rem;         /* 10.2px 徽标 / 角标 */
  --fs-xs: .73rem;          /* 10.95px 辅助说明、元信息 */
  --fs-sm: .8rem;           /* 12px 表格表头 / 按钮 / 表单控件 */
  --fs-base: .87rem;        /* 13.05px 正文 */
  --fs-md: .93rem;          /* 13.95px 强调正文 */
  --fs-lg: 1rem;            /* 15px 小节标题 */
  --fs-xl: 1.15rem;         /* 17.25px 页面标题 */
}

* { box-sizing: border-box; }
html {
  font-size: var(--fs-root);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 表单控件默认不继承字族，统一收口，避免出现 Arial 与正文混排 */
button, input, select, textarea, optgroup {
  font-family: inherit;
  font-size: inherit;
}
code, pre, .mono { font-family: var(--font-mono); }
/* 浏览器默认 small=smaller，会让同一段说明文案出现第三种字号；统一收到辅助字号档 */
small { font-size: var(--fs-xs); }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: .01em; }
/* 标题层级对齐字号阶梯：卡片 / 小节标题比正文略大，避免标题与正文同号看不出层级 */
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #1a2b3c 0%, #0f1c28 100%);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: .55rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 50px;
  position: relative;
}
.sidebar-toggle {
  margin-left: auto;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}
.sidebar-toggle:hover { background: rgba(13,148,136,.25); color: #fff; }
.sidebar .user-box .user-meta { color: #94a3b8; font-size: 0.73rem; margin-top: .15rem; }
.sidebar .user-box .user-links { margin-top: .5rem; display: flex; gap: .7rem; }
.sidebar .user-box .user-links a { color: #94a3b8; text-decoration: none; font-size: 0.73rem; }
.sidebar .user-box .user-links a:hover { color: #0d9488; }

/* ---- 侧栏收起态（仅在用户主动收起时生效，不做自动收缩） ---- */
.layout.is-sidebar-collapsed .sidebar {
  width: 64px;
}
.layout.is-sidebar-collapsed .sidebar .brand-text,
.layout.is-sidebar-collapsed .sidebar .nav-group,
.layout.is-sidebar-collapsed .sidebar .nav-label,
.layout.is-sidebar-collapsed .sidebar .user-meta,
.layout.is-sidebar-collapsed .sidebar .user-links,
.layout.is-sidebar-collapsed .sidebar .name {
  display: none;
}
.layout.is-sidebar-collapsed .sidebar .brand-logo {
  height: 24px;
  width: auto;
  max-width: 40px;
}
.layout.is-sidebar-collapsed .sidebar nav a {
  justify-content: center;
  padding: .5rem .4rem;
  font-size: 0;
}
.layout.is-sidebar-collapsed .sidebar nav a::before {
  content: '•';
  font-size: 0.93rem;
  color: #94a3b8;
}
.layout.is-sidebar-collapsed .sidebar nav a.active::before {
  color: #2dd4bf;
}
.layout.is-sidebar-collapsed .sidebar .brand {
  padding: .55rem .45rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem;
  min-height: 50px;
}
.layout.is-sidebar-collapsed .sidebar-toggle {
  margin: 0 auto;
}
.sidebar .brand-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.sidebar .brand-logo {
  height: 26px;
  width: auto;
  max-width: 100%;
  display: block;
  flex-shrink: 0;
}
.sidebar .brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.sidebar .brand-text strong {
  font-size: 0.87rem;
  line-height: 1.25;
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}
.sidebar .brand-text small {
  color: #7a8fa3;
  font-size: 0.68rem;
  line-height: 1.3;
}
.sidebar nav { padding: .55rem 0; flex: 1; overflow-y: auto; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .48rem 1.1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.87rem;
  border-left: 3px solid transparent;
  transition: .15s;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(13,148,136,.15);
  color: #fff;
  border-left-color: var(--accent);
}
.sidebar .nav-group {
  padding: .7rem 1.1rem .2rem;
  font-size: 0.68rem;
  letter-spacing: .06em;
  color: #5a7085;
}
.sidebar .user-box {
  padding: .85rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 0.8rem;
}
.sidebar .user-box .name { color: #fff; font-weight: 600; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.content { padding: 1.25rem 1.5rem 2rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--card);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.stat-card .label { font-size: 0.8rem; color: var(--muted); margin-bottom: .35rem; }
.stat-card .value { font-size: 1.45rem; font-weight: 700; color: var(--text); }
.stat-card .value.teal { color: var(--accent); }
a.stat-card.is-link,
a.fleet-stat.is-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
a.stat-card.is-link:hover,
a.fleet-stat.is-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,.12);
  transform: translateY(-1px);
}
a.fleet-stat.is-link .kpi-hint {
  display: block;
  margin-top: .15rem;
  font-size: 0.68rem;
  font-style: normal;
  color: var(--muted);
}
a.wb-approve-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}
a.wb-approve-link:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}
.drill-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 0 0 .85rem;
  padding: .65rem .85rem;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  border-radius: 6px;
  color: #0f766e;
  font-size: 0.87rem;
}
.drill-banner a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.drill-banner a:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card-header {
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.card-body { padding: 1.15rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.table th, .table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}
.table tr:hover td { background: #f8fafc; }
/* 表格内数字输入列与合计行对齐（计算器三源抵扣明细） */
.cell-num { display: inline-block; min-width: 80px; text-align: right; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .85rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.87rem;
  cursor: pointer;
  text-decoration: none;
  background: #e2e8f0;
  color: var(--text);
  line-height: 1.4;
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); }
.btn-sm { padding: .25rem .55rem; font-size: 0.8rem; }
.btn-success { background: #059669; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.form-group { margin-bottom: .25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: .3rem;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: .45rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.93rem;
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}
.form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.93rem;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }

.badge {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #fff;
}
.bg-secondary { background: #64748b; }
.bg-info { background: #0891b2; }
.bg-warning { background: #d97706; }
.bg-primary { background: #2563eb; }
.bg-danger { background: #dc2626; }
.bg-success { background: #059669; }
.bg-dark { background: #334155; }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem 1.5rem;
}
.dl-grid dt { font-size: 0.73rem; color: var(--muted); margin: 0; }
.dl-grid dd { margin: .15rem 0 0; font-weight: 600; }

.toolbar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar .form-control { width: auto; min-width: 140px; }

.login-page {
  min-height: 100vh;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(135deg, #0f1c28 0%, #1a3a4a 50%, #0d9488 100%);
  padding: .7rem .9rem;
  box-sizing: border-box;
  overflow: hidden;
}
.login-page-wide { align-items: stretch; }
.login-shell {
  width: min(1180px, 100%);
  flex: 1;
  height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, 300px) 1fr;
  gap: .75rem;
  align-items: stretch;
  min-height: 0;
}
.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 1.1rem 1.2rem 1rem;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: auto;
}
.login-logo-wrap {
  margin-bottom: .45rem;
}
.login-logo {
  display: block;
  width: min(190px, 68%);
  height: auto;
}
.login-box h1 { margin: 0 0 .15rem; font-size: 1.15rem; }
.login-brand-mark {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: #0d9488;
  margin-bottom: .35rem;
}
.login-box .sub { color: var(--muted); margin-bottom: .65rem; font-size: 0.8rem; }
.login-box .form-group { margin-bottom: .65rem; }
.login-box .form-group label { font-size: 0.8rem; }
.login-box .form-control { padding: .45rem .6rem; }
.login-box .btn-primary { padding: .5rem .65rem; }
.login-links { margin-top: .65rem; text-align: center; }
.login-role-chip {
  display: inline-block;
  margin-bottom: .55rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.73rem;
  font-weight: 600;
}
.login-roles {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: .75rem .85rem .7rem;
  color: #e8eef3;
  backdrop-filter: blur(8px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.login-roles h2 { margin: 0; font-size: 1rem; color: #fff; }
.login-roles > p { margin: .2rem 0 .45rem; color: #9fb2c2; font-size: 0.73rem; line-height: 1.4; }
.login-role-group {
  margin: .4rem 0 .25rem;
  font-size: 0.68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7dd3c7;
}
.login-role-group:first-of-type { margin-top: 0; }
.login-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35rem;
}
.login-role-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(15,28,40,.55);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  padding: .4rem .5rem;
  transition: .15s ease;
  min-width: 0;
}
.login-role-card:hover,
.login-role-card.is-active {
  border-color: #0d9488;
  background: rgba(13,148,136,.22);
}
.login-role-card strong { display: block; color: #fff; font-size: 0.8rem; line-height: 1.25; }
.login-role-card span {
  display: block;
  margin-top: .12rem;
  font-size: 0.68rem;
  color: #fbbf24;
  font-family: ui-monospace, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.login-role-card em { display: none; }
@media (max-width: 1100px) {
  .login-role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .login-page { height: auto; min-height: 100vh; overflow: auto; }
  .login-shell { grid-template-columns: 1fr; height: auto; }
  .login-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-roles { overflow: visible; }
}
@media (max-height: 700px) {
  .login-logo { width: min(150px, 56%); }
  .login-box h1 { font-size: 1.15rem; }
  .login-role-card { padding: .32rem .42rem; }
}
.login-hint {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.stat-card .hint {
  margin-top: .35rem;
  font-size: 0.73rem;
  color: var(--muted);
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.report-kpi .stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,.12);
}
@media (max-width: 900px) {
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* TMS 车队工作台（交互密度参考外部系统，业务为运输） */
.fleet-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
  margin-bottom: .85rem;
}
.fleet-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .65rem .8rem;
  text-align: center;
}
.fleet-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  margin-bottom: .2rem;
}
.fleet-stat b {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}
.fleet-stat.warn b { color: #b45309; }
.fleet-quick {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}
.fleet-chip {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.fleet-chip:hover, .fleet-chip.is-active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.ops-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .75rem;
}
.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .65rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
}
.ops-chip b { font-variant-numeric: tabular-nums; color: #0f766e; }
.ops-chip:hover { border-color: #99f6e4; background: #f0fdfa; }
.ops-chip.is-active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.ops-chip.is-active b { color: #fff; }
.text-warn { color: #b45309; font-weight: 700; }
.row-warn { background: rgba(180, 83, 9, .06); }
.ocr-bar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: .75rem;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.ocr-bar .btn { font-size: 0.87rem; }
@media (max-width: 1100px) {
  .fleet-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .fleet-stats { grid-template-columns: repeat(2, 1fr); }
}

.wb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}
.wb-rates {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}
.wb-rates > div,
.wb-rates > a {
  min-width: 88px;
  text-align: right;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .65rem;
}
.wb-rates > a:hover {
  border-color: var(--accent);
}
.wb-rates span {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
}
.wb-rates b {
  font-size: 1.15rem;
  color: var(--text);
}
.wb-approve {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.wb-approve > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}
.wb-approve span { color: var(--muted); font-size: 0.87rem; }
.wb-approve b { font-size: 1.15rem; }
.wb-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
}
.wb-quick a {
  display: block;
  text-align: center;
  padding: .55rem .35rem;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.wb-quick a:hover {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}
@media (max-width: 980px) {
  .wb-layout { grid-template-columns: 1fr; }
}

/* TMS 车队工作台（交互密度参考外部系统，业务为运输） */
.fleet-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
  margin-bottom: .85rem;
}
.fleet-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .65rem .75rem;
}
.fleet-stat span {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
}
.fleet-stat b {
  display: block;
  margin-top: .2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.fleet-stat.warn b { color: #b45309; }
a.fleet-stat {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
a.fleet-stat:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,.12);
  transform: translateY(-1px);
}
a.stat-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
  display: block;
}
a.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,.12);
  transform: translateY(-1px);
}
a.wb-approve-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
a.wb-approve-item:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}
.fleet-quick {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}
.fleet-chip {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.fleet-chip:hover, .fleet-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.text-warn { color: #b45309; font-weight: 700; }
.row-warn { background: rgba(180, 83, 9, .06); }
@media (max-width: 1100px) {
  .fleet-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .fleet-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 批量导入导出 */
.data-port-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: flex-start;
  margin: .75rem 0 1rem;
  padding: .7rem .85rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.data-port-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}
.data-port-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-right: .15rem;
}
.data-port-muted {
  font-size: 0.73rem;
  color: var(--muted);
}
.data-port-import { position: relative; }
.data-port-import > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}
.data-port-import > summary::-webkit-details-marker { display: none; }
.data-port-import-form {
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  left: 0;
  min-width: 260px;
  padding: .75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  display: grid;
  gap: .5rem;
}
.data-port-tip {
  margin: 0;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.4;
}
.btn-sm {
  padding: .28rem .65rem;
  font-size: 0.8rem;
  line-height: 1.3;
}
.topbar .data-port-bar {
  margin: .65rem 0 0;
  width: 100%;
}

/* 今日演示清单（角色引导） */
.demo-ck-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-ck-progress {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.demo-ck-progress b { color: var(--accent); }
.demo-ck.is-complete .demo-ck-progress b { color: #16a34a; }
.demo-ck-intro {
  margin: 0 0 .75rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.demo-ck-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ck;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.demo-ck-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.demo-ck-item:hover { border-color: var(--accent); }
.demo-ck-item.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.demo-ck-check {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  min-width: 0;
}
.demo-ck-box {
  margin-top: .2rem;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.demo-ck-text {
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.4;
  counter-increment: ck;
}
.demo-ck-text::before {
  content: counter(ck) ". ";
  color: var(--muted);
  font-weight: 700;
}
.demo-ck-item.is-done .demo-ck-text {
  color: var(--muted);
  text-decoration: line-through;
}
.demo-ck-hint {
  display: block;
  font-style: normal;
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: .1rem;
}
.demo-ck-go { flex-shrink: 0; white-space: nowrap; }
.demo-ck-foot {
  margin-top: .75rem;
  text-align: right;
}
.demo-ck-reset {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.demo-ck-reset:hover { color: var(--accent); }

/* 角色引导条 */
.role-coach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0fdfa, #fff);
}
.role-coach[hidden] { display: none !important; }
.role-coach-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem .75rem;
  min-width: 0;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.45;
}
.role-coach-main strong {
  color: #0f766e;
  font-size: 0.93rem;
}
.role-coach-main span { color: var(--muted); }
.role-coach-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}
.role-coach-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: .2rem .35rem;
  text-decoration: underline;
}
.role-coach-dismiss:hover { color: var(--accent); }

/* 页面说明改为点击弹出，不占工作区 */
.page-tip { display: none; }
.page-help-btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  line-height: 1.2;
}
.page-help-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.page-header-left h2 { margin: 0; font-size: 1.15rem; }
.page-header-sub { color: var(--muted); font-size: 0.8rem; margin-top: .2rem; }
.page-header-right {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.help-drawer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, .35);
  display: flex;
  justify-content: flex-end;
}
.help-drawer[hidden] { display: none !important; }
.help-drawer-panel {
  width: min(360px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(15, 23, 42, .12);
  display: flex;
  flex-direction: column;
}
.help-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.help-drawer-close {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.help-drawer-body { padding: 1rem 1.1rem; }
.help-drawer-body .help-purpose {
  margin: 0 0 .75rem;
  font-weight: 600;
  line-height: 1.5;
}
.help-drawer-body .help-next {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.93rem;
}
.share-link-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.share-link-text strong { display: block; margin-bottom: .35rem; }
.share-link-hint { margin: 0 0 .55rem; color: var(--muted); font-size: 0.87rem; line-height: 1.45; }
.share-link-url { margin: 0 0 .65rem; word-break: break-all; font-size: 0.87rem; }
.share-link-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.share-link-qr { text-align: center; }
.share-link-qr img {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.share-link-qr span {
  display: block;
  margin-top: .35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .share-link-card { grid-template-columns: 1fr; }
  .share-link-qr { justify-self: start; }
}
.page-tip-purpose { color: var(--text); font-weight: 600; }
.page-tip-next { color: var(--muted); }

/* 列表空状态 + 下一步引导 */
.empty-row td { padding: 0 !important; }
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.empty-state-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.empty-state-desc {
  font-size: 0.87rem;
  color: var(--muted);
  max-width: 32rem;
  line-height: 1.55;
}
.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: .35rem;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .7rem 1rem;
  font-size: 0.87rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.pager-links { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.pager-links a, .pager-links span {
  padding: .2rem .5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  background: #fff;
}
.pager-links a.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.region-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .4rem;
}
.form-group .region-row { margin-top: .15rem; }
.toolbar input[type=date] { max-width: 150px; }

.sys-footer {
  margin-top: auto;
  padding: .65rem 1.5rem 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}
.sys-footer .site-credit,
a.site-credit {
  color: inherit;
  text-decoration: none;
}
.sys-footer .site-credit:hover,
a.site-credit:hover {
  color: #0d9488;
  text-decoration: underline;
}
.sys-footer-login {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: .35rem 0 .15rem;
  color: rgba(255, 255, 255, .72);
}
.sys-footer-login .site-credit:hover {
  color: #fbbf24;
}

/* =========================================================
 * 算数-建筑资质代办系统 · 业务组件补充样式
 * ========================================================= */
.text-muted { color: var(--muted); }
.text-teal { color: var(--accent); }

.mini-title { font-size: 0.87rem; color: var(--muted); margin: 1rem 0 .5rem; font-weight: 600; }

/* 看板 / 泳道 */
.kanban { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; align-items: flex-start; }
.kanban-col {
  flex: 0 0 260px; background: #f1f5f9; border-radius: 10px; padding: .5rem;
  display: flex; flex-direction: column; max-height: 72vh;
}
.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; font-weight: 600; color: #334155; padding: .25rem .35rem .5rem;
}
.kanban-col-head b {
  background: #fff; border-radius: 999px; padding: .05rem .5rem; font-size: 0.73rem; color: var(--accent);
}
.kanban-col-body { overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.kanban-empty { color: #94a3b8; font-size: 0.8rem; text-align: center; padding: .75rem 0; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .55rem .65rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.kanban-card-title { font-weight: 600; font-size: 0.87rem; color: var(--text); line-height: 1.3; }
.kanban-card-sub { font-size: 0.73rem; color: var(--muted); margin-top: .15rem; }
.kanban-card-meta {
  display: flex; justify-content: space-between; gap: .5rem;
  font-size: 0.73rem; color: #475569; margin-top: .3rem;
}
.kanban-card-actions { display: flex; align-items: center; gap: .35rem; margin-top: .45rem; }

.phase-block { margin-bottom: 1.25rem; }
.phase-title {
  font-size: 0.8rem; font-weight: 700; color: #0f766e; text-transform: none;
  border-left: 3px solid var(--accent); padding-left: .5rem; margin-bottom: .5rem;
}
.kanban-projects .kanban-col { flex: 0 0 230px; }

/* 阶段流程 */
.flow-steps { display: flex; gap: .4rem; flex-wrap: wrap; }
.flow-step {
  flex: 1 1 88px; min-width: 88px; text-align: center; padding: .5rem .3rem;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.flow-step-no {
  width: 22px; height: 22px; line-height: 22px; border-radius: 50%; margin: 0 auto .3rem;
  background: #e2e8f0; color: #475569; font-size: 0.73rem; font-weight: 700;
}
.flow-step-name { font-size: 0.73rem; color: var(--muted); line-height: 1.25; }
.flow-step.is-done { background: #f0fdfa; border-color: #99f6e4; }
.flow-step.is-done .flow-step-no { background: var(--accent); color: #fff; }
.flow-step.is-current { background: #fff7ed; border-color: #fdba74; box-shadow: 0 0 0 2px rgba(217,119,6,.12); }
.flow-step.is-current .flow-step-no { background: #d97706; color: #fff; }
.flow-step.is-current .flow-step-name { color: #b45309; font-weight: 600; }
.flow-steps-sm .flow-step { flex: 1 1 70px; min-width: 70px; padding: .35rem .2rem; }
.flow-steps-sm .flow-step-name { font-size: 0.68rem; }

/* 时间轴 */
.timeline { position: relative; padding-left: 1rem; }
.timeline-item { position: relative; padding: 0 0 1rem 1rem; border-left: 2px solid #e2e8f0; }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-dot {
  position: absolute; left: -6px; top: .25rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px #ccfbf1;
}
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: 0.8rem; }
.timeline-body { font-size: 0.8rem; color: #334155; }

/* 横向条形图 */
.bar-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; font-size: 0.8rem; }
.bar-label { flex: 0 0 130px; color: var(--muted); }
.bar-track { flex: 1; height: 12px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #14b8a6, #0d9488); border-radius: 999px; }
.bar-value { flex: 0 0 40px; text-align: right; font-weight: 600; color: var(--text); }

.phase-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }

/* 文件列表 */
.file-list { list-style: none; padding: 0; margin: 0; font-size: 0.8rem; }
.file-list li { padding: .3rem 0; border-bottom: 1px dashed var(--border); }

/* 系统说明 */
.guide-steps { list-style: none; padding: 0; margin: 1rem 0 0; }
.guide-steps li { display: flex; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--border); }
.guide-step-no {
  flex: 0 0 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.73rem; font-weight: 700;
}
.guide-steps a { font-size: 0.8rem; color: var(--accent); }

/* 登录页角色组标题 */
.login-role-group-title {
  font-size: 0.73rem; color: #7dd3fc; margin: .5rem 0 .3rem; font-weight: 600;
}

/* 表格内联表单 */
.table form.toolbar, .toolbar form.toolbar { display: flex; gap: .35rem; align-items: center; }
.table .toolbar .form-control { min-width: 80px; }

/* =========================================================
 * 逐本证书勾选（人员配置计算器）
 * ========================================================= */
.row-inline { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.row-inline .form-control { flex: 1 1 8rem; min-width: 7rem; }

.pick-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .8rem;
  margin-bottom: .9rem;
  background: #fcfefe;
}
.pick-block:last-child { margin-bottom: 0; }
.pick-block-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .4rem; margin-bottom: .55rem; padding-bottom: .45rem;
  border-bottom: 1px dashed var(--border);
}
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 1000px) { .pick-grid { grid-template-columns: 1fr; } }

.pick-col { background: #fff; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; }
.pick-col-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem;
  padding: .45rem .55rem; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; color: #334155; background: #f8fafc;
  border-radius: 8px 8px 0 0;
}
.pick-col-tools { display: inline-flex; align-items: center; gap: .35rem; }
.pick-count { color: var(--accent); }
.pick-all {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  font-size: 0.68rem; color: var(--muted); cursor: pointer; padding: .1rem .45rem;
}
.pick-all:hover { border-color: var(--accent); color: var(--accent); }
.pick-list { padding: .4rem; display: flex; flex-direction: column; gap: .25rem; max-height: 260px; overflow-y: auto; }
.pick-empty { color: #94a3b8; font-size: 0.73rem; padding: .5rem .3rem; text-align: center; }
.pick-item {
  display: grid; grid-template-columns: auto 1fr; gap: .1rem .45rem;
  padding: .35rem .4rem; border-radius: 6px; cursor: pointer; line-height: 1.35;
}
.pick-item:hover { background: #f0fdfa; }
.pick-item.is-warn { background: #fffbeb; }
.pick-item input { margin-top: .2rem; accent-color: var(--accent); }
.pick-name { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.pick-name .pick-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--border-strong, #94a3b8); }
.pick-name .pick-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pick-meta { grid-column: 2; font-size: 0.73rem; color: var(--muted); }
.pick-price { grid-column: 2; font-size: 0.73rem; color: #0f766e; font-weight: 600; }

.calc-busy #calc-form { opacity: .6; pointer-events: none; }

/* 技术负责人三项判定 */
.tl-req { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.text-ok { color: #15803d; font-weight: 700; }
.text-bad { color: #b91c1c; font-weight: 700; }
.tl-paths {
  margin-top: .85rem; padding: .7rem .85rem; border-radius: 8px;
  background: #f8fafc; border: 1px solid var(--border);
}
.tl-paths-title { font-size: 0.87rem; font-weight: 700; color: #0f766e; margin-bottom: .35rem; }
.tl-paths ol { margin: 0; padding-left: 1.2rem; font-size: 0.87rem; color: #334155; line-height: 1.6; }

/* 撞单查重提示 */
.dup-hint { margin: .6rem 0 .2rem; font-size: 0.8rem; }
.dup-hint:empty { display: none; }
.dup-ok { color: #15803d; font-size: 0.8rem; }
.dup-hint.is-hit {
  border: 1px solid #fdba74;
  background: #fff7ed;
  border-radius: 8px;
  padding: .55rem .7rem;
}
.dup-title { color: #b45309; font-weight: 700; margin-bottom: .3rem; }
.dup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.dup-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.dup-list a { color: #0f766e; font-weight: 600; text-decoration: none; }
.dup-list a:hover { text-decoration: underline; }
.dup-owner { color: var(--muted); font-size: 0.73rem; }

/* 账龄分析 */
.aging-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .aging-grid { grid-template-columns: 1fr; } }
.aging-block { border: 1px solid var(--border); border-radius: 8px; padding: .65rem .8rem; background: #fff; }
.aging-head { font-weight: 700; font-size: 0.87rem; margin-bottom: .5rem; color: var(--text); }
.aging-bars { display: flex; flex-direction: column; gap: .3rem; }
.aging-row { display: grid; grid-template-columns: 88px 1fr 96px; align-items: center; gap: .5rem; font-size: 0.8rem; }
.aging-label { color: var(--muted); }
.aging-track { height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; display: block; }
.aging-track i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #0d9488); }
.aging-val { text-align: right; font-weight: 600; }
.text-bad { color: #b91c1c; font-weight: 700; }

/* 预警阈值配置 */
.warn-config { margin: .75rem 0 1rem; border: 1px dashed var(--border); border-radius: 8px; padding: .55rem .8rem; background: #f8fafc; }
.warn-config > summary { cursor: pointer; font-size: 0.87rem; font-weight: 600; color: #0f766e; }
.warn-config .form-grid { margin-top: .7rem; }
.warn-config small { display: block; margin-top: .15rem; }

/* ===== 20260912 易用性增强：顶栏 / 导航 / 抽屉 / 看板 / 批量 / 移动端 ===== */

