/* FDE 交付协作平台 — 原型样式表 | 白底 · 简约 */

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f6f7f9;
  --color-border: #e6e8ec;
  --color-text-primary: #1f2329;
  --color-text-secondary: #6b7280;
  --color-text-tertiary: #9aa0a8;
  --color-accent: #2f6fed;
  --color-accent-hover: #2559c9;
  --color-success: #16a34a;
  --color-success-bg: #eafaf0;
  --color-warning: #d97706;
  --color-warning-bg: #fff7e6;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-info: #2f6fed;
  --color-info-bg: #eef3ff;
  --color-neutral-bg: #f1f2f4;
  --radius-card: 10px;
  --radius-control: 6px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
  --sidebar-width: 220px;
  --topbar-height: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg-subtle);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- 布局骨架 ---------- */

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

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-bg-subtle);
  border-right: 1px solid var(--color-border);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 16px 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-primary);
}
.sidebar-logo .dot {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--color-accent);
  display: inline-block;
}

.nav-group { margin-bottom: 4px; }
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-control);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
}
.nav-group-title:hover { background: #ececef; }
.nav-group.active > .nav-group-title { color: var(--color-accent); }
.nav-group-title .chev { margin-left: auto; font-size: 11px; color: var(--color-text-tertiary); transition: transform .15s; }
.nav-group.collapsed .chev { transform: rotate(-90deg); }
.nav-group.collapsed .nav-children { display: none; }

.nav-children { padding-left: 30px; margin-top: 2px; margin-bottom: 8px; }
.nav-children li a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-control);
  font-size: 13.5px;
  color: var(--color-text-secondary);
}
.nav-children li a:hover { background: #ececef; color: var(--color-text-primary); }
.nav-children li a.active {
  background: var(--color-info-bg);
  color: var(--color-accent);
  font-weight: 600;
}

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

.topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-title { font-size: 15px; font-weight: 700; }
.topbar-crumb { font-size: 12.5px; color: var(--color-text-tertiary); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.role-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 6px 4px 10px;
}
.role-switch select { border: none; background: transparent; font-size: 12.5px; color: var(--color-text-primary); font-weight: 600; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--color-accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h1 { font-size: 20px; margin: 0 0 4px 0; }
.page-header p { margin: 0; color: var(--color-text-secondary); font-size: 13px; }

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

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 14px 0; display: flex; align-items: center; justify-content: space-between; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
}
.stat-card .label { color: var(--color-text-secondary); font-size: 12.5px; margin-bottom: 8px; }
.stat-card .value { font-size: 24px; font-weight: 700; }
.stat-card .value .unit { font-size: 13px; color: var(--color-text-secondary); font-weight: 400; margin-left: 4px; }
.stat-card .sub { margin-top: 6px; font-size: 12px; color: var(--color-text-tertiary); }

/* ---------- 首页概览：分区标签 ---------- */

.dash-section { margin-bottom: 24px; }
.dash-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--color-text-secondary);
  margin-bottom: 12px;
}
.dash-section-title .tag {
  font-size: 11px; font-weight: 600; color: var(--color-accent); background: var(--color-info-bg);
  padding: 2px 8px; border-radius: 999px;
}

/* ---------- 简易图表（数据看板） ---------- */

.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 20px; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-chart .bar-value { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 6px; white-space: nowrap; }
.bar-chart .bar { width: 100%; max-width: 40px; background: var(--color-accent); border-radius: 5px 5px 0 0; }
.bar-chart .bar.alt { background: var(--color-success); }
.bar-chart .bar-label { margin-top: 8px; font-size: 11.5px; color: var(--color-text-secondary); }

.stack-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; }
.stack-bar .seg.a { background: var(--color-accent); }
.stack-bar .seg.b { background: var(--color-warning); }
.chart-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--color-text-secondary); }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-legend .dot.a { background: var(--color-accent); }
.chart-legend .dot.b { background: var(--color-warning); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 13.5px; font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}
.btn:hover { background: var(--color-bg-subtle); }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn-danger { color: var(--color-danger); border-color: #f3c8c8; }
.btn-danger:hover { background: var(--color-danger-bg); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--color-bg-subtle); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

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

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-text-primary); }
.form-row .hint { font-size: 12px; color: var(--color-text-tertiary); margin-top: 4px; }
input[type=text],
input[type=number],
input[type=date],
select,
textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-bg);
}
textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 38px; line-height: 1.5; }
.form-row input[type=text],
.form-row input[type=number],
.form-row input[type=date],
.form-row select {
  width: 100%;
  box-sizing: border-box;
}
table input[type=text],
table input[type=number],
table input[type=date],
table select,
table textarea {
  width: 100%;
  box-sizing: border-box;
}
table textarea { min-height: 34px; padding: 6px 8px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-accent);
}
.form-inline { display: flex; gap: 12px; }
.form-inline .form-row { flex: 1; }

.city-pair { display: flex; gap: 6px; }
.city-pair select { flex: 1; min-width: 0; padding-left: 8px; padding-right: 6px; }
table .city-pair { width: 100%; }

.radio-card-group { display: flex; gap: 12px; }
.radio-card {
  flex: 1; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 14px; cursor: pointer; position: relative;
}
.radio-card.selected { border-color: var(--color-accent); background: var(--color-info-bg); }
.radio-card .title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.radio-card .desc { font-size: 12px; color: var(--color-text-secondary); }

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

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-weight: 600; color: var(--color-text-secondary);
  font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
tbody td { padding: 12px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
tbody tr:hover { background: var(--color-bg-subtle); }
tbody tr:last-child td { border-bottom: none; }
tfoot td { padding: 12px; border-top: 2px solid var(--color-border); vertical-align: middle; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.table-toolbar .filters { display: flex; gap: 8px; }
.table-toolbar .search {
  border: 1px solid var(--color-border); border-radius: var(--radius-control);
  padding: 8px 12px; font-size: 13px; width: 220px;
}
.table-toolbar select {
  border: 1px solid var(--color-border); border-radius: var(--radius-control);
  padding: 8px 10px; font-size: 13px; background: var(--color-bg);
}

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--color-text-secondary); }
.pagination button {
  border: 1px solid var(--color-border); background: var(--color-bg); border-radius: var(--radius-control);
  width: 28px; height: 28px; cursor: pointer;
}
.pagination button.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ---------- 徽标 / 状态 ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-draft { background: var(--color-neutral-bg); color: var(--color-text-secondary); }
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-rejected { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-approved { background: var(--color-info-bg); color: var(--color-info); }
.badge-paid { background: var(--color-success-bg); color: var(--color-success); }
.badge-review { background: #f3e8ff; color: #7c3aed; }
.badge-leave-sick { background: #fff1e6; color: #ea580c; }
.badge-leave-paid { background: var(--color-success-bg); color: var(--color-success); }
.badge-role { background: var(--color-bg-subtle); color: var(--color-text-secondary); border: 1px solid var(--color-border); }

/* ---------- 计算类摘要（工资核算等） ---------- */

.calc-summary { background: var(--color-bg-subtle); border-radius: var(--radius-control); padding: 12px 14px; margin-top: 4px; }
.calc-summary .row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--color-text-secondary); }
.calc-summary .row span:last-child { color: var(--color-text-primary); font-weight: 600; }
.calc-summary .row.deduct span:last-child { color: var(--color-danger); }
.calc-summary .row.total { font-weight: 700; font-size: 14.5px; border-top: 1px solid var(--color-border); margin-top: 6px; padding-top: 8px; color: var(--color-text-primary); }
.calc-summary .row.total span:last-child { color: var(--color-accent); }

/* ---------- 空状态 / 提示 ---------- */

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--color-text-tertiary);
}
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }
.empty-state .title { font-size: 14px; color: var(--color-text-secondary); font-weight: 600; margin-bottom: 4px; }
.empty-state .desc { font-size: 12.5px; }

.placeholder-note {
  border: 1px dashed var(--color-border);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  font-size: 12.5px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* ---------- 上传区 ---------- */

.upload-zone {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px;
  text-align: center;
  background: var(--color-bg-subtle);
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--color-accent); }
.upload-zone .icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone .title { font-weight: 600; font-size: 13.5px; }
.upload-zone .desc { font-size: 12px; color: var(--color-text-tertiary); margin-top: 4px; }

.invoice-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius-control);
  padding: 12px; margin-top: 10px;
}
.invoice-item .thumb {
  width: 40px; height: 40px; border-radius: 6px; background: var(--color-info-bg);
  color: var(--color-accent); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.invoice-item .info { flex: 1; min-width: 0; }
.invoice-item .name { font-size: 13px; font-weight: 600; }
.invoice-item .meta { font-size: 12px; color: var(--color-text-tertiary); }
.invoice-item .ocr-tag { font-size: 11.5px; color: var(--color-success); background: var(--color-success-bg); padding: 2px 7px; border-radius: 999px; }

/* ---------- 时间线（审批） ---------- */

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--color-border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-accent);
}
.timeline-item.muted::before { background: var(--color-border); box-shadow: 0 0 0 1px var(--color-border); }
.timeline-item .t-title { font-size: 13.5px; font-weight: 600; }
.timeline-item .t-meta { font-size: 12px; color: var(--color-text-tertiary); margin-top: 2px; }
.timeline-item .t-note { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 4px; }

/* ---------- 杂项 ---------- */

.divider { height: 1px; background: var(--color-border); margin: 16px 0; border: none; }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 17, 21, 0.35);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.modal-mask.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-card); width: 420px; max-width: 90vw;
  padding: 20px; box-shadow: 0 8px 30px rgba(16,24,40,0.15);
}
.modal-box h3 { margin: 0 0 12px 0; font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- 工时日历（月视图） ---------- */

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-size: 14.5px; font-weight: 700; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 28px; height: 28px; border: 1px solid var(--color-border); background: var(--color-bg);
  border-radius: var(--radius-control); cursor: pointer; font-size: 13px; color: var(--color-text-secondary);
}
.cal-nav button:hover { background: var(--color-bg-subtle); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 14px; }
.cal-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: middle; }
.cal-legend .dot.full { background: var(--color-accent); }
.cal-legend .dot.half { background: var(--color-warning); }
.cal-legend .dot.disabled { background: var(--color-text-tertiary); }

.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-grid .weekday { text-align: center; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); padding-bottom: 2px; }

.day-cell {
  min-height: 68px; border: 1px solid var(--color-border); border-radius: 8px;
  padding: 6px 8px; cursor: pointer; background: var(--color-bg); transition: border-color .1s;
}
.day-cell:hover:not(.disabled) { border-color: var(--color-accent); }
.day-cell .day-num { font-size: 12.5px; font-weight: 600; color: var(--color-text-primary); }
.day-cell.other-month .day-num { color: var(--color-text-tertiary); }
.day-cell.today { box-shadow: 0 0 0 1.5px var(--color-accent) inset; }
.day-cell.disabled { background: var(--color-bg-subtle); cursor: not-allowed; }
.day-cell.disabled .day-num { color: var(--color-text-tertiary); }
.day-cell.full { background: var(--color-info-bg); border-color: #c9dbfb; }
.day-cell.half { background: var(--color-warning-bg); border-color: #f6ddb0; }
.day-cell.leave { background: #f3e8ff; border-color: #e2cffa; cursor: not-allowed; }
.day-cell.leave-partial { background: #f6effe; border: 1px dashed #c9a8f5; }
.day-cell .day-tag { font-size: 11px; font-weight: 700; margin-top: 6px; }
.day-cell.full .day-tag { color: var(--color-accent); }
.day-cell.half .day-tag { color: var(--color-warning); }
.day-cell.leave .day-tag { color: #7c3aed; }
.day-cell.leave-partial .day-tag { color: #8b5cf6; }
.day-cell .day-proj { font-size: 10.5px; color: var(--color-text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.type-toggle { display: flex; gap: 8px; }
.type-toggle button {
  flex: 1; padding: 9px; border: 1px solid var(--color-border); background: var(--color-bg);
  border-radius: var(--radius-control); font-size: 13px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer;
}
.type-toggle button.selected { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.type-toggle button:disabled { opacity: .5; cursor: not-allowed; }

/* =====================================================================
   以下为正式版新增样式（在原型样式基础上扩展，沿用同一套设计 Token）
   ===================================================================== */

input[type=month], input[type=password], input[type=tel], input[type=email], input[type=search] {
  border: 1px solid var(--color-border); border-radius: var(--radius-control);
  padding: 9px 12px; font-size: 13.5px; font-family: inherit; color: var(--color-text-primary); background: var(--color-bg);
}
.form-row input[type=month], .form-row input[type=password], .form-row input[type=tel], .form-row textarea { width: 100%; box-sizing: border-box; }
.form-row .req { color: var(--color-danger); margin-left: 2px; }
.table-toolbar input[type=month] { padding: 7px 10px; font-size: 13px; }

/* 顶部用户菜单 */
.user-menu { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-menu-btn:hover { background: var(--color-bg-subtle); }
.user-menu-btn .uname { font-size: 13px; font-weight: 600; }
.user-menu-btn .uroles { font-size: 11.5px; color: var(--color-text-tertiary); }
.dropdown { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: 0 8px 30px rgba(16,24,40,.12); min-width: 160px; padding: 6px; display: none; z-index: 20; }
.dropdown.open { display: block; }
.dropdown a { display: block; padding: 8px 12px; border-radius: var(--radius-control); font-size: 13px; }
.dropdown a:hover { background: var(--color-bg-subtle); }

/* 徽标 - 导航计数 */
.nav-count { margin-left: auto; background: var(--color-danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 6px; line-height: 17px; }
.nav-children li a { display: flex; align-items: center; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1f2329; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: toastIn .18s ease-out; max-width: 80vw; }
.toast.err { background: var(--color-danger); }
.toast.ok { background: #16794a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 加载 */
.loading { padding: 60px 0; text-align: center; color: var(--color-text-tertiary); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-bg-subtle); padding: 16px; }
.login-box { width: 380px; max-width: 100%; background: #fff; border: 1px solid var(--color-border); border-radius: 14px; padding: 32px; box-shadow: 0 8px 30px rgba(16,24,40,.06); }
.login-box h1 { font-size: 20px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.login-box .sub { color: var(--color-text-secondary); font-size: 13px; margin-bottom: 24px; }
.login-box input { width: 100%; }
.demo-accounts { margin-top: 20px; border-top: 1px solid var(--color-border); padding-top: 14px; font-size: 12.5px; color: var(--color-text-secondary); }
.demo-accounts button { margin: 4px 4px 0 0; }

/* 标签页 */
.tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--color-border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: none; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; flex-shrink: 0; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.tabs .count { font-size: 11px; background: var(--color-bg-subtle); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }

/* 进度条 */
.progress { height: 8px; background: var(--color-bg-subtle); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: var(--color-accent); border-radius: 999px; }
.progress.ok > div { background: var(--color-success); }
.progress.warn > div { background: var(--color-warning); }
.progress.over > div { background: var(--color-danger); }

/* 描述列表 */
.desc-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; }
.desc-list .k { font-size: 12px; color: var(--color-text-tertiary); margin-bottom: 3px; }
.desc-list .v { font-size: 13.5px; font-weight: 500; word-break: break-all; }
.desc-list .span-3 { grid-column: span 3; }

/* 工具 */
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.link { color: var(--color-accent); cursor: pointer; }
.link:hover { text-decoration: underline; }
.muted-row td { color: var(--color-text-tertiary); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--color-bg-subtle); border: 1px solid var(--color-border); font-size: 12px; margin: 2px 4px 2px 0; }
.check-list { max-height: 260px; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-control); padding: 6px 10px; }
.check-list label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-weight: 400; margin: 0; cursor: pointer; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.inline-checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; cursor: pointer; }
.alert { border-radius: var(--radius-control); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.alert-warn { background: var(--color-warning-bg); color: #92400e; }
.alert-danger { background: var(--color-danger-bg); color: #991b1b; }
.alert-info { background: var(--color-info-bg); color: #1e40af; }
.alert-ok { background: var(--color-success-bg); color: #166534; }
.ocr-tag.warn { color: var(--color-warning); background: var(--color-warning-bg); }
.ocr-tag.err { color: var(--color-danger); background: var(--color-danger-bg); }
.ocr-tag.busy { color: var(--color-accent); background: var(--color-info-bg); }
td.missing input, td.missing select { border-color: var(--color-warning); background: #fffbeb; }
.modal-box { max-height: 90vh; overflow: auto; }
.modal-box.wide { width: 720px; }
.sticky-bar { position: sticky; bottom: 0; z-index: 4; margin-top: 16px; }

/* 出差卡片 / 调度看板 */
.sched-wrap { overflow-x: auto; }
.sched { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.sched th, .sched td { border-bottom: 1px solid var(--color-border); border-right: 1px solid var(--color-border); padding: 6px 6px; text-align: center; white-space: nowrap; }
.sched th:first-child, .sched td:first-child { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; min-width: 90px; }
.sched thead th { background: var(--color-bg-subtle); font-weight: 600; color: var(--color-text-secondary); }
.sched th.we, .sched td.we { background: #fafafb; }
.sched th.today { color: var(--color-accent); }
.sched .cell { border-radius: 5px; padding: 3px 4px; font-size: 11px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto; }
.sched .c-trip { background: #e0f2fe; color: #0369a1; font-weight: 600; }
.sched .c-trip.pending { background: repeating-linear-gradient(45deg,#e0f2fe,#e0f2fe 4px,#f0f9ff 4px,#f0f9ff 8px); color: #0369a1; }
.sched .c-leave { background: #f3e8ff; color: #7c3aed; }
.sched .c-work { background: var(--color-info-bg); color: var(--color-accent); }
.sched .c-empty { color: var(--color-text-tertiary); }
.sched .c-book { background: #fef3c7; color: #92400e; border: 1px dashed #f59e0b; }
.sched .c-book.ok { border-style: solid; }
.sched tbody tr:hover td { background: #fbfcfe; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--color-text-secondary); }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.day-cell .day-trip { font-size: 10px; color: #0369a1; margin-top: 2px; }

/* 柱状图 - 分组 */
.bar-chart .bar-group { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar-chart .bar.warn { background: var(--color-warning); }
.hbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.hbar .name { width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; height: 14px; background: var(--color-bg-subtle); border-radius: 4px; overflow: hidden; display: flex; }
.hbar .track .a { background: var(--color-accent); }
.hbar .track .b { background: var(--color-warning); }
.hbar .val { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }

/* 手机/窄屏 */
.menu-toggle { display: none; border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px 8px 4px 0; }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .desc-list { grid-template-columns: repeat(2, 1fr); }
  .desc-list .span-3 { grid-column: span 2; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; background: #fff; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  body.nav-open .sidebar { transform: none; }
  .menu-toggle { display: inline-block; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .user-menu-btn .uname-wrap { display: none; }
  .form-inline { flex-direction: column; gap: 0; }
  .table-scroll { overflow-x: auto; }
  .page-header { flex-direction: column; gap: 12px; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .table-toolbar .filters { flex-wrap: wrap; }
}
.table-scroll { overflow-x: auto; }
@media print {
  .sidebar, .topbar, .no-print, .toast-wrap { display: none !important; }
  .content { padding: 0; }
  .card { border: none; box-shadow: none; }
}
.btn { white-space: nowrap; }
td.num, th { white-space: nowrap; }
.table-toolbar { flex-wrap: wrap; }
.table-toolbar .filters { flex-wrap: wrap; align-items: center; }
.month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hbar .name { width: 36%; flex-shrink: 0; }
.hbar .track { min-width: 60px; }
.hbar .val { width: auto; min-width: 72px; flex-shrink: 0; }

/* ---------- 打印：A4 报销单（只在打印时显示） ---------- */
#printSheet { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 10mm; }
  html, body { background: #fff !important; }
  body > #app, .toast-wrap, .modal-mask { display: none !important; }
  #printSheet { display: block; color: #000; font-size: 10.5pt; line-height: 1.4; }
  .ps table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .ps th, .ps td { border: 1px solid #333; padding: 4px 6px; vertical-align: middle; white-space: normal; word-break: break-all; text-align: left; font-size: 10pt; color: #000; }
  .ps tbody tr:hover { background: none; }
  .ps th { background: #f2f2f2; font-weight: 600; }
  .ps .c { text-align: center; }
  .ps .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ps .mono { font-size: 8.5pt; }
  .ps-head { text-align: center; margin-bottom: 8px; }
  .ps-title { font-size: 18pt; font-weight: 700; letter-spacing: 4px; margin-bottom: 4px; }
  .ps-meta { display: flex; justify-content: space-between; font-size: 9.5pt; }
  .ps-info { margin-bottom: 6px; }
  .ps-info th { width: 13%; }
  .ps-items thead th { text-align: center; }
  .ps-items tr { page-break-inside: avoid; }
  .ps-items tfoot td { border-top: 1.5px solid #000; }
  .ps-sign { margin-top: 6px; }
  .ps-sign td { width: 25%; height: 62px; vertical-align: top; }
  .ps-sign-label { font-size: 9pt; color: #444; }
  .ps-sign-name { font-weight: 600; margin-top: 4px; min-height: 16px; }
  .ps-sign-date, .ps-sign-note { font-size: 8.5pt; color: #444; }
  .ps-foot { margin-top: 6px; font-size: 8.5pt; color: #666; text-align: right; }
}
@media print {
  .ps .c, .ps .mono { white-space: nowrap; }
  .ps .mono { font-size: 8pt; letter-spacing: -0.2px; }
  .ps-info th { width: 15%; white-space: nowrap; }
}

/* ---------- FDE 协作：任务看板、星级、卡片 ---------- */
.stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
.stars .off { color: #e5e7eb; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 10px; min-height: 200px; }
.kanban-col h4 { margin: 2px 4px 10px; font-size: 13px; display: flex; justify-content: space-between; color: var(--color-text-secondary); }
.task-card { background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow-card); display: block; }
.task-card:hover { border-color: var(--color-accent); }
.task-card .t-title { font-weight: 600; font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
.task-card .t-meta { font-size: 11.5px; color: var(--color-text-tertiary); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.task-card .t-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; }
.task-card.overdue { border-left: 3px solid var(--color-danger); }
.prio-high { color: var(--color-danger); font-weight: 700; }
.prio-low { color: var(--color-text-tertiary); }
.hall-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 16px 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; }
.hall-card:hover { border-color: var(--color-accent); }
.hall-card .h-title { font-size: 15px; font-weight: 700; }
.hall-card .h-price { font-size: 18px; font-weight: 700; color: var(--color-accent); }
.hall-card .h-meta { font-size: 12.5px; color: var(--color-text-secondary); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hall-card .h-desc { font-size: 13px; color: var(--color-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.talent-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 16px; box-shadow: var(--shadow-card); display: flex; gap: 12px; cursor: pointer; }
.talent-card:hover { border-color: var(--color-accent); }
.talent-card .avatar { width: 42px; height: 42px; font-size: 16px; flex-shrink: 0; }
.talent-card .avatar.ext { background: #7c3aed; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.login-box input[type=checkbox], .login-box input[type=radio] { width: auto; }
.stack-bar .seg.c { background: #7c3aed; }

/* ---------- 登录页品牌区：公司名 + 方形 Logo 位（放入 img/logo.png 即自动显示） ---------- */
.login-page { flex-direction: column; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.brand-logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; border: 1.5px dashed #cfd4dc; background: var(--color-bg-subtle); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.brand-logo:has(img) { border: none; background: transparent; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-company { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); letter-spacing: 2px; margin-bottom: 2px; }
.brand h1 { margin: 0; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--color-text-tertiary); text-align: center; }
.sidebar-logo-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.sidebar-company { font-size: 11px; font-weight: 600; color: var(--color-text-tertiary); letter-spacing: 1px; line-height: 1.2; }

/* 项目推进流程条 */
.flow-bar { display: flex; align-items: flex-start; background: var(--color-surface, #fff); border: 1px solid var(--color-border); border-radius: var(--radius-card, 10px); padding: 14px 16px; margin-bottom: 16px; overflow-x: auto; }
.flow-step { flex: 0 0 auto; width: 84px; text-align: center; cursor: default; }
.flow-step[data-flow] { cursor: pointer; }
.flow-step .dot { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; margin: 0 auto 6px; font-size: 12px; font-weight: 700; background: var(--color-bg-subtle); color: var(--color-text-tertiary); }
.flow-step .nm { font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); }
.flow-step .tx { font-size: 11.5px; color: var(--color-text-tertiary); margin-top: 2px; white-space: nowrap; }
.flow-step.done .dot { background: var(--color-success); color: #fff; }
.flow-step.next .dot { background: var(--color-accent); color: #fff; box-shadow: 0 0 0 4px var(--color-info-bg); }
.flow-step.next .nm { color: var(--color-accent); }
.flow-step.warn .dot { background: var(--color-danger); color: #fff; }
.flow-step.warn .tx { color: var(--color-danger); }
.flow-line { flex: 1 0 16px; height: 2px; background: var(--color-border); margin-top: 13px; }
