:root {
  --el-color-primary: #3370ff;
  --el-color-primary-light-3: #709bff;
  --el-color-primary-light-5: #99b8ff;
  --el-color-primary-light-7: #c2d4ff;
  --el-color-primary-light-8: #d6e2ff;
  --el-color-primary-light-9: #ebf1ff;
  --el-color-primary-dark-2: #295acc;
  --bg: #f2f3f5;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --line: #e5e6eb;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; font-size: 14px; }
a { color: var(--el-color-primary); text-decoration: none; cursor: pointer; }
a:hover { opacity: .85; }

/* ---------- 框架 ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: #fff; display: flex; align-items: center;
  padding: 0 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); z-index: 20; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #ffb340, #ff7d1a); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-right: 12px; }
.company { font-size: 15px; color: var(--text); margin-right: 10px; }
.edition { background: linear-gradient(90deg, #fbe3c4, #f6c995); color: #8a5a1f; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 22px; color: var(--text); }
.topbar .right .item { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e8f0ff; color: var(--el-color-primary); display: flex;
  align-items: center; justify-content: center; font-weight: 600; }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 2px; }

.sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 168px; background: #fff; padding: 16px 0; z-index: 10; }
.nav { margin: 0 12px 6px; height: 40px; border-radius: 6px; display: flex; align-items: center; padding: 0 12px; gap: 10px;
  cursor: pointer; color: var(--text); }
.nav:hover { background: #f2f3f5; }
.nav.active { background: var(--el-color-primary); color: #fff; }
.nav .el-icon { font-size: 16px; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 16px; }

.main { margin-left: 168px; padding: 72px 16px 16px; min-height: 100vh; }
.card { background: #fff; border-radius: 8px; padding: 16px 16px; }
.card-title { font-size: 16px; font-weight: 500; display: flex; align-items: center; margin-bottom: 14px; }
.card-title .extra { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 14px; font-weight: 400; }

/* ---------- 首页 ---------- */
.home-top { display: grid; grid-template-columns: 1fr 480px; gap: 16px; margin-bottom: 16px; }
.hero { position: relative; height: 180px; border-radius: 4px; padding: 34px 24px; overflow: hidden;
  background: linear-gradient(100deg, #e9efff 0%, #eef3ff 45%, #f6f8ff 100%); }
.hero h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: .5px; }
.hero p { margin: 0 0 24px; color: var(--text-2); }
.hero-art { position: absolute; right: 30px; top: 14px; width: 220px; height: 150px; }
.receipt-head { background: #f5f6f8; border-radius: 6px; padding: 12px 14px; display: flex; color: var(--text); margin-bottom: 26px; }
.receipt-head .time { margin-left: auto; color: var(--text-2); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 0 4px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 18px; }
.stat .label { color: var(--text); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.stat .num { font-size: 28px; margin: 8px 0 8px; font-weight: 400; }
.stat .num small { font-size: 14px; color: var(--text-2); }
.pill { display: inline-block; background: var(--el-color-primary); color: #fff; font-size: 12px; border-radius: 10px; padding: 1px 9px; }
.pill.green { background: #34c724; }
.pill.orange { background: #ff8800; }
.pill.gray { background: #c9cdd4; }
.empty-receipt { color: var(--text-3); text-align: center; padding: 48px 0; }
.toolbar { display: flex; align-items: center; gap: 10px; }

/* ---------- 向导 ---------- */
.wizard { background: #fff; border-radius: 8px; min-height: calc(100vh - 88px); position: relative; padding-bottom: 64px; }
.steps { display: flex; justify-content: center; align-items: center; height: 52px; border-bottom: 1px solid var(--line); gap: 10px; position: relative; }
.steps .back { position: absolute; left: 16px; }
.step { display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.step .dot { width: 18px; height: 18px; border-radius: 50%; background: #c9cdd4; color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center; }
.step.active { color: var(--el-color-primary); font-weight: 500; }
.step.active .dot { background: var(--el-color-primary); }
.step.done { color: var(--text-2); }
.step.done .dot { background: #fff; border: 1px solid var(--el-color-primary); color: var(--el-color-primary); }
.step-line { width: 90px; border-top: 1px dashed #c9cdd4; }

.upload-wrap { width: 420px; margin: 40px auto 0; }
.upload-wrap .el-date-editor.el-input, .upload-wrap .el-date-editor.el-input__wrapper { width: 100% !important; --el-date-editor-width: 100%; }
.upload-wrap .el-upload, .upload-wrap .el-upload-dragger { width: 100%; }
.month-tip { color: var(--text-3); font-size: 12px; margin: -8px 0 12px; }
.upload-wrap .el-upload-dragger { padding: 40px 20px; border-style: dashed; border-color: #7aa2ff; background: #fafbff; }
.excel-icon { width: 46px; height: 54px; margin: 0 auto 14px; position: relative; }
.upload-tip { color: var(--text-2); font-size: 12px; line-height: 20px; margin-top: 10px; }
.upload-tip em { color: #ff8800; font-style: normal; }
.newbie { margin-top: 18px; background: #fff7e8; border: 1px solid #ffd591; border-radius: 4px; padding: 8px 12px; display: flex;
  align-items: center; font-size: 12px; color: var(--text); }
.newbie .el-button { margin-left: auto; }

.check-bar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.ok-text { display: flex; align-items: center; gap: 6px; }
.ok-text .el-icon { color: #34c724; font-size: 18px; }
.warn-text { color: #f54a45; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.check-bar .search { margin-left: auto; width: 220px; }
.table-wrap { padding: 0 16px; }
.footer-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; border-top: 1px solid var(--line); display: flex;
  align-items: center; justify-content: flex-end; padding: 0 16px; gap: 8px; background: #fff; border-radius: 0 0 8px 8px; }
.row-unmatched td { background: #fff5f5 !important; }
.el-table th.el-table__cell { background: #f5f8ff; color: var(--text); font-weight: 400; }

.send-layout { display: flex; justify-content: center; gap: 60px; padding: 24px 16px; }
.send-form { width: 470px; }
.form-section { font-weight: 600; margin: 6px 0 16px; }
.form-row { display: flex; margin-bottom: 18px; align-items: flex-start; }
.form-row > label { width: 72px; color: var(--text-2); line-height: 32px; flex-shrink: 0; }
.form-row > .ctl { flex: 1; min-width: 0; }
.hint { color: var(--text-2); line-height: 32px; }
.tree-box { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tree-scroll { max-height: 220px; overflow: auto; padding: 6px 4px; transition: max-height .2s; }
.tree-scroll.expanded { max-height: 520px; }
.tree-more { height: 32px; background: var(--el-color-primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.more-box { background: #f7f8fa; border-radius: 6px; padding: 14px 14px 2px; }

/* 手机预览 */
.phone { width: 300px; height: 600px; border: 10px solid #1f2329; border-radius: 36px; overflow: hidden; background: #eef0f4;
  box-shadow: 0 10px 30px rgba(0,0,0,.15); flex-shrink: 0; position: sticky; top: 80px; }
.phone-title { height: 36px; background: #f7f7f7; border-bottom: 1px solid #e5e5e5; text-align: center; line-height: 36px; font-size: 13px; }
.phone-body { height: calc(100% - 36px); overflow: auto; zoom: .82; }
.preview-caption { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 8px; }

/* ---------- 详情 ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 24px; }
.detail-head h3 { margin: 0 0 8px; font-size: 18px; }
.detail-head .meta { color: var(--text-2); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
.detail-head .actions { margin-left: auto; display: flex; gap: 8px; }
.detail-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; background: #f7f8fa; border-radius: 6px; padding: 14px 18px; }
.sub { color: var(--text-3); font-size: 12px; }
.fb { background: #fff7e8; border-radius: 4px; padding: 4px 8px; font-size: 12px; line-height: 18px; }
.fb .reply { color: var(--el-color-primary); margin-top: 2px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.kv { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 8px 0; }
.kv .k { color: var(--text-2); }
.kv-group { grid-column: 1 / -1; font-weight: 600; margin-top: 12px; }

/* ---------- 列表表格：无竖线、浅色表头、行悬停；时间列不换行，金额等宽右对齐 ---------- */
.list-table { --el-table-border-color: #eef0f3; --el-table-row-hover-bg-color: #f7f9fc; --el-table-header-text-color: var(--text-2); }
.list-table th.el-table__cell { background: #f7f8fa !important; color: var(--text-2); font-weight: 500; height: 44px; }
.list-table td.el-table__cell { padding: 10px 0; }
.list-table .cell { line-height: 20px; }
.el-table .nowrap .cell { white-space: nowrap; }
.list-table .el-table__inner-wrapper::before { background-color: #eef0f3; }
.cell-main { color: var(--text); }
.amount { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); }
.text-danger { color: #f54a45; }
.text-warning { color: #ff8800; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.el-date-editor.month-range { width: 240px; flex: none; --el-date-editor-monthrange-width: 240px; }

/* 上传核对：表头标出实发 / 税前 / 应发对应的列 */
.role-head { color: var(--el-color-primary); font-weight: 600; }
.role-tag { display: inline-block; margin-left: 4px; padding: 0 4px; font-size: 11px; line-height: 16px; border-radius: 3px;
  background: var(--el-color-primary); color: #fff; font-weight: 400; vertical-align: 1px; }
.wizard-alerts { display: grid; gap: 8px; padding: 0 16px 10px; }
/* 反馈对话 */
.thread { max-height: 320px; overflow: auto; margin-bottom: 12px; }
.thread .msg { padding: 8px 12px; border-radius: 8px; background: #f5f6f8; margin-bottom: 8px; font-size: 13px; line-height: 20px; }
.thread .msg.hr { background: #ebf1ff; }
.thread .msg .who { display: flex; justify-content: space-between; gap: 12px; color: var(--text-3); font-size: 12px; }
.thread .msg.hr .who { color: var(--el-color-primary); }
.thread .msg .c { color: var(--text); white-space: pre-wrap; word-break: break-all; }
.fb-wait { margin-right: 6px; vertical-align: 1px; }
/* 列表合计行 */
.list-table .el-table__footer-wrapper td.el-table__cell { background: #f7f8fa; color: var(--text); font-weight: 600; }
.list-table .el-table__footer-wrapper .cell { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 员工档案 ---------- */
.org-chip { margin-left: 12px; font-weight: 400; }
.emp-layout { display: flex; gap: 16px; align-items: flex-start; }
.emp-main { flex: 1; min-width: 0; }
.org-panel { width: 264px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc;
  position: sticky; top: 72px; overflow: hidden; }
.org-search { padding: 10px; border-bottom: 1px solid var(--line); background: #fff; }
.org-scroll { height: calc(100vh - 336px); min-height: 320px; }
.org-panel .el-tree { background: transparent; padding: 6px 6px 12px; --el-tree-node-hover-bg-color: #eef2fb; color: var(--text); }
/* 名称单行显示，超出省略，悬停看全称；行高固定 */
.org-panel .el-tree-node__content { height: 34px; border-radius: 6px; margin-bottom: 1px; }
.org-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { background: var(--el-color-primary-light-9); color: var(--el-color-primary); }
.org-node { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding-right: 6px; font-size: 13px; }
.org-node .ic { flex-shrink: 0; font-size: 15px; color: var(--text-3); }
.org-node.t-ROOT .ic, .org-node.t-SUB .ic { color: var(--el-color-primary); }
.org-node.t-ROOT { font-weight: 600; }
.org-node .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node .hide-btn { display: none; flex-shrink: 0; width: 22px; height: 22px; border-radius: 4px; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; }
.org-node .hide-btn:hover { background: #e3e6eb; color: var(--text); }
.org-panel .el-tree-node__content:hover .org-node .hide-btn { display: inline-flex; }
.org-foot { border-top: 1px solid var(--line); background: #fff; padding: 8px 12px; }
.org-foot .el-button { color: var(--text-2); font-size: 13px; }
.org-foot .el-button .el-icon { margin-right: 4px; }
.org-foot .el-button:hover { color: var(--el-color-primary); }
.org-foot .cnt { margin-left: 6px; font-size: 12px; line-height: 18px; padding: 0 6px; color: var(--text-2); background: #eceef2; border-radius: 9px; }
.org-node .cnt { flex-shrink: 0; min-width: 22px; text-align: center; font-size: 12px; line-height: 18px; padding: 0 6px;
  color: var(--text-2); background: #eceef2; border-radius: 9px; }
.el-tree-node.is-current > .el-tree-node__content .org-node .cnt { background: var(--el-color-primary); color: #fff; }

.row-actions { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.row-actions .el-button.act { height: 28px; padding: 0 8px; margin: 0; border-radius: 6px; font-size: 13px; color: var(--el-color-primary); }
.row-actions .el-button.act .el-icon { margin-right: 4px; font-size: 14px; }
.row-actions .el-button.act:hover, .row-actions .el-button.act:focus-visible { background: var(--el-color-primary-light-9); color: var(--el-color-primary); }
.row-actions .el-button.act.warn { color: #ff8800; }
.row-actions .el-button.act.warn:hover, .row-actions .el-button.act.warn:focus-visible { background: #fff4e5; color: #ff8800; }
.row-actions .el-button.act.more { padding: 0 7px; color: var(--text-2); }
.row-actions .el-button.act.more .el-icon { margin-right: 0; }
.row-actions .el-button.act.more:hover { background: #f0f1f3; color: var(--text); }
.el-dropdown-menu__item.danger-item, .el-dropdown-menu__item.danger-item:not(.is-disabled):hover,
.el-dropdown-menu__item.danger-item:not(.is-disabled):focus { color: #f54a45; }
.el-dropdown-menu__item.danger-item:not(.is-disabled):hover, .el-dropdown-menu__item.danger-item:not(.is-disabled):focus { background: #fff1f0; }

/* ---------- 设置 ---------- */
.guide ol { padding-left: 20px; line-height: 2; color: var(--text-2); margin: 0; }
.guide code { background: #f2f3f5; padding: 1px 6px; border-radius: 3px; color: #d6336c; }
.mock-banner { background: #fff7e8; border: 1px solid #ffd591; color: #ad6800; padding: 8px 14px; border-radius: 6px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- 登录 ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8efff, #f5f7ff 60%, #fff); }
.login-card { width: 380px; background: #fff; border-radius: 12px; padding: 36px 32px; box-shadow: 0 10px 40px rgba(51,112,255,.12); }
.login-card h2 { margin: 0 0 6px; }
.login-card p { color: var(--text-2); margin: 0 0 24px; }

/* ---------- 员工端样式（手机预览复用） ---------- */
.m-banner { height: 90px; position: relative; background: linear-gradient(#b8e3ff, #d6f0ff); overflow: hidden; }
.m-month { position: absolute; left: 70px; top: 22px; background: rgba(255,255,255,.92); border-radius: 18px; padding: 6px 14px; font-size: 15px; }
.m-card { background: #fff; border-radius: 8px; margin: 8px 8px 0; padding: 12px 14px; position: relative; }
.m-card:first-of-type { margin-top: -10px; }
.m-sec { font-weight: 600; border-left: 3px solid #3370ff; padding-left: 8px; margin: 0 0 6px -14px; font-size: 15px; }
.m-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eceef1; font-size: 14px; }
.m-row:last-child { border-bottom: 0; }
.m-row .v { color: var(--text); }
.m-row.sub .k, .m-row.sub .v { color: #8f959e; }
.m-row.hl .v { color: #f54a45; font-weight: 600; }
.m-group { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eceef1; }

/* 登录页：只保留企业微信登录 */
.login-tip { margin: 12px 0 0; text-align: center; font-size: 12px; color: #8f959e; }
