/* JYM-HR-SYS-001 三端视图样式（浅色主题 · v2.6 图标化美化版） */
:root {
  --primary: #2f6fed;
  --primary-d: #1f56c4;
  --ink: #1f2d3d;
  --ink-2: #43536a;
  --ink-3: #7a8aa0;
  --line: #e2e8f0;
  --bg: #eef2f7;
  --card: #ffffff;
  --red: #d4380d;
  --orange: #d48806;
  --green: #389e0d;
  --gold: #c9a227;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(22, 50, 79, .07);
  --shadow-up: 0 6px 20px rgba(22, 50, 79, .13);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(180deg, #eef3fa 0%, #f4f6f9 320px) fixed, var(--bg);
  color: var(--ink);
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }

/* ===== 顶栏（图标导航 · 吸顶） ===== */
.topbar {
  background: linear-gradient(90deg, #16324f 0%, #1d4470 60%, #16324f 100%);
  color: #fff; padding: 0 18px; display: flex; align-items: center; gap: 4px;
  position: sticky; top: 0; z-index: 900; flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(10, 25, 45, .35); min-height: 52px;
}
.topbar .brand {
  font-weight: 700; font-size: 15px; margin-right: 12px; padding: 14px 0;
  display: inline-flex; align-items: center; gap: 7px; letter-spacing: 1px;
}
.topbar a {
  color: #c4d6ee; font-size: 13px; padding: 6px 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px; transition: all .15s;
  white-space: nowrap;
}
.topbar a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.topbar a.on { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600; }
.topbar a .ico { font-size: 14px; }
.topbar .who { margin-left: auto; font-size: 13px; color: #9fb8d4; display: inline-flex; align-items: center; gap: 6px; }
.topbar .who a { padding: 4px 8px; }

.wrap { max-width: 1240px; margin: 22px auto; padding: 0 16px; }

/* ===== 数字卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.card .cico {
  width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 21px; background: #eef4ff; flex: none;
}
.card .num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.card .lbl { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.card.red .num { color: var(--red); } .card.red .cico { background: #fff1f0; }
.card.orange .num { color: var(--orange); } .card.orange .cico { background: #fff7e6; }
.card.green .num { color: var(--green); } .card.green .cico { background: #f6ffed; }
.card.blue .num { color: var(--primary); } .card.blue .cico { background: #e6f0ff; }

/* ===== 面板 ===== */
.panel {
  background: var(--card); border-radius: var(--radius); padding: 20px 22px;
  margin-bottom: 18px; box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 15px; margin-bottom: 14px; color: #16324f;
  border-left: 4px solid var(--primary); padding-left: 9px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.panel h2 .muted { font-weight: 400; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 11px; border-bottom: 1px solid #eef1f5; text-align: left; }
th { background: #f6f8fb; color: #5a6b82; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f7faff; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.tag.w16 { background: #fff1f0; color: #cf1322; font-weight: 700; }
.tag.w9 { background: #fff7e6; color: #d46b08; }
.tag.w4 { background: #e6f4ff; color: #0958d9; }
.tag.w1 { background: #f6ffed; color: #389e0d; }
.tag.st { background: #f0f0f0; color: #555; }
.tag.ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag.overdue { background: #cf1322; color: #fff; }
.tag.esc { background: #722ed1; color: #fff; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary);
  color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px;
  cursor: pointer; transition: all .15s; box-shadow: 0 2px 6px rgba(47, 111, 237, .28);
}
.btn:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 111, 237, .38); }
.btn.gray { background: #8a97a8; box-shadow: none; }
.btn.gray:hover { background: #74828f; }
.btn.red { background: #cf1322; box-shadow: 0 2px 6px rgba(207, 19, 34, .25); }
.btn.red:hover { background: #a8071a; }
.btn.green { background: #389e0d; box-shadow: 0 2px 6px rgba(56, 158, 13, .25); }
.btn.green:hover { background: #237804; }
.btn:active { transform: translateY(0); }

/* ===== 表单 ===== */
input, select, textarea {
  padding: 8px 11px; border: 1.5px solid #d4dce6; border-radius: 8px;
  font-size: 13px; width: 100%; background: #fff; transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .14);
}
label { font-size: 13px; color: var(--ink-2); display: block; margin: 12px 0 5px; font-weight: 600; }
label .req { color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== 图标选择键（pill 勾选组件） ===== */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border: 1.5px solid #d4dce6; border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--ink-2);
  transition: all .15s; user-select: none; font-weight: 400; margin: 0;
}
.pill input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.pill .ico { font-size: 15px; }
.pill:hover { border-color: var(--primary); color: var(--primary); background: #f5f9ff; }
.pill.on, .pill:has(input:checked) {
  background: var(--c, var(--primary)); border-color: var(--c, var(--primary));
  color: #fff; font-weight: 600; box-shadow: 0 3px 9px rgba(22, 50, 79, .22);
}
.pill.off-on, .pill:has(input:checked).pill-lock {
  background: #f0f2f5; border-color: #c9d2de; color: #5a6b82; box-shadow: none; cursor: default;
}
.pill.small { padding: 4px 11px; font-size: 12px; }

/* 表单分区块 */
.fsec {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 4px;
  margin-top: 14px; background: #fbfcfe;
}
.fsec > .fsec-t {
  font-size: 13px; font-weight: 700; color: #16324f; margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px;
}
.fsec > .fsec-t .muted { font-weight: 400; }

/* ===== 提示 ===== */
.flash { padding: 11px 15px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; box-shadow: var(--shadow); }
.flash.ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.flash.error { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

.alert-row.lv-熔断 td { background: #fff1f0; }
.alert-row.lv-考核 td { background: #fff7e6; }
.muted { color: #8a97a8; font-size: 12px; font-weight: 400; }

.progress-bar { background: #e8edf3; border-radius: 6px; height: 8px; width: 120px; display: inline-block; vertical-align: middle; overflow: hidden; }
.progress-bar i { display: block; height: 8px; border-radius: 6px; background: linear-gradient(90deg, #2f6fed, #5b90ff); }

/* ===== 登录 ===== */
.login-box { max-width: 370px; margin: 90px auto; background: #fff; border-radius: 16px; padding: 34px 32px; box-shadow: 0 8px 30px rgba(20, 40, 70, .15); }
.login-box h1 { font-size: 18px; text-align: center; margin-bottom: 6px; color: #16324f; }
.login-box .sub { text-align: center; font-size: 12px; color: #8a97a8; margin-bottom: 18px; }
.login-box .btn { width: 100%; margin-top: 16px; justify-content: center; }

.logline { font-size: 12px; padding: 7px 0; border-bottom: 1px dashed #eef1f5; }

/* ===== v1.3 提醒中心 + 权限管理 ===== */
.bell { position: relative; cursor: pointer; font-size: 17px; margin-left: 6px; padding: 6px; border-radius: 8px; transition: background .15s; }
.bell:hover { background: rgba(255, 255, 255, .12); }
.badge {
  position: absolute; top: -2px; right: -6px; background: #d4380d; color: #fff;
  border-radius: 9px; font-size: 11px; padding: 0 5px; line-height: 16px; min-width: 16px;
  text-align: center; font-weight: 700; box-shadow: 0 0 0 2px #16324f;
}
.notice-panel {
  position: fixed; top: 52px; right: 12px; width: 350px; max-height: 60vh; overflow: auto;
  background: #fff; border: 1px solid #e3e0d8; border-radius: 12px; z-index: 999;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2);
}
.np-head {
  display: flex; justify-content: space-between; padding: 11px 14px; font-weight: 700;
  border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff;
}
.np-head a { color: #7a6a4f; font-weight: 400; font-size: 12px; }
.np-item { padding: 10px 14px; border-bottom: 1px solid #f2f0ea; cursor: pointer; }
.np-item:hover { background: #faf8f3; }
.np-title { font-size: 13px; }
.np-time { font-size: 11px; color: #999; margin-top: 2px; }
.np-empty { padding: 18px; text-align: center; color: #999; font-size: 12px; }

#toastBox { position: fixed; top: 56px; right: 12px; z-index: 1000; }
.toast {
  width: 320px; margin-bottom: 8px; padding: 11px 13px; background: #fffdf7;
  border-left: 4px solid #d4a017; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  cursor: pointer; opacity: 0; transform: translateX(30px); transition: all .35s;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast b { display: block; font-size: 13px; margin-bottom: 3px; }
.toast span { font-size: 12px; color: #666; }
.toast-alert { border-left-color: #d4380d; }
.toast-reject_admin { border-left-color: #cf1322; }
.toast-reject_remind { border-left-color: #d46b08; }
.toast-relay { border-left-color: #2f54eb; }
.toast-assign { border-left-color: #389e0d; }

.perm-form { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }
.perm-form select, .perm-form input { font-size: 12px; padding: 3px 6px; width: auto; }
.btn-sm {
  font-size: 12px; padding: 4px 10px; border: 1px solid #c9c2b4; border-radius: 6px;
  background: #f7f4ec; cursor: pointer; transition: all .15s;
}
.btn-sm:hover { background: #efe9da; }
.btn-danger { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.btn-danger:hover { background: #ffccc7; }
.btn-ok { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.row-off td { color: #aaa; background: #fafafa; }

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
  .topbar { gap: 0; }
  .topbar a { padding: 5px 7px; font-size: 12px; }
  .wrap { padding: 0 10px; margin: 14px auto; }
  .panel { padding: 14px; }
  table { font-size: 12px; }
  th, td { padding: 7px 6px; }
}

/* ===== v2.7 沟通库（类微信对话） ===== */
.chat-wrap { display: grid; grid-template-columns: 290px 1fr; height: calc(100vh - 170px); min-height: 420px; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; background: #f8fafc; }
.chat-side-t {
  padding: 14px 16px; font-weight: 700; font-size: 14px; color: #16324f;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #f8fafc;
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.chat-peer {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid #eef1f5; color: var(--ink); transition: background .12s;
}
.chat-peer:hover { background: #eef4ff; }
.chat-peer.on { background: #e6f0ff; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #2f6fed, #5b90ff); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.cp-body { flex: 1; min-width: 0; }
.cp-name { font-size: 13px; font-weight: 600; display: block; }
.cp-last {
  font-size: 12px; color: var(--ink-3); display: block; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.cp-badge {
  background: var(--red); color: #fff; border-radius: 10px; font-size: 11px;
  padding: 1px 7px; font-weight: 700; flex: none;
}
.chat-main { display: flex; flex-direction: column; background: #f2f5f9; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  background: #fff; border-bottom: 1px solid var(--line); font-size: 14px;
}
.chat-flow { flex: 1; overflow-y: auto; padding: 18px 20px; }
.msg { margin-bottom: 14px; max-width: 72%; }
.msg .bubble {
  background: #fff; border-radius: 4px 14px 14px 14px; padding: 9px 13px;
  font-size: 13px; line-height: 1.6; box-shadow: 0 1px 3px rgba(22,50,79,.08);
  white-space: pre-wrap; word-break: break-word;
}
.msg .mtime { font-size: 11px; color: #9aa7b8; margin-top: 3px; }
.msg.mine { margin-left: auto; text-align: right; }
.msg.mine .bubble {
  background: linear-gradient(135deg, #2f6fed, #4c86f5); color: #fff;
  border-radius: 14px 4px 14px 14px; text-align: left;
}
.chat-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 13px; }
.chat-input {
  display: flex; gap: 10px; padding: 12px 16px; background: #fff;
  border-top: 1px solid var(--line);
}
.chat-input input { flex: 1; }
.chat-input .btn { flex: none; }
@media (max-width: 720px) {
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .chat-side { border-right: none; border-bottom: 1px solid var(--line); max-height: 300px; }
  .chat-main { min-height: 420px; }
}

/* ===== v2.8 派发日志分类图标卡 ===== */
.logcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.logcard {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px 10px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fbfcfe; color: var(--ink-2); transition: all .15s; position: relative;
}
.logcard:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.logcard.on { border-color: var(--primary); background: #eaf2ff; color: var(--primary); font-weight: 600; }
.logcard .lico { font-size: 24px; }
/* 线性矢量图标（24×24 stroke 风格，与门户导航页同一套） */
svg.ic { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 5px; }
.logcard .lico svg.ic { width: 26px; height: 26px; margin: 0; }
.ic-blue { color: var(--primary); }
.ic-red { color: var(--red); }
.ic-orange { color: var(--orange); }
.ic-green { color: var(--green); }
.ic-gold { color: var(--gold); }
.ic-gray { color: var(--ink-3); }

/* ============ v3.0 模块化整改（董事长指令：傻瓜式·大图标·模块化） ============ */
/* 九宫格大图标模块 */
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
  color: var(--ink); text-align: center; transition: all .15s; position: relative; }
.tile:hover { border-color: var(--primary); box-shadow: var(--shadow-up); transform: translateY(-2px); }
.tile svg { width: 38px; height: 38px; }
.tile .t-name { font-size: 15px; font-weight: 600; }
.tile .t-sub { font-size: 12px; color: var(--ink-3); }
.tile .t-badge { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff;
  border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
/* 任务看板（状态分列） */
.kb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.kb-col-h { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kb-col-h.blue { background: #e6f1fb; color: #185FA5; }
.kb-col-h.green { background: #e1f5ee; color: #0F6E56; }
.kb-col-h.red { background: #fcebeb; color: #A32D2D; }
.tcard { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: inherit;
  transition: all .15s; }
.tcard:hover { box-shadow: var(--shadow-up); transform: translateY(-2px); }
.tcard.red { background: #fdf3f2; border-color: #f0b9b2; border-left-color: #A32D2D; }
.tcard .cd { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary-d); }
.tcard.red .cd { color: #A32D2D; }
.tcard .tt { font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
.tcard .ts { font-size: 12px; color: var(--ink-3); }
/* 折叠收纳 */
details.fold { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 18px 14px; margin-bottom: 14px; }
details.fold > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 14px 0;
  list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "（点击展开）"; font-weight: 400; font-size: 12px; color: var(--ink-3); }
details.fold[open] > summary::after { content: "（点击收起）"; }
details.fold > summary .muted { font-weight: 400; }
@media (max-width: 720px) { .kb { grid-template-columns: 1fr; } }
@media print { details.fold { display: block; } details.fold:not([open]) > *:not(summary) { display: block; } }
/* 日志图标卡片视图 */
.lv-switch { float: right; display: flex; gap: 6px; }
.lv-switch .btn { font-size: 12px; padding: 4px 12px; }
.lv-cards { display: grid; gap: 8px; }
.lv-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  text-decoration: none; color: inherit; transition: all .15s; }
.lv-item:hover { border-color: var(--primary); box-shadow: var(--shadow-up); transform: translateY(-1px); }
.lv-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: #f4f7fd; border-radius: 10px; flex: none; }
.lv-ico svg.ic { width: 24px; height: 24px; margin: 0; }
.lv-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-main strong { font-size: 13px; }
.lv-status { color: var(--ink-3); font-weight: 400; font-size: 11px; margin-left: 8px; }
.lv-title { color: var(--ink-2); font-size: 12px; }
.lv-detail { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-side { text-align: right; font-size: 11px; color: var(--ink-3); display: flex; flex-direction: column; gap: 2px; flex: none; }
@media print { .lv-cards, .lv-switch { display: none !important; } #lv-table { display: block !important; } }
.logcard .llbl { font-size: 12px; }
.logcard .lnum {
  position: absolute; top: 6px; right: 8px; background: #eef1f5; color: #5a6b82;
  border-radius: 9px; font-size: 11px; padding: 0 6px; line-height: 16px;
}
.logcard.on .lnum { background: var(--primary); color: #fff; }

/* ===== v2.10 M14：查询结果统一 A4 打印 ===== */
@media print {
  .topbar, .btn, button, form, .bell, .no-print, .chat-input { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border: none; padding: 8px 0; page-break-inside: avoid; }
  table { border-collapse: collapse; width: 100%; }
  th, td { border: 1px solid #444; padding: 5px 7px; font-size: 11px; }
  a { color: #000; text-decoration: none; }
}
