/* 星辰蓝海项目管理平台 — 全局样式 */
:root {
  --blue: #1668dc;
  --blue-dark: #0e4fb3;
  --blue-bg: #eef4fd;
  --ink: #1f2d3d;
  --ink-2: #5e6d82;
  --ink-3: #8a97a8;
  --line: #e3e9f1;
  --bg: #f4f6fa;
  --card: #ffffff;
  --red: #e04b4b;
  --green: #2ea06a;
  --orange: #e6822a;
  --purple: #7a5fd0;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 40, 80, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; background: #fff; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,104,220,.12); }
::placeholder { color: #b5bfcc; }

/* ---------- 登录页 ---------- */
.login-bg {
  background: linear-gradient(135deg, #0b3c8c 0%, #1668dc 55%, #3f8ae0 100%);
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  position: relative; overflow: hidden;
}
/* 背景品牌区：左侧 logo + 名称 */
.login-hero {
  position: absolute; left: 8%; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  color: #fff; pointer-events: none;
}
.hero-logo-bg { background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.hero-logo { width: 88px; height: 88px; display: block; }
.hero-title { font-size: 30px; font-weight: 700; letter-spacing: 3px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
/* 登录卡片右移（左留品牌区） */
.login-wrap { position: relative; z-index: 1; margin-left: 24%; }
.login-card {
  width: 400px; background: #fff; border-radius: 14px; padding: 40px 38px 28px;
  box-shadow: 0 18px 50px rgba(3, 20, 50, .35); text-align: center;
}
.login-welcome { font-size: 22px; font-weight: 700; margin-bottom: 28px; letter-spacing: 1px; }
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.login-tip { font-size: 12px; color: var(--ink-3); text-align: left; margin-bottom: 14px; }
.login-err { color: var(--red); font-size: 13px; min-height: 20px; margin-top: 10px; }

/* 移动端：品牌区移到顶部，卡片居中 */
@media (max-width: 768px) {
  .login-hero { position: static; transform: none; margin: 40px 0 0; gap: 10px; }
  .hero-logo { width: 64px; height: 64px; }
  .hero-logo-bg { padding: 6px; border-radius: 12px; }
  .hero-title { font-size: 22px; }
  .login-wrap { margin-left: 0; }
  .login-bg { flex-direction: column; justify-content: flex-start; padding-top: 20px; }
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: #101d33; color: #aab7cc; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #2b3b57; }
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand .brand-logo {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #1668dc, #3f8ae0); color: #fff;
  font-size: 16px; font-weight: 700; line-height: 34px; text-align: center;
}
.side-brand b { color: #fff; font-size: 14.5px; display: block; line-height: 1.3; }
.side-brand small { font-size: 10px; color: #5e6d82; letter-spacing: .5px; }
.menu-group-title {
  font-size: 11px; color: #5e6d82; padding: 14px 18px 6px; letter-spacing: 1px;
}
.menu-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 20px;
  cursor: pointer; font-size: 13.5px; border-left: 3px solid transparent; color: #aab7cc;
  user-select: none; position: relative;
}
.menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-item .mi-dot { width: 5px; height: 5px; border-radius: 50%; background: #3d4f6e; flex-shrink: 0; }
.menu-item.disabled { cursor: not-allowed; color: #56657d; }
.menu-item.disabled .mi-dot { background: #2b3b57; }
.menu-item .mi-arrow { margin-left: auto; font-size: 10px; transition: transform .2s; color: #5e6d82; }
.menu-item.open .mi-arrow { transform: rotate(90deg); }
.menu-item.active { background: rgba(22,104,220,.22); border-left-color: var(--blue); color: #fff; }
.menu-item .mi-tag {
  margin-left: auto; font-size: 10px; color: #5e6d82; background: #1a2a45;
  border: 1px solid #2b3b57; border-radius: 4px; padding: 0 5px; line-height: 16px;
}
.menu-item .mi-num {
  margin-left: auto; background: var(--blue); color: #fff; font-size: 10px;
  border-radius: 8px; padding: 0 6px; line-height: 16px;
}
.submenu { display: none; }
.submenu.show { display: block; }
.submenu .menu-item { padding-left: 44px; font-size: 13px; }

/* 主区域 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 14px; color: var(--ink-2); }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.section-filter { display: flex; align-items: center; gap: 8px; margin-left: 24px; }
.section-filter label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.section-filter select { width: 260px; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue-bg); color: var(--blue);
  font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.btn-logout { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.btn-logout:hover { color: var(--red); border-color: var(--red); }

/* 顶部「当前公司」标识：多租户下用户需随时知道自己在哪家公司里操作 */
.company-chip {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.company-chip .cc-label { color: var(--ink-3); font-size: 11.5px; }

.content { padding: 20px; flex: 1; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; font-weight: 600; }
.page-head .sub { font-size: 12.5px; color: var(--ink-3); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 通用组件 ---------- */
.btn {
  border: 1px solid transparent; border-radius: 6px; padding: 7px 16px;
  font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s; background: #fff;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fff; border-color: #f2c4c4; color: var(--red); }
.btn-danger:hover { background: #fdf1f1; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 5px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card-title { font-size: 14.5px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 14px; background: var(--blue); border-radius: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12.5px;
  background: #f7f9fc; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
tbody tr:hover { background: #f8fafd; }
tbody tr:last-child td { border-bottom: none; }
.t-empty { text-align: center; color: var(--ink-3); padding: 40px 0 !important; }
.t-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.t-code { color: var(--ink-2); font-size: 12px; }

.badge { display: inline-block; font-size: 11.5px; border-radius: 5px; padding: 1px 8px; line-height: 20px; white-space: nowrap; }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-green { background: #e8f7ef; color: var(--green); }
.b-orange { background: #fdf3e7; color: var(--orange); }
.b-red { background: #fdeeee; color: var(--red); }
.b-gray { background: #f0f2f5; color: var(--ink-3); }
.b-purple { background: #f1edfc; color: var(--purple); }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 140px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(13, 27, 48, .45); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; width: 640px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(5, 20, 45, .3); animation: pop .18s ease;
}
.modal.wide { width: 1040px; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15.5px; }
.modal-close { margin-left: auto; border: none; background: none; font-size: 18px; color: var(--ink-3); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; max-height: 64vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.t-tip { color: var(--ink-3); font-size: 12.5px; margin-top: 10px; line-height: 1.6; }
.confirm-modal { max-width: 480px; }
.confirm-modal .form-row { display: flex; flex-direction: column; gap: 6px; }
.confirm-modal .form-row label { font-size: 13px; color: var(--ink-2); }

/* 导入 Excel/CSV 浮层（叠加在单据窗口之上，原窗口不关闭） */
.imp-mask { position: fixed; inset: 0; background: rgba(13,27,48,.4); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.imp-modal { background: #fff; border-radius: 12px; width: 580px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(5,20,45,.3); animation: pop .18s ease; }
.imp-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.imp-x { margin-left: auto; border: none; background: none; font-size: 20px; color: var(--ink-3); cursor: pointer; line-height: 1; }
.imp-body { padding: 16px 18px; overflow-y: auto; }
.imp-file { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; box-sizing: border-box; }
.imp-map { margin-top: 12px; }
.imp-map-title { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.imp-map-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.imp-map-row { display: flex; align-items: center; gap: 8px; }
.imp-map-label { font-size: 12px; color: var(--ink-2); width: 76px; flex: none; }
.imp-map-row select { flex: 1; }
.imp-prev { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-height: 120px; overflow: auto; }
.imp-msg { margin-top: 8px; color: var(--red); font-size: 12.5px; min-height: 16px; }
.imp-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.form-item label .req { color: var(--red); margin-left: 2px; }
.form-item .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* 详情抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(13,27,48,.4); z-index: 90; display: none; }
.drawer-mask.show { display: block; }
.drawer {
  position: fixed; top: 0; right: -720px; width: 700px; max-width: 94vw; height: 100vh; background: #fff;
  z-index: 95; box-shadow: -12px 0 40px rgba(5,20,45,.2); transition: right .25s ease; display: flex; flex-direction: column;
}
.drawer.show { right: 0; }
.drawer-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.drawer-head h3 { font-size: 16px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; position: relative; overflow: hidden; }
.stat-card .s-label { font-size: 12.5px; color: var(--ink-2); }
.stat-card .s-value { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .s-extra { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.stat-card .s-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }

/* 进度条 */
.progress { background: #edf1f7; border-radius: 10px; height: 8px; width: 130px; overflow: hidden; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #1668dc, #3f8ae0); }
.progress.warn i { background: linear-gradient(90deg, #e6822a, #f2a35c); }
.progress.done i { background: linear-gradient(90deg, #2ea06a, #52c48f); }

/* 描述列表 */
.desc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.desc-item { padding: 10px 14px; border-bottom: 1px solid #eef2f7; background: #fff; }
.desc-item dt { font-size: 12px; color: var(--ink-3); }
.desc-item dd { font-size: 13.5px; margin-top: 2px; word-break: break-all; }
.desc-item.full { grid-column: 1 / -1; }

/* toast */
#toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 999;
  padding: 10px 22px; border-radius: 8px; color: #fff; font-size: 13.5px; display: none;
  box-shadow: 0 8px 30px rgba(5,20,45,.25); max-width: 80vw;
}
#toast.ok { background: #22a06b; }
#toast.err { background: #e04b4b; }

/* ---------- 统一单据表单（与网站一致） ---------- */
.doc {
  border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 16px; overflow: hidden;
}
.doc-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: #f7f9fc; flex-wrap: wrap;
}
.doc-toolbar .doc-title { font-size: 14.5px; font-weight: 600; margin-right: 8px; }
.doc-toolbar .spacer { flex: 1; }
.doc-form { padding: 16px 18px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.doc-item { display: flex; align-items: flex-start; gap: 10px; }
.doc-item > label { width: 92px; flex-shrink: 0; text-align: right; font-size: 13px; color: var(--ink-2); padding-top: 8px; line-height: 1.3; }
.doc-item > label .req { color: var(--red); margin-left: 2px; }
.doc-item .field-ctrl { flex: 1; min-width: 0; }
.doc-item .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.doc-item.full { grid-column: 1 / -1; }

/* ---------- 自定义下拉（替代原生 select / datalist：无圆角、宽度同输入框、向下展开） ---------- */
.xsel { position: relative; }
.xsel-trigger { font-family: inherit; font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 7px 30px 7px 10px; background: #fff; outline: none; width: 100%; box-sizing: border-box; min-height: 36px; cursor: pointer; display: flex; align-items: center; }
.xsel-combo .xsel-trigger { cursor: text; }
.xsel-trigger:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,104,220,.12); }
.xsel .xsel-caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-style: normal; font-size: 11px; pointer-events: none; }
.xsel.ro .xsel-trigger, .xsel.dis .xsel-trigger { background: #f5f6f8; color: var(--ink-3); cursor: not-allowed; }
.xsel-pop { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 0; box-shadow: 0 8px 24px rgba(5,20,45,.14); z-index: 60; max-height: 240px; overflow: auto; display: none; }
.xsel.open .xsel-pop { display: block; }
.xsel-opt { padding: 8px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xsel-opt:hover { background: #f2f7ff; }
.xsel-opt.on { background: #e8f1ff; color: var(--blue); font-weight: 600; }

/* ---------- 流程管理页布局修正（原 .toolbar/.tabs/.filters/.stat-row 无样式导致块级堆叠错乱） ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .tabs { display: inline-flex; gap: 6px; background: #f2f5fa; padding: 4px; }
.toolbar .tab { border: none; background: transparent; padding: 7px 16px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-radius: 0; }
.toolbar .tab.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.toolbar .filters { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.toolbar .filters .inp { min-width: 150px; }
.toolbar .filters .xsel { min-width: 160px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-row .stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; position: relative; overflow: hidden; }
.stat-row .stat-card .s-label { font-size: 12.5px; color: var(--ink-2); }
.stat-row .stat-card .s-value { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-row .stat-card .s-extra { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.stat-row .stat-card .s-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: 1fr; } .doc-item > label { width: 80px; } }

/* 明细表（申报明细等） */
.sub-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.sub-table th, .sub-table td { border: 1px solid var(--line); padding: 5px 6px; font-size: 12.5px; }
.sub-table th { background: #f3f6fb; font-weight: 600; color: var(--ink-2); }
.sub-table input { padding: 4px 6px; border: none; border-bottom: 1px dashed var(--line); border-radius: 0; background: transparent; width: 100%; }
.sub-table input:focus { border-bottom-color: var(--blue); box-shadow: none; }

/* ---------- 统一列表 ---------- */
.list-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.list-toolbar input, .list-toolbar select { width: auto; min-width: 140px; }
.list-toolbar .spacer { flex: 1; }
.list-toolbar .count { font-size: 12.5px; color: var(--ink-3); }
.doc-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.doc-tab { padding: 6px 14px; border-radius: 6px 6px 0 0; font-size: 13px; background: #eef2f7; color: var(--ink-2); cursor: pointer; border: 1px solid var(--line); border-bottom: none; }
.doc-tab.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 -2px 0 var(--blue) inset; }

/* 分段小标题 */
.block-title { font-size: 13.5px; font-weight: 600; margin: 18px 0 10px; color: var(--ink-2); }

/* 通用输入框（确认弹窗内联输入，如重置密码） */
.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink-1); background: #fff; }

/* 公司管理：模块开通多选网格 */
.module-check-grid { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 4px 0 8px; }
.mod-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); cursor: pointer; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fc; }
.mod-check input { cursor: pointer; }
.mod-check:has(input:checked) { border-color: var(--blue); color: var(--blue); background: #f0f6ff; }

/* 金额汇总条（工程量清单合计 / 申报可付金额） */
.amt-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f6f9ff; font-size: 13px; }
.amt-panel b { font-variant-numeric: tabular-nums; }

/* 可点击链接（分包商合同数跳转等） */
a.link { color: var(--blue); font-weight: 600; text-decoration: none; cursor: pointer; }
a.link:hover { text-decoration: underline; }

/* 表单底部实时计算面板（租赁结算的租金池、租赁付款的可付额度、设备台账的费用汇总）
   逐行列出算式，让用户看到金额是怎么来的，而不是只给一个结果 */
.calc-box { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f6f9ff; font-size: 13px; }
.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 5px 0; color: var(--ink-2); }
.calc-row + .calc-row { border-top: 1px dashed var(--line); }
.calc-row b { font-variant-numeric: tabular-nums; color: var(--ink-1); }
.calc-row.hl { background: #eaf2ff; margin: 0 -6px; padding: 7px 6px; border-radius: 5px; }
.calc-row.total { border-top: 1px solid var(--line-2, var(--line)); margin-top: 4px; padding-top: 9px; font-size: 14px; }
.calc-row.total b { color: var(--blue); font-size: 15px; }
/* 引导提示条（未选合同时的占位说明） */
.tip-box { margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfe; font-size: 12.5px; color: var(--ink-3); }

/* 权限矩阵勾选表 */
.perm-grid { overflow-x: auto; }
.perm-grid .sub-table th { text-align: center; }
.perm-grid .sub-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); }

/* ---------- 工作台 Dashboard ---------- */
.dashboard { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.dash-left { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }
.dash-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 日历卡片 */
.cal-card { padding: 14px 16px !important; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head b { font-size: 15px; flex: 1; text-align: center; }
.cal-nav { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.cal-nav:hover { border-color: var(--blue); color: var(--blue); }
.cal-today { margin-left: auto; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12.5px; border-radius: 6px; cursor: default; color: var(--ink-2); position: relative; }
.cal-cell:not(.cal-empty):hover { background: var(--blue-bg); }
.cal-cell.cal-today { background: var(--blue); color: #fff; font-weight: 700; }
.cal-cell.sel { outline: 2px solid var(--blue); outline-offset: -2px; }
.cal-cell.cal-empty { cursor: default; }
/* 日历备忘：有备忘的日期右上角显示圆点标记 */
.cal-cell:not(.cal-empty) { cursor: pointer; }
.cal-cell .cal-dot { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.cal-cell.cal-today .cal-dot { background: #fff; }

/* 快捷操作 */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; color: var(--ink-2); transition: all .15s; }
.quick-btn:hover { border-color: var(--blue); color: var(--blue); box-shadow: 0 2px 8px rgba(22,104,220,.1); transform: translateY(-1px); }
.qb-icon { font-size: 20px; line-height: 1; }
/* 可自定义快捷操作（chip + 添加 / 移除） */
.quick-chip { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px 6px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; color: var(--ink-2); transition: all .15s; }
.quick-chip:hover { border-color: var(--blue); color: var(--blue); box-shadow: 0 2px 8px rgba(22,104,220,.1); transform: translateY(-1px); }
.quick-add { border-style: dashed; color: var(--ink-3); }
.quick-add:hover { color: var(--blue); }
.quick-del { position: absolute; top: 1px; right: 4px; border: none; background: transparent; color: var(--ink-3); font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.quick-del:hover { color: #e0483c; }
.quick-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qp-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 13px; }
.qp-item:hover { border-color: var(--blue); }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }

/* 公告列表 */
.notice-item { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.notice-item:last-child { border-bottom: none; }
.notice-item:hover .notice-top b { color: var(--blue); }
.notice-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.notice-meta { font-size: 12px; color: var(--ink-3); }
.notice-snippet { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }

@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
  .dash-left { position: static; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
  .sidebar { width: 60px; }
  .side-brand b, .side-brand small, .menu-item span, .menu-item .mi-tag, .menu-group-title { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .section-filter select { width: 150px; }
}
