/* ============================================================
   车间考勤 · 请假 / 调休管理  |  共用样式
   ============================================================ */

:root {
  --bg: #f3f5f3;
  --surface: #ffffff;
  --surface-2: #fafbfa;
  --ink: #16211c;
  --ink-2: #47544e;
  --muted: #808c86;
  --line: #e2e6e2;
  --line-2: #eef1ee;
  --primary: #16694c;
  --primary-2: #0f5139;
  --primary-soft: #e6f2ec;
  --amber: #a85806;
  --amber-soft: #fdf2e3;
  --red: #b02a2a;
  --red-soft: #fdeaea;
  --blue: #2458b8;
  --blue-soft: #e9effb;
  --gray: #5b665f;
  --gray-soft: #eef0ee;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 32, 24, .04), 0 6px 18px rgba(16, 32, 24, .04);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

.hide { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

.brand .dot {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 600;
}

.topbar .spacer { flex: 1; }

.topnav { display: flex; gap: 4px; }

.topnav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}

.topnav a:hover { background: var(--line-2); color: var(--ink); }
.topnav a.on { background: var(--primary-soft); color: var(--primary-2); font-weight: 500; }

/* ---------------------------------------------------------- 通用容器 */

.wrap { max-width: 1360px; margin: 0 auto; padding: 22px 24px 48px; }
.wrap-sm { max-width: 560px; margin: 0 auto; padding: 0 16px 120px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}

.card-hd h2 { font-size: 15px; font-weight: 600; }
.card-hd .sub { font-size: 12px; color: var(--muted); margin-left: 2px; }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 16px 20px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}

.btn:hover { background: var(--surface-2); border-color: #d3dad5; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }

.btn-ok { background: var(--primary-soft); border-color: #cfe3d8; color: var(--primary-2); }
.btn-ok:hover { background: #d9ebe2; }

.btn-no { background: var(--red-soft); border-color: #f3d2d2; color: var(--red); }
.btn-no:hover { background: #fbdcdc; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 13px 20px; font-size: 15px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* ---------------------------------------------------------- 标签 / 徽标 */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.tag.blue  { background: var(--blue-soft);  color: var(--blue); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red   { background: var(--red-soft);   color: var(--red); }
.tag.gray  { background: var(--gray-soft);  color: var(--gray); }
.tag.green { background: var(--primary-soft); color: var(--primary-2); }
.tag.line  { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------------------------------------------------------- 统计卡 */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 30px; font-weight: 600; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.stat.accent .v { color: var(--primary); }
.stat.warn .v { color: var(--amber); }
.stat .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--line);
}
.stat.accent .bar { background: var(--primary); }
.stat.warn .bar { background: #e0a33c; }

/* ---------------------------------------------------------- 看板布局 */

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}

.date-nav { display: flex; align-items: center; gap: 8px; }
.date-nav .today-label { font-size: 15px; font-weight: 600; min-width: 132px; text-align: center; }
.date-nav .today-label span { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }

/* 车间分组 */
.ws-group { border-bottom: 1px solid var(--line-2); }
.ws-group:last-child { border-bottom: 0; }

.ws-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--surface-2);
  border-left: 3px solid #cfd8d2;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.ws-hd .num {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* 在休人员行 */
.off-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-2);
}
.off-row:last-child { border-bottom: 0; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary-2);
  font-weight: 600;
  font-size: 15px;
}
.avatar.pending { background: var(--amber-soft); color: var(--amber); }

.off-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.off-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.off-reason {
  font-size: 12.5px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.off-reason .lb { color: var(--muted); }
.off-right { text-align: right; }
.off-right .ret { font-size: 12.5px; color: var(--ink-2); }
.off-right .days { font-size: 12px; color: var(--muted); }

.pending-strip {
  background: #fffdf8;
}
.pending-strip .off-row { background: transparent; }

/* 空状态 */
.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
}
.empty .big {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 4px;
}
.empty .ico {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 22px;
}

/* 7 日趋势 */
.bars { display: flex; align-items: stretch; gap: 8px; padding-top: 4px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-track { width: 100%; height: 84px; display: flex; align-items: flex-end; justify-content: center; }
.bar-col .bar-v {
  width: 100%;
  max-width: 42px;
  border-radius: 6px 6px 3px 3px;
  background: var(--primary-soft);
  border: 1px solid #cfe3d8;
  min-height: 4px;
  transition: height .3s;
}
.bar-col.hot .bar-v { background: #d6e9df; border-color: #b9d7c7; }
.bar-col .bar-n { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.bar-col .bar-d { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bar-col.is-today .bar-d { color: var(--primary); font-weight: 600; }

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

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.step-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.step-hd .idx {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: grid; place-items: center;
  flex: none;
}
.step-hd h3 { font-size: 14.5px; font-weight: 600; }
.step-hd .hint { font-size: 12px; color: var(--muted); margin-left: auto; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field label .opt { color: var(--muted); font-weight: 400; margin-left: 4px; }

input[type="text"], input[type="date"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 105, 76, .1);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5L6 8.5L10 4.5' fill='none' stroke='%23808c86' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 分段选择 */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  flex: 1;
  min-width: 0;
  padding: 11px 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.seg button:hover { border-color: #cbd4ce; }
.seg button.on {
  background: var(--primary-soft);
  border-color: #b6d5c6;
  color: var(--primary-2);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #b6d5c6;
}
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg.types button { text-align: left; padding: 12px 14px; }
.seg.types button .t { font-size: 15px; font-weight: 500; display: block; }
.seg.types button .d { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; }
.seg.types button.on .d { color: var(--primary); }

/* 员工选择 */
.search-box { position: relative; margin-bottom: 12px; }
.search-box input { padding-left: 36px; }
.search-box .ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.person {
  padding: 10px 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  overflow: hidden;
}
.person:hover { border-color: #c6d2cb; background: #fff; }
.person .n { font-size: 14.5px; font-weight: 500; }
.person .w { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person.on {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.person.on .n { color: var(--primary-2); font-weight: 600; }
.person.on .w { color: var(--primary); }

.picked {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  border: 1px solid #cfe3d8;
}
.picked .n { font-size: 15px; font-weight: 600; color: var(--primary-2); }
.picked .m { font-size: 12px; color: var(--primary); }
.picked .spacer { flex: 1; }

/* 快捷标签（当前未使用，保留以便后续扩展） */
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* 底部提交条 */
.submit-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.submit-bar .inner { max-width: 560px; margin: 0 auto; }

.form-note {
  font-size: 12.5px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f5e0c3;
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.form-note b { font-weight: 600; }

.err-msg {
  font-size: 12.5px;
  color: var(--red);
  margin-top: 8px;
  display: none;
}
.err-msg.show { display: block; }

/* ---------------------------------------------------------- 员工端头部 */

.apply-head { padding: 26px 4px 18px; }
.apply-head .org { font-size: 12px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.apply-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.3px; margin-top: 4px; }
.apply-head p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------------------------------------------------------- 成功页 */

.success { padding: 40px 20px 24px; text-align: center; }
.success .tick {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
}
.success h2 { font-size: 20px; font-weight: 600; }
.success .no { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.success .detail {
  margin: 20px auto 0;
  max-width: 380px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.success .detail .r {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-2);
}
.success .detail .r:last-child { border-bottom: 0; }
.success .detail .r .k { color: var(--muted); }
.success .detail .r .v { font-weight: 500; text-align: right; }

.callout {
  margin: 18px auto 0;
  max-width: 380px;
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
  border: 1px solid #f3ddbb;
  color: #7a4404;
  font-size: 13px;
  line-height: 1.55;
}
.callout b { font-weight: 600; }

/* ---------------------------------------------------------- 审批 */

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: var(--r-md); }
.tabs button {
  padding: 7px 16px;
  border: 0;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.tabs button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.req-card { border-bottom: 1px solid var(--line-2); padding: 16px 20px; }
.req-card:last-child { border-bottom: 0; }
.req-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-top .name { font-size: 15px; font-weight: 600; }
.req-top .meta { font-size: 12.5px; color: var(--muted); }
.req-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
}
.req-body .k { font-size: 11.5px; color: var(--muted); }
.req-body .v { font-size: 13.5px; font-weight: 500; }
.req-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-actions input { flex: 1; min-width: 160px; padding: 8px 12px; font-size: 13px; }

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

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table input, .table select { padding: 6px 9px; font-size: 13px; border-radius: var(--r-sm); }
.table .num input { width: 76px; text-align: center; }

/* ---------------------------------------------------------- 自填写下拉（组合框） */

.combo { position: relative; }

.combo > input { padding-right: 26px; }

.combo-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -2px;
  font-size: 0;
  line-height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aa5a0;
  pointer-events: none;
}

.combo-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  display: none;
  max-height: 208px;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(16, 32, 24, .12);
}

.combo-panel.show { display: block; }

.combo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.ci-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ci-del {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  opacity: .45;
  cursor: pointer;
  transition: opacity .12s, background .12s, color .12s;
}

.combo-item:hover .ci-del { opacity: 1; }
.ci-del:hover { background: var(--red-soft); color: var(--red); }

.combo-item:hover { background: var(--primary-soft); color: var(--primary-2); }
.combo-item.on { background: var(--primary-soft); color: var(--primary-2); font-weight: 500; }
.combo-item.new { color: var(--primary); font-weight: 500; }
.combo-empty { padding: 8px 10px; font-size: 12px; color: var(--muted); }

.row-acts { display: flex; gap: 6px; }

.btn-danger { color: var(--red); border-color: #f0d6d6; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #e8c5c5; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #95211f; border-color: #95211f; }

.gate-box .lock.danger { background: var(--red-soft); color: var(--red); }

/* ---------------------------------------------------------- 登录遮罩 */

.gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(22, 33, 28, .45);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 20px;
}
.gate.show { display: grid; }
.gate-box {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  text-align: center;
}
.gate-box .lock {
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
}
.gate-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.gate-box p { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.gate-box p.gate-desc {
  text-align: left;
  white-space: pre-line;
  line-height: 1.7;
  padding: 0 2px;
}
.gate-box input { text-align: center; letter-spacing: 6px; font-size: 20px; margin-bottom: 12px; }

/* ---------------------------------------------------------- 二维码 */

.qr-panel { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: center; }
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  line-height: 0;
}
.qr-box svg, .qr-box img { width: 100%; height: auto; display: block; }
.qr-url {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  word-break: break-all;
  color: var(--ink-2);
}

/* ---------------------------------------------------------- 提示条 */

.toast-wrap {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: #1f2d26;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toastIn .2s ease-out;
}
.toast.err { background: #8f2222; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 1080px) {
  .board-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .wrap { padding: 16px 14px 40px; }
  .topbar { padding: 10px 14px; gap: 8px; overflow-x: auto; }
  .topnav a { padding: 6px 10px; }
  .stat .v { font-size: 25px; }
  .off-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .off-reason { display: none; }
  .req-body { grid-template-columns: repeat(2, 1fr); }
  .qr-panel { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(3, 1fr); }
  .card-hd { padding: 14px 14px; flex-wrap: wrap; }
  .card-bd { padding: 14px; }
  .ws-hd { padding: 8px 14px; }
  .req-card { padding: 14px; }
}

@media print {
  .topbar, .submit-bar, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .stat { box-shadow: none; }
}

/* ============================================================
   角色与权限相关（v2）
   ============================================================ */

/* 顶栏角色徽标 */
.role-badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary-2);
  border: 1px solid #cfe4d9;
  white-space: nowrap;
}
.role-badge[data-role="admin"] {
  background: #eef1fb;
  color: #2b3f8f;
  border-color: #d6dcf3;
}

/* 只读提示条 */
.perm-note {
  background: var(--amber-soft);
  border: 1px solid #f3ddbb;
  color: var(--amber);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 14px;
}

/* 权限矩阵表 */
.perm-table { font-size: 12.5px; }
.perm-table th, .perm-table td { padding: 8px 10px; }
.perm-table td.yes { color: var(--primary); font-weight: 500; }
.perm-table td.no { color: var(--muted); }

/* 操作记录 */
.audit-list { border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.audit-row {
  display: grid;
  grid-template-columns: 118px 74px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--line-2);
}
.audit-row:last-child { border-bottom: 0; }
.audit-row .at { color: var(--muted); font-variant-numeric: tabular-nums; }
.audit-row .who { color: var(--ink-2); font-weight: 500; }
.audit-row .what { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 登录页 / 扫码提示页 */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef4f0 0%, #f6f7f4 55%, #eaf0ec 100%);
  padding: 24px 16px;
}
.login-body .wrap-sm { padding-bottom: 0; width: 100%; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 26px 24px 22px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .dot {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 600;
}
.login-brand .t { font-size: 16px; font-weight: 600; }
.login-brand .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.login-roles {
  margin-top: 18px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.login-roles b { color: var(--ink-2); font-weight: 600; margin-right: 6px; }
.login-foot {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* 扫码提示页 */
.scan-gate { text-align: center; }
.scan-ico {
  width: 62px; height: 62px;
  margin: 4px auto 16px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
}
.scan-gate h1 { font-size: 19px; font-weight: 600; }
.scan-gate p { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin-top: 10px; }
.scan-tips {
  margin-top: 18px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}

/* 员工端 */
.field-tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.mine-row {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.mine-row:last-child { margin-bottom: 0; }
.mine-top { display: flex; align-items: center; gap: 8px; }
.mine-type { font-size: 13px; font-weight: 500; }
.mine-id { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mine-body { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.mine-reason { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mine-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

@media (max-width: 720px) {
  .audit-row { grid-template-columns: 1fr; gap: 2px; }
  .perm-table { font-size: 11.5px; }
  .perm-table th, .perm-table td { padding: 6px 6px; }
}
