/* ============================================================
   小熊摇篮员工工作台 - 样式
   品牌配色：奶油底 + 琥珀黄主色（VI 色值可直接替换 :root 变量）
   ============================================================ */
:root {
  --bg: #FBF6EC;
  --card: #FFFFFF;
  --ink: #46392B;
  --ink-2: #8A7A66;
  --brand: #F5A623;
  --brand-deep: #DE8F0F;
  --brand-soft: #FFF1D6;
  --line: #EFE3CE;
  --danger: #D9534F;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(120, 90, 40, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

[hidden] { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
}
.brand b { font-weight: 700; }
.brand-sub {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 400;
  margin-left: 2px;
}
/* 公司 LOGO（横向，自带品牌文字） */
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
}
.brand-logo.sq {
  height: 40px;
  width: 40px;
  border-radius: 10px;
}
/* 品牌区：LOGO 与“员工工作台”之间的竖分隔线 */
.brand-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 4px;
}
/* 品牌区文字：员工工作台 */
.brand-word {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .5px;
  white-space: nowrap;
}
/* 局域网共享按钮标识 */
.btn-card.is-share { position: relative; }
.share-tag {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(70, 57, 43, .72);
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}
.btn-card.is-share .btn-name { padding-right: 34px; }
/* 表单字段下方的小字提示 */
.fld-tip,
.fld small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 400;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.who { font-size: 14px; font-weight: 600; }
.uid {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-2);
  background: #F6EFE3;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 6px;
}
.tag-admin {
  font-style: normal;
  font-size: 11px;
  color: #B26B00;
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 6px;
}

/* ---------------- 布局 ---------------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; }
.foot { text-align: center; color: #B7A98F; font-size: 12px; padding: 6px 0 34px; }
.tip { font-size: 12px; color: var(--ink-2); }
.link { color: var(--brand-deep); }

/* ---------------- 员工选择页 ---------------- */
.hero { text-align: center; padding: 26px 0 6px; }
.hero h1 { font-size: 24px; margin: 0 0 8px; }
.hero p { color: var(--ink-2); font-size: 13px; margin: 0; }
.searchbar { max-width: 420px; margin: 18px auto 22px; }
.searchbar input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
  outline: none;
  font-family: inherit;
}
.searchbar input:focus { border-color: var(--brand); }
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.user-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.user-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
}
.user-card:nth-child(5n+2) .avatar { background: #E8833A; }
.user-card:nth-child(5n+3) .avatar { background: #3BAFA2; }
.user-card:nth-child(5n+4) .avatar { background: #4A90D9; }
.user-card:nth-child(5n+5) .avatar { background: #9B6FD0; }
.u-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; }
.u-meta { font-size: 12px; color: var(--ink-2); }

/* 员工选择页：左侧部门标签 + 右侧员工网格 */
.pick-layout { display: flex; gap: 18px; align-items: flex-start; }
.dept-nav {
  flex: none;
  width: 176px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 16px;
}
.dept-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, color .15s;
}
.dept-tab:hover { border-color: var(--brand); }
.dept-tab.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.dept-tab .dept-n {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  background: #F6EFE3;
  border-radius: 999px;
  padding: 1px 7px;
}
.dept-tab.is-on .dept-n { background: rgba(255, 255, 255, .28); color: #fff; }
.pick-main { flex: 1 1 auto; min-width: 0; }
.pick-empty {
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
  padding: 40px 0;
}
@media (max-width: 640px) {
  .pick-layout { flex-direction: column; }
  .dept-nav {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .dept-tab { width: auto; }
}

/* ---------------- 看板与按钮 ---------------- */
.board {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.board-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.board-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.board-count { margin-left: auto; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.board-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}
.board-icon.sm {
  width: 26px;
  height: 26px;
  font-size: 14px;
  border-radius: 8px;
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
}
.btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 8px;
}
/* 胶囊式按钮：横向布局 + 小图标，压缩垂直空间 */
.btn-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.btn-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(245, 166, 35, .25);
}
.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #FFF6E3;
  flex: none;
}
.btn-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* 图标配色变体 */
.bc-auto   .btn-icon { background: #FFF1D6; }
.bc-orange .btn-icon { background: #FDEBDD; }
.bc-green  .btn-icon { background: #E2F4E8; }
.bc-blue   .btn-icon { background: #E3EEFA; }
.bc-purple .btn-icon { background: #EFE7F9; }
.bc-pink   .btn-icon { background: #FBE7EE; }
.bc-brown  .btn-icon { background: #F3E9DE; }
.bc-teal   .btn-icon { background: #DFF2EF; }

/* 自定义按钮的编辑/删除角标（胶囊内垂直居中于右侧） */
.btn-card.mine .ops {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: none;
  gap: 4px;
}
.btn-card.mine:hover .ops { display: flex; }
.btn-card.mine .btn-name { padding-right: 50px; }
.op {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: #F6EFE3;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1;
  padding: 0;
}
.op:hover { background: #EFE0C6; }
.op-del { color: var(--danger); }
.op-del:hover { background: #FBE3E2; }

/* 触屏设备无 hover：角标常显 */
@media (hover: none) {
  .btn-card.mine .ops { display: flex; opacity: .95; }
}

.add-card { border: 2px dashed #E4D5B8; background: transparent; color: var(--ink-2); }
.add-card:hover { border-color: var(--brand); color: var(--brand-deep); box-shadow: none; }

.empty-slim {
  color: var(--ink-2);
  font-size: 13px;
  padding: 14px;
  background: #FDF8EE;
  border-radius: 10px;
  text-align: center;
}

/* ---------------- 模态框 ---------------- */
.mask {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(60, 45, 25, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.m-ops { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------------- 表单 ---------------- */
.fld { display: block; margin-bottom: 12px; font-size: 13px; color: var(--ink-2); }
.fld small { display: block; font-weight: 400; margin-top: 4px; }
.fld input, .fld select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #FFFDF8;
  color: var(--ink);
  outline: none;
}
.fld input:focus, .fld select:focus { border-color: var(--brand); }
.fld-inline { font-size: 13px; color: var(--ink-2); }
.fld-inline select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: #FFFDF8;
  color: var(--ink);
}
.frm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 4px 14px;
}
.frm-ops { display: flex; gap: 10px; align-items: center; margin-top: 14px; }

.vis-box {
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: #FDF8EE;
  border-radius: 12px;
}
.vis-radios { display: flex; gap: 18px; flex-wrap: wrap; }
.user-pick {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
}
.pick-ops { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.pick-tip { font-size: 12px; color: var(--ink-2); }
.dept { margin-bottom: 4px; }
.dept b { display: block; font-size: 12px; color: var(--ink-2); margin: 6px 0 2px; }
.ck {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 3px 12px 3px 0;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.ck input { accent-color: var(--brand); }

/* ---------------- 按钮 ---------------- */
.primary-btn {
  background: linear-gradient(135deg, #F7B733, #E8890C);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.primary-btn:hover { filter: brightness(1.05); }
.ghost-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.ghost-btn:hover, .ghost-btn.strong { border-color: var(--brand); color: var(--brand-deep); }
.mini {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.mini:hover { border-color: var(--brand); color: var(--brand-deep); }
.mini.danger:hover { border-color: var(--danger); color: var(--danger); }
/* 行内小输入框（账户管理的「改密码」用，与 .mini 按钮同高） */
.mini-inp {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  width: 118px;
  margin-right: 4px;
  vertical-align: middle;
}
.mini-inp:focus { border-color: var(--brand); outline: none; }

/* 色板（前台模态框） */
.swatches { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: 10px; vertical-align: middle; }
.sw {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F6EFE3;
  padding: 0;
}
.sw i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.sw.on { border-color: var(--ink); }

/* 图标快速选择面板（数据/工具/系统/办公） */
.icon-pal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 7px 9px;
  background: #FDF8EE;
  border-radius: 10px;
}
.ip-g {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 3px 0 2px;
}
.ip-e {
  width: 27px;
  height: 27px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.ip-e:hover { background: #fff; border-color: var(--brand); }

/* ---------------- 后台 ---------------- */
.tabs { display: flex; gap: 8px; margin: 6px 0 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 18px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.flash {
  background: #EAF7EF;
  border: 1px solid #BFE6CC;
  color: #2E7D4F;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.panel.slim { padding: 12px 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }

table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
.list th {
  text-align: left;
  padding: 8px 10px;
  background: #FDF8EE;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:hover td { background: #FFFCF4; }
.b-name { font-weight: 600; }
.url { color: var(--ink-2); font-size: 12px; }
.ops-cell { white-space: nowrap; }
.ops-cell form.inline { display: inline; margin-left: 6px; }

.empty {
  background: #fff;
  border-radius: var(--radius);
  padding: 50px 20px;
  text-align: center;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}
.empty h1 { font-size: 20px; color: var(--ink); margin: 0 0 10px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .wrap { padding: 14px 12px 30px; }
  .btn-grid { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 7px; }
  .btn-icon { width: 27px; height: 27px; font-size: 14px; }
  .btn-name { font-size: 12px; }
  .btn-card.mine .btn-name { padding-right: 44px; }
  .topbar-inner { padding: 10px 12px; }
  .brand { font-size: 16px; }
  .brand-sub { display: none; }
  .brand-logo { height: 34px; max-width: 190px; }
  .brand-logo.sq { height: 32px; width: 32px; }
  .brand-word { font-size: 15px; }
  .board { padding: 14px; }
}

/* ---------------- 管理后台登录 ---------------- */
.login-box {
  max-width: 380px;
  margin: 8vh auto 0;
  padding: 30px 32px;
}
.login-box h1 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--ink);
}
.login-box .fld {
  display: block;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}
.login-box .fld input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.login-box .fld input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
}
.login-box .frm-ops { margin-top: 22px; display: flex; align-items: center; gap: 10px; }
.login-err {
  margin: 12px 0 0;
  background: #FDECEC;
  color: #C0392B;
  border: 1px solid #F1C4C4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
/* 登录页副标题 */
.login-sub {
  margin: 6px 0 4px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}
/* 员工卡片：当前登录标识 */
.user-card.is-me {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, .14);
}
.me-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
/* 后台列表状态标签 */
.ok-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #E8F6EC;
  color: #2E7D46;
  border: 1px solid #C4E6D0;
}
@media (max-width: 640px) {
  .login-box { margin-top: 5vh; padding: 22px 20px; }
}

/* ============================================================
   周报模块
   ============================================================ */

/* 页签计数角标 */
.tab-n {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 11px;
  font-style: normal;
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.tab.on .tab-n { background: rgba(255, 255, 255, .3); color: #fff; }

/* 错误提示条 */
.flash.err {
  background: #FDECEC;
  border-color: #F1C4C4;
  color: #C0392B;
}

/* 固定入口按钮（周报，不可删除） */
.btn-card.is-fixed { position: relative; }
.fixed-tag {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  color: var(--brand-deep);
  border: 1px solid var(--line);
}
.btn-card.is-fixed .btn-name { padding-right: 34px; }

/* 面板标题行 */
.rp-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
/* 周次导航面板 / 周报编辑面板 */
.rp-head { padding: 16px 20px; }
.rp-head .rp-title-row { margin-bottom: 10px; }
.rp-form { padding: 18px 20px 16px; }
.rp-title-row h3 {
  margin: 0;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.rp-range { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.rp-updated { font-size: 12px; color: var(--ink-2); }
/* ---------------- 同事周报：同事选择标签（紧凑胶囊） ---------------- */
.mate-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.mate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.5;
  transition: border-color .12s, background .12s;
}
.mate:hover {
  border-color: var(--brand);
  background: #FFFCF4;
}
.mate.on {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.mate-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.mate.on .mate-name { color: var(--brand-deep); }
.mate-tag {
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.mate-tag.ok   { background: #E8F6EC; color: #2E7D46; }
.mate.on .mate-tag.ok { background: #2E7D46; color: #fff; }
.mate-tag.miss { background: #F1EDE4; color: #9A8B76; }
.mate.on .mate-tag.miss { background: #9A8B76; color: #fff; }

.rp-legend { font-size: 12px; color: var(--ink-2); }
.rp-legend .ok { color: #2E7D46; }
.rp-legend .miss { color: #B9793A; }
.miss-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #FDF0DC;
  color: #B9793A;
  border: 1px solid #F0DCBB;
}

/* 周次导航条 */
.wk-bar { display: flex; align-items: stretch; gap: 8px; }
.wk-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.wk-nav:hover { border-color: var(--brand); color: var(--brand-deep); }
.wk-nav.off { opacity: .45; }
.wk-strip {
  flex: 1 1 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wk {
  flex: 1 1 0;
  min-width: 94px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.wk b { font-size: 13px; }
.wk span { font-size: 11px; color: var(--ink-2); }
.wk em {
  font-style: normal;
  font-size: 11px;
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 6px;
  margin-top: 2px;
}
.wk.written { border-color: #C4E6D0; background: #F3FBF6; }
.wk.written em { background: #E8F6EC; color: #2E7D46; }
.wk.missing em { background: #F6F1E8; color: #A08E75; }
.wk.written:hover { border-color: #8FD3AA; }
.wk.missing:hover { border-color: var(--brand); }
.wk.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(245, 166, 35, .25) inset; }
.wk.cur b::after {
  content: '本周';
  margin-left: 4px;
  font-size: 10px;
  font-weight: 400;
  color: var(--brand-deep);
}
.wk-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.wk-hint { font-size: 12px; color: var(--ink-2); }

/* 富文本区块 */
.rt-block {
  margin: 16px 0 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.rt-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: #FDF8EE;
  flex-wrap: wrap;
}
.rt-label { font-size: 14px; font-weight: 700; }
.rt-hint { font-size: 12px; color: var(--ink-2); }
.rt-count { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.rt-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #FFFDF8;
}
.rt-btn {
  font-family: inherit;
  font-size: 13px;
  min-width: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.rt-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.rt-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }
.rt-btn.rt-img { margin-left: auto; }
.rt-sep { display: inline-block; width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rt-editor,
.rt-view {
  min-height: 120px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.75;
  outline: none;
  word-break: break-word;
}
.rt-editor:focus { background: #FFFEFB; }
.rt-editor.rt-empty::before { content: attr(data-ph); color: #BFB2A0; }
.rt-editor img,
.rt-view img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.rt-editor p,
.rt-view p { margin: 0 0 8px; }
.rt-editor h3,
.rt-view h3 { font-size: 15px; margin: 12px 0 6px; }
.rt-editor blockquote,
.rt-view blockquote {
  margin: 8px 0;
  padding: 4px 12px;
  border-left: 3px solid var(--brand);
  background: #FDF8EE;
  color: var(--ink-2);
}
.rt-editor ul,
.rt-editor ol,
.rt-view ul,
.rt-view ol { margin: 6px 0; padding-left: 22px; }
.rt-editor a,
.rt-view a { color: var(--brand-deep); }
.rt-block.view .rt-label { display: block; padding: 10px 14px 0; font-size: 13px; }
.rt-view { padding-top: 6px; min-height: 40px; }

/* 保存操作区 */
.rp-ops { margin-top: 16px; }
.save-state { font-size: 13px; color: var(--ink-2); }

/* 周报移动端适配 */
@media (max-width: 640px) {
  .wk { min-width: 82px; padding: 7px 8px; }
  .wk b { font-size: 12px; }
  .rt-toolbar { gap: 3px; }
  .rt-btn { padding: 4px 6px; min-width: 28px; font-size: 12px; }
  .rt-btn.rt-img { margin-left: 0; }
  .rt-editor { min-height: 100px; }
  .rp-legend { width: 100%; }
  .mate-pick { gap: 6px; }
  .mate { padding: 4px 9px; }
  .mate-name { font-size: 12px; }
}


/* ============================================================
   差旅考勤（app.php?c=jbtx）
   概览卡 / 提示条 / 胶囊筛选 / 记录表 / 审批卡 / 提交表单
   ============================================================ */

/* ---- 页签：段式控件（仅 jbtx 页使用，不影响其他页面的 .tab） ---- */
.jb-tabs {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.jb-tabs .tab {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
}
.jb-tabs .tab:hover { background: var(--brand-soft); color: var(--brand-deep); }
.jb-tabs .tab.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(222, 143, 15, .28);
}

/* ---- 表单：多行文本（打卡片外的 textarea 也统一风格） ---- */
.fld textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  line-height: 1.6;
}
.fld textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245, 166, 35, .14); }
.jb-cnt { display: block; text-align: right; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.jb-cnt b { font-weight: 700; color: var(--ink); }

/* ---- 概览统计卡 ---- */
.jb-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
/* 差旅考勤：多一张「请假合计」卡 / 差旅卡（5 列） */
.jb-grid.five { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
.jb-card {
  position: relative;
  overflow: hidden;
  padding: 15px 16px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.jb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(120, 90, 40, .13); }
.jb-card::after {
  content: '';
  position: absolute;
  right: -16px;
  top: -16px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--c-soft, #F7F2E8);
  opacity: .8;
  z-index: 0;
}
.jb-card.ot   { --c: #E67E22; --c-soft: #FDF0E4; }
.jb-card.ct   { --c: #2E8BC0; --c-soft: #E8F3FA; }
.jb-card.lv   { --c: #7E57C2; --c-soft: #F1ECFA; }
.jb-card.wait { --c: #C9A227; --c-soft: #FFF7DE; }
.jb-card.left {
  --c: #2E7D4F;
  --c-soft: #FFF0D4;
  background: linear-gradient(158deg, #FFFDF7 0%, #FFF3DE 100%);
  box-shadow: 0 3px 14px rgba(222, 143, 15, .16);
}
.jb-k {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.jb-ico {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  border-radius: 8px;
  background: var(--c-soft, #F7F2E8);
  font-style: normal;
}
.jb-v {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -.5px;
}
.jb-v small { margin-left: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.jb-v.neg { color: var(--danger); }
.jb-card.left .jb-v { font-size: 34px; }
.jb-card.left .jb-v small { font-size: 14px; }
.jb-sub {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---- 主操作按钮 ---- */
.jb-ops { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.jb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, #F7AE35 0%, #E8981A 100%);
  border: 1px solid var(--brand-deep);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(222, 143, 15, .28);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.jb-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(222, 143, 15, .34); }
.jb-btn.ct {
  background: linear-gradient(180deg, #3F9ED3 0%, #2E8BC0 100%);
  border-color: #1F6E9C;
  box-shadow: 0 2px 8px rgba(46, 139, 192, .28);
}
.jb-btn.ct:hover { box-shadow: 0 5px 14px rgba(46, 139, 192, .34); }
.jb-btn.lv {
  background: linear-gradient(180deg, #8E6FD0 0%, #7E57C2 100%);
  border-color: #5B3FA8;
  box-shadow: 0 2px 8px rgba(126, 87, 194, .28);
}
.jb-btn.lv:hover { box-shadow: 0 5px 14px rgba(126, 87, 194, .34); }
.jb-btn.tr {
  background: linear-gradient(180deg, #43A047 0%, #2E7D4F 100%);
  border-color: #1B5E20;
  box-shadow: 0 2px 8px rgba(46, 125, 79, .28);
}
.jb-btn.tr:hover { box-shadow: 0 5px 14px rgba(46, 125, 79, .34); }
.jb-btn.vt {
  background: linear-gradient(180deg, #1E88E5 0%, #1565C0 100%);
  border-color: #0D47A1;
  box-shadow: 0 2px 8px rgba(21, 101, 192, .28);
}
.jb-btn.vt:hover { box-shadow: 0 5px 14px rgba(21, 101, 192, .34); }
.jb-btn .ico { font-size: 15px; font-style: normal; line-height: 1; }

/* ---- 提示条 ---- */
.jb-note {
  padding: 11px 14px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.75;
  color: #B33A36;
  background: #FDECEC;
  border: 1px solid #F1C4C4;
  border-left: 4px solid var(--danger);
  border-radius: 10px;
}
.jb-info {
  padding: 11px 14px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.75;
  color: #7A5A12;
  background: #FFFAF0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
}
.jb-info b, .jb-note b { font-weight: 700; }
.jb-warn { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--danger); }

/* ---- 区块小标题 ---- */
.jb-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.jb-title-row h3 { position: relative; margin: 0; padding-left: 11px; font-size: 16px; }
.jb-title-row h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--brand);
}
.jb-title-row .tip { margin-left: auto; }

/* ---- 筛选胶囊 ---- */
.jb-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  padding: 9px 12px;
  margin-bottom: 13px;
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: 12px;
}
/* 团队总览「自然月」筛选条（主管侧 view=team&ym=YYYY-MM）：一排可点击胶囊 */
.jb-month-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.jb-flbl { margin-right: 1px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.jb-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .15s ease;
}
.jb-filter .n { font-size: 11px; color: #BCAC93; font-style: normal; font-variant-numeric: tabular-nums; }
.jb-filter:hover { border-color: var(--brand); color: var(--brand-deep); }
.jb-filter.on {
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-deep);
  box-shadow: 0 2px 6px rgba(222, 143, 15, .25);
}
.jb-filter.on .n { color: rgba(255, 255, 255, .9); }
.jb-fsep { width: 1px; height: 18px; margin: 0 5px; background: var(--line); }

/* ---- 元信息行 ---- */
.jb-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; font-size: 12.5px; color: var(--ink-2); }

/* ---- 记录表 ---- */
.jb-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.jb-scroll table.list { min-width: 680px; margin: 0; }
.jb-scroll table.list th {
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: #FDF7EC;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.jb-scroll table.list td { padding: 11px 12px; border-bottom: 1px solid #F6EFE2; }
.jb-scroll table.list tbody tr:last-child td { border-bottom: 0; }
.jb-scroll table.list tbody tr:hover td { background: #FFFCF5; }
.jb-days { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jb-date { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jb-neg { color: var(--danger); }
.jb-reason { max-width: 280px; font-size: 12.5px; color: var(--ink-2); word-break: break-word; }
.jb-note-txt { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-2); }

/* ---- 空状态 ---- */
.jb-empty { padding: 34px 18px 30px; text-align: center; }
.jb-empty .ico { display: block; margin-bottom: 10px; font-size: 30px; font-style: normal; line-height: 1; }
.jb-empty h4 { margin: 0 0 6px; font-size: 14.5px; }
.jb-empty p { margin: 0 0 15px; font-size: 12.5px; color: var(--ink-2); }
.jb-empty-act { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.jb-empty-act .jb-btn { padding: 9px 17px; font-size: 13px; }

/* ---- 状态 / 类型标签 ---- */
.st, .kt {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.7;
}
.st.wait { background: #FFF4D6; color: #9A6B00; border: 1px solid #F0DCA8; }
.st.ok   { background: #EAF7EF; color: #2E7D4F; border: 1px solid #BFE6CC; }
.st.no   { background: #FDECEC; color: #C0392B; border: 1px solid #F1C4C4; }
.kt.ot   { background: #FDF0E4; color: #B35C0A; border: 1px solid #F2D9BC; }
.kt.ct   { background: #E8F3FA; color: #1F6E9C; border: 1px solid #C4DFF0; }
.kt.sl   { background: #F1ECFA; color: #5B3FA8; border: 1px solid #D9CDF2; }
.kt.pl   { background: #FDECF4; color: #A63B6E; border: 1px solid #F3CBDD; }
.kt.bt   { background: #E8F5E9; color: #2E7D4F; border: 1px solid #B8D8BA; }
.kt.vt   { background: #E3F2FD; color: #1565C0; border: 1px solid #B3D7F7; }

/* ---- 审批卡 ---- */
.jb-appr {
  padding: 13px 15px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(120, 90, 40, .05);
}
.jb-appr.ot { border-left-color: #E67E22; }
.jb-appr.ct { border-left-color: #2E8BC0; }
.jb-appr.lv { border-left-color: #7E57C2; }
.jb-appr.tr { border-left-color: #2E7D4F; }
.jb-appr-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.jb-appr-h b { font-size: 14.5px; }
.jb-appr-days { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.jb-appr-days small { margin-left: 2px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.jb-appr-b { margin-top: 9px; font-size: 12.5px; line-height: 1.9; color: var(--ink-2); }
.jb-appr-b b { color: var(--ink); }
.jb-appr-act {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.jb-appr-act input[type=text] {
  flex: 1 1 200px;
  min-width: 150px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #FFFDF8;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.jb-appr-act input[type=text]:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245, 166, 35, .14); }
.jb-appr-act .mini { padding: 8px 18px; font-size: 13px; }
.mini.ok { font-weight: 700; color: #2E7D4F; background: #EAF7EF; border-color: #BFE6CC; }
.mini.ok:hover { border-color: #2E7D4F; color: #2E7D4F; }
.mini.danger { font-weight: 700; color: #C0392B; background: #FDECEC; border-color: #F1C4C4; }
.mini.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---- 头像 / 成员单元 / 余额条 ---- */
.jb-ava {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 50%;
}
.jb-who { display: flex; align-items: center; gap: 9px; }
.jb-who .jb-ava { width: 28px; height: 28px; font-size: 12px; }
.jb-who-t { line-height: 1.35; }
.jb-who-t b { font-weight: 600; }
.jb-who-t span { display: block; font-size: 11.5px; color: var(--ink-2); }
.jb-bar { display: block; width: 104px; height: 6px; margin-top: 5px; background: #F1E7D6; border-radius: 999px; overflow: hidden; }
.jb-bar i { display: block; height: 100%; border-radius: 999px; background: #2E7D4F; }
.jb-bar i.neg { background: var(--danger); }

/* ---- 提交表单：类型段式切换 / 快捷天数 ---- */
.jb-seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 14px;
  background: #F6EEDF;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.jb-seg a {
  padding: 7px 18px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}
.jb-seg a.on { font-weight: 700; color: var(--brand-deep); background: #fff; box-shadow: 0 1px 4px rgba(120, 90, 40, .12); }
.jb-quick { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: -4px 0 13px; }
.jb-q {
  padding: 5px 13px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.jb-q:hover { border-color: var(--brand); color: var(--brand-deep); }
.jb-dir { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 2px 0 10px; }
.jb-dir label { position: relative; padding: 9px 18px; font-size: 14px; cursor: pointer; color: var(--ink-2); user-select: none; border-right: 1px solid var(--line); }
.jb-dir label:last-child { border-right: none; }
.jb-dir label.on, .jb-dir label:has(input:checked) { background: #FFF3DE; color: var(--brand-deep); font-weight: 700; }
.jb-dir input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---- 后台：下辖员工选择器上的归属标记 ---- */
.pk-sub,
.pk-other {
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 2px;
  white-space: nowrap;
}
.pk-sub { background: #EAF7EF; color: #2E7D4F; border: 1px solid #BFE6CC; }
.pk-other { background: #FDF0E4; color: #B35C0A; border: 1px solid #F2D9BC; }

@media (max-width: 1180px) {
  .jb-grid.five { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 860px) {
  .jb-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .jb-grid.five { grid-template-columns: 1fr 1fr; }
  .jb-card.left .jb-v { font-size: 30px; }
}

@media (max-width: 640px) {
  .jb-grid { gap: 8px; }
  .jb-grid.five { grid-template-columns: 1fr 1fr; }
  .jb-v { font-size: 21px; }
  .jb-card.left .jb-v { font-size: 26px; }
  .jb-ops { gap: 8px; }
  .jb-btn { flex: 1 1 46%; justify-content: center; padding: 11px 12px; }
  .jb-title-row .tip { margin-left: 0; }
  .jb-filters { padding: 8px 10px; }
  .jb-appr-days { margin-left: 0; }
  .jb-reason { max-width: 160px; }
  .jb-empty { padding: 26px 12px 24px; }
  .jb-tabs { padding: 5px; }
  .jb-tabs .tab { padding: 7px 13px; font-size: 13px; }
}

/* ============================================================
 * 工单和备忘（oa.php）
 * 复用 .jb-* 系列的骨架样式，这里只补「剩余 / 超时」与内容列
 * ============================================================ */
.oa-left { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oa-late { color: #C0392B; }
.oa-soon { color: #B8720A; }
.oa-far  { color: #2E7D4F; }
.oa-done { color: var(--ink-2); }

.oa-content {
  max-width: 460px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}
.oa-content.oa-done { color: var(--ink-2); text-decoration: line-through; }

/* 已超时整行淡红底，一眼能挑出来 */
.jb-scroll table.list tbody tr.oa-late-row td { background: #FEF7F6; }
.jb-scroll table.list tbody tr.oa-late-row:hover td { background: #FDEFED; }

/* 操作列里的表单按钮并排 */
.ops-cell { white-space: nowrap; }
.ops-cell form.inline { display: inline-block; margin-left: 6px; }

@media (max-width: 640px) {
  .oa-content { max-width: 200px; }
}

/* ============================================================
 * 任务线二：工单（oa.php）
 * ============================================================ */

/* 类型标签：工单 / 备忘 */
.oa-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.oa-tag.tk   { background: #FFF1DC; color: #A8620B; border: 1px solid #F3DDB6; }
.oa-tag.memo { background: #EEF4FB; color: #35597E; border: 1px solid #D8E4F1; }

/* 状态三态：待完成 / 已完成 / 超时 */
.st.late { background: #FDECEA; color: #C0392B; border-color: #F5C6C0; }

/* 发起人列 */
.oa-creator { font-size: 13px; color: var(--ink-2); }
.oa-me { color: #A8620B; font-weight: 700; }

/* 工单标题行（标题 + 附件回形针） */
.oa-tk-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.oa-tk-title a { color: #35597E; text-decoration: none; }
.oa-tk-title a:hover { text-decoration: underline; }
.oa-clip { font-style: normal; margin-left: 5px; font-size: 11px; }

/* 工单正文（列表里限制两行，详情页放开） */
.oa-tk-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* 未读小圆点 */
.oa-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  background: #E0533D;
  vertical-align: middle;
}

/* 执行人完成情况小标签（创建人视角） */
.oa-mem-row { margin-top: 5px; }
.oa-mem-list { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.oa-mem {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.7;
  background: #F3F1EC;
  color: #8A7B68;
  border: 1px solid #E7E1D7;
}
.oa-mem.ok { background: #EAF6EE; color: #2E7D4F; border-color: #CDE7D7; }
.oa-mem.none { font-style: italic; }
.oa-alldone {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: #2E7D4F;
  color: #FFFFFF;
  vertical-align: middle;
}

/* 下属工单列表：标出「这张工单里我的哪些下辖员工是执行人」 */
.oa-subnames {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.7;
  background: #EEF3FB;
  color: #31558C;
  border: 1px solid #D5E2F5;
  vertical-align: middle;
}

/* 详情页「以主管身份查看 · 只读」提示 */
.oa-readonly {
  display: inline-block;
  margin-left: 8px;
  font-size: 12.5px;
  color: #8A7B68;
  vertical-align: middle;
}

/* 表单里的多选列表 */
select.oa-multi {
  min-height: 130px;
  padding: 4px;
}
select.oa-multi option { padding: 3px 6px; }

/* 附件缩略图 */
.oa-atts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 4px;
}
.oa-atts .oa-att {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.oa-atts .oa-att img,
.oa-atts .oa-att-link img {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #E7E1D7;
  background: #FBF8F2;
}
.oa-atts .oa-att-link { display: inline-block; }
.oa-atts .oa-att-link img { transition: transform .18s ease; }
.oa-atts .oa-att-link:hover img { transform: scale(1.03); }

/* 工单详情 */
.oa-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 12px;
  font-size: 12.5px;
  color: #8A7B68;
}
.oa-view-meta b { color: var(--ink-1); font-weight: 600; }
.oa-view-body {
  padding: 14px 16px;
  border: 1px solid #EFE9DF;
  border-radius: 10px;
  background: #FFFDF8;
  font-size: 13.5px;
  line-height: 1.7;
}
.oa-sub { margin: 18px 0 8px; font-size: 14px; color: var(--ink-1); }
.oa-view-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}
.jb-scroll table.list tbody tr.oa-done-row td { background: #FAFDFB; }

/* 操作按钮的次要样式（创建工单按钮区） */
.jb-ops .jb-btn.ghost {
  background: #FFFDF8;
  color: #A8620B;
  border: 1px solid #F3DDB6;
}
.jb-ops .jb-btn.ghost:hover { background: #FFF6E8; }

@media (max-width: 640px) {
  .oa-tk-body { max-width: 200px; }
  .oa-atts .oa-att img,
  .oa-atts .oa-att-link img { width: 92px; height: 92px; }
}

/* 工单详情 · 执行流水账（附在工单内容之后） */
.oa-log-meta { margin: 0 0 8px; font-size: 12px; color: #8A7B68; }
.oa-logs-empty {
  padding: 14px 16px;
  border: 1px dashed #EFE3CE;
  border-radius: 10px;
  background: #FFFDF8;
  font-size: 13px;
  color: var(--ink-2);
}
.oa-logs { list-style: none; margin: 0; padding: 0; }
.oa-log {
  padding: 10px 0;
  border-bottom: 1px dashed #F0E7D8;
}
.oa-log:last-child { border-bottom: 0; }
.oa-log-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
}
.oa-log-who { color: var(--ink-1); font-weight: 600; }
.oa-log-time { color: #A79880; font-variant-numeric: tabular-nums; }
.oa-log-b { margin-top: 4px; font-size: 13px; line-height: 1.65; color: var(--ink-1); }
.oa-log-kind {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #FFF1DC;
  border: 1px solid #F3DDB6;
  color: #A8620B;
  font-size: 11px;
  vertical-align: middle;
}
.oa-log-txt { word-break: break-word; }
.oa-log-extra {
  display: inline-block;
  margin-left: 6px;
  font-size: 11.5px;
  color: #8A7B68;
}
.oa-log-ops { margin-top: 5px; }
.oa-log-ops form.inline { display: inline-block; margin-left: 6px; }

/* 工单详情 · 延期（审批台 / 申请表单） */
.oa-delay { display: flex; flex-direction: column; gap: 10px; }
.oa-delay-item {
  padding: 10px 12px;
  border: 1px solid #EFE9DF;
  border-radius: 10px;
  background: #FFFDF8;
}
.oa-delay-meta { font-size: 12.5px; color: #8A7B68; }
.oa-delay-meta b { color: var(--ink-1); }
.oa-delay-reason { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--ink-1); }
.oa-delay-ops { margin-top: 8px; display: flex; gap: 10px; align-items: center; }
.oa-delay-ops form.inline { display: inline-block; }

@media (max-width: 640px) {
  .oa-delay-ops { flex-wrap: wrap; }
}

/* 工单详情 · 主操作区与弹窗
   ------------------------------------------------------------
   ① 操作区独立成一条（顶部细分割线），主操作「标记我已完成」在最左，
      「添加记录 / 申请延期」紧随其右（按钮 + 弹窗，页面不再罗列表单）。
   ② .oa-modal 复用全局 .mask / .modal 皮肤，仅在工单详情页出现。 */
.oa-view-ops {
  border-top: 1px solid #F1E9DC;
  padding-top: 14px;
}
.oa-modal { z-index: 60; }
.oa-modal-box { max-width: 520px; }
.oa-modal-box .jb-title-row { margin-bottom: 4px; }
/* 弹窗内 tip 独占一行（全局 .jb-title-row .tip 是 margin-left:auto） */
.oa-modal-box .jb-title-row .tip { margin-left: 0; flex-basis: 100%; }
.oa-modal-box form { margin-top: 12px; }
.oa-modal-box .fld textarea { min-height: 78px; }

/* ============================================================
   员工工作台首页（index.php?uid=…）—— 顶部聚合卡 + 首页专属密度优化
   ------------------------------------------------------------
   ① 顶部两卡：左「工单和备忘」（数据来自 oa 模块）/ 右「消息提醒」（notice 模块）。
      两卡数据行槽位固定 8 行（PHP: IDX_HOME_PER），行高统一由 --idx-row 控制
      ⇒ 无论数据多少，左右两卡默认等高。
   ② 密度优化只作用于首页：统一挂在 body.idx-home 下（index.php 传的 body class），
      其它页面（ritq / ctts / jbtx / admin …）不受影响。
   ============================================================ */

/* ---------- ① 顶部两栏栅格：左宽 2 份、右窄 1 份 ---------- */
.idx-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 12px;
  align-items: start;
}

/* 通用卡片（紧凑内边距）；--idx-row = 左卡表格行 / 右卡消息行 的统一行高 */
.idx-card {
  --idx-row: 34px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px 10px;
  min-width: 0;
}

/* 卡片头：图标 + 主标题/副标题 + （左卡）类型页签 + 右侧「共 N 项 / 全部 ›」 */
.idx-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.idx-hd-t { min-width: 0; }
.idx-hd-t h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; }
.idx-sub { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 0; line-height: 1.35; }
.idx-hd-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.idx-all {
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: 8px;
}
.idx-all:hover { color: var(--brand-deep); background: var(--brand-soft); }
.idx-all i { font-style: normal; margin-left: 2px; }

/* 左卡：类型页签（并入标题栏，省掉一整行）；服务端渲染为链接 */
.idx-tabs { display: inline-flex; gap: 5px; margin-left: 4px; }
.idx-tab {
  display: inline-block;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s ease;
}
.idx-tab:hover { border-color: var(--brand); color: var(--brand-deep); }
.idx-tab.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(222, 143, 15, .24);
}
.idx-count { font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* 左卡：事项表（无表头行，不加顶边框，以与右卡列表结构对称） */
.idx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.idx-table td { height: var(--idx-row); padding: 0 8px; border-bottom: 1px solid #F6EFE2; vertical-align: middle; }
.idx-table tbody tr:last-child td { border-bottom: 0; }
.idx-table tbody tr:hover td { background: #FFFCF5; }
.idx-table tr.is-late td { background: #FEF7F6; }
.idx-table tr.is-late:hover td { background: #FDEFED; }
/* 空行槽位：纯占位，不参与悬停高亮 */
.idx-table tbody tr.idx-blank:hover td { background: transparent; }
/* 空态提示（无任何事项时占第一行） */
.idx-table td.idx-none { color: var(--ink-2); font-size: 12.5px; text-align: center; }

/* 序号徽标 */
.idx-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #A8700C;
  background: #FDF2DD;
}
.idx-table tr.is-late .idx-no { color: #C0392B; background: #FBE3E0; }

/* 标题 */
.idx-tk {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.idx-tk a {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idx-tk a:hover { color: var(--brand-deep); }

/* 类型标签（复用 .oa-tag.tk / .oa-tag.memo 配色，仅微调尺寸） */
.idx-table .oa-tag { font-size: 11px; padding: 2px 9px; }

/* 创建人 */
.idx-who { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* 剩余时间 */
.idx-left { font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.idx-left.soon { color: #B8800A; }
.idx-left.late { color: var(--danger); }
.idx-left.far  { color: #2E7D4F; }
.idx-left.done { color: #7E8F84; }
.idx-left.is-urgent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #C0392B;
  background: #FDECEA;
  border: 1px solid #F5C6C0;
}
.idx-left.is-urgent::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #E0533D;
}

/* 行尾箭头 */
.idx-arrow { color: #CFC2AC; font-size: 14px; text-align: right; }
.idx-table tbody tr:hover .idx-arrow { color: var(--brand-deep); }

/* 卡片底部：分页条 */
.idx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.idx-pg-info { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.idx-pg-ops { display: inline-flex; gap: 7px; }
.idx-pg {
  display: inline-block;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px 13px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: all .15s ease;
}
a.idx-pg:hover { border-color: var(--brand); color: var(--brand-deep); }
.idx-pg.is-off { opacity: .45; cursor: not-allowed; }

/* 右卡：消息列表（标题 + 时间同一行，压缩垂直高度；只读展示，不做超链接） */
.idx-msgs { display: flex; flex-direction: column; }
.idx-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--idx-row);   /* 与左卡表格行同高 */
  padding: 0 4px 0 3px;
  border-bottom: 1px solid #F4EDE0;
  color: var(--ink);
  border-radius: 8px;
}
.idx-msgs .idx-msg:last-child { border-bottom: 0; }
.idx-msg.on { background: #FFF7E8; }
.idx-msg-dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
}
.idx-msg.on .idx-msg-dot { background: var(--brand-deep); }
.idx-msg-t { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 10px; }
.idx-msg-t b {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idx-msg.on .idx-msg-t b { font-weight: 700; color: #7A5410; }
.idx-msg-time { flex: none; display: block; font-size: 11px; color: #B7A98F; white-space: nowrap; }

/* ---------- ② 首页专属垂直密度优化（body.idx-home 作用域） ---------- */

/* 顶栏 / 主容器 / 页脚留白收紧 */
.idx-home .topbar-inner { padding: 8px 20px; }
.idx-home .wrap { padding: 12px 20px 22px; }
.idx-home .foot { padding: 4px 0 16px; }

/* 看板卡片：内边距 / 卡片间距收紧 */
.idx-home .board { padding: 12px 15px 13px; margin-bottom: 11px; }
.idx-home .board-head { margin-bottom: 8px; gap: 8px; }
.idx-home .board-head h2 { font-size: 15px; }
.idx-home .board-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.idx-home .board-count { font-size: 11.5px; }

/* 按钮网格：每行列数增加（176px → 146px）+ 间距收紧 */
.idx-home .btn-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; }

/* 胶囊按钮：高度更矮 */
.idx-home .btn-card { padding: 4px 11px 4px 5px; gap: 8px; }
.idx-home .btn-icon { width: 26px; height: 26px; font-size: 14px; }
.idx-home .btn-name { font-size: 12.5px; }

/* 顶部两卡内的图标保持 34px（提高一级特异性，避免被上面的 30px 覆盖） */
.idx-home .idx-hd .board-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .idx-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .idx-card { padding: 11px 11px 9px; }
  .idx-table td.c-who { display: none; }
  .idx-table td.c-arrow { display: none; }
  .idx-tab { padding: 4px 11px; }
  .idx-home .wrap { padding: 10px 12px 18px; }
  .idx-home .board { padding: 10px 11px 11px; margin-bottom: 9px; }
  .idx-home .btn-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

/* ============================================================
   费用报销（fybx · app.php?c=fybx）
   —— 页面骨架、概览卡、表格、审批卡、表单整体复用 jb-* / st / kt 体系，
      这里只补「概览卡配色 + 类目标签色 + 审批卡左边条」少量增量。
      沿用 .jb-card 的 --c / --c-soft 变量约定（见上方「概览统计卡」）。
   ============================================================ */
.jb-card.paid     { --c: #2E7D4F; --c-soft: #EAF7EF; }
.jb-card.rejected { --c: #C0392B; --c-soft: #FDECEC; }
.jb-card.cat      { --c: #7E57C2; --c-soft: #F1ECFA; }

/* 报销类目标签（meal 餐饮 / traffic 交通 / purchase 采购 / outsource 人力外包 / other 其他） */
.kt.meal      { background: #FDF0E4; color: #B35C0A; border: 1px solid #F2D9BC; }
.kt.traffic   { background: #E8F3FA; color: #1F6E9C; border: 1px solid #C4DFF0; }
.kt.purchase  { background: #E8F5E9; color: #2E7D4F; border: 1px solid #B8D8BA; }
.kt.outsource { background: #F1ECFA; color: #5B3FA8; border: 1px solid #D9CDF2; }
.kt.other     { background: #F3F4F6; color: #5B6270; border: 1px solid #DCE0E6; }

/* 审批卡左边条按类目着色（基础 .jb-appr 已有 4px 左边框） */
.jb-appr.meal      { border-left-color: #E67E22; }
.jb-appr.traffic   { border-left-color: #2E8BC0; }
.jb-appr.purchase  { border-left-color: #2E7D4F; }
.jb-appr.outsource { border-left-color: #7E57C2; }
.jb-appr.other     { border-left-color: #8A8F98; }

/* 凭证文件选择框：与同栏文本输入观感一致 */
.fld input[type=file] { padding: 8px 10px; font-size: 13px; background: #fff; }
