/* ============================================================
   协同办公OA系统 · 政务风格样式
   配色：政务蓝渐变 / 白侧栏 / 浅灰工作区 / 卡片化
   ============================================================ */

:root {
  --blue-1: #0b4f9e;        /* 深政务蓝 */
  --blue-2: #1565c0;        /* 主蓝 */
  --blue-3: #1e87e0;        /* 亮蓝 */
  --blue-4: #e8f1fb;        /* 浅蓝底 */
  --blue-5: #cfe2f7;        /* 浅蓝边 */
  --ink-1: #1f2d3d;         /* 主文字 */
  --ink-2: #5a6b7f;         /* 次文字 */
  --ink-3: #8a99aa;         /* 弱文字 */
  --line: #e3eaf2;          /* 分割线 */
  --bg: #f2f5f9;            /* 工作区底 */
  --green: #21a366;
  --red: #e04b4b;
  --orange: #e8862e;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(15, 43, 84, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.oa-body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink-1);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--blue-2); text-decoration: none; }
a:hover { color: var(--blue-3); }

/* ============ 布局骨架 ============ */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; }

.topbar {
  width: 100%;
  height: 56px;
  background: linear-gradient(90deg, #0a3f85 0%, var(--blue-1) 30%, var(--blue-2) 70%, var(--blue-3) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(9, 48, 96, .35);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 20px 0 16px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.brand-logo svg { width: 19px; height: 19px; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: 2px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.top-notice { position: relative; color: #fff; font-size: 15px; padding: 4px 8px; border-radius: 6px; }
.top-notice:hover { background: rgba(255,255,255,.12); color: #fff; }
.top-notice-num {
  background: var(--red); color: #fff; font-size: 11px; line-height: 1;
  padding: 2px 5px; border-radius: 8px; margin-left: 2px; font-style: normal;
}

.top-user { display: flex; align-items: center; gap: 8px; }
.top-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd57e, #f5a623);
  color: #7a4d00; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.top-user-name { font-size: 13px; }
.top-user-dept { font-size: 12px; opacity: .75; }

.btn-logout {
  color: #dce9f8; border: 1px solid rgba(255,255,255,.4);
  padding: 4px 14px; border-radius: 14px; font-size: 13px;
  transition: all .2s;
}
.btn-logout:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---- 侧栏 ---- */
.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  align-self: flex-start;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.menu { padding: 10px 10px 0; flex: 1; }
.menu-group { margin-bottom: 14px; }
.menu-title {
  font-size: 11px; color: var(--ink-3); letter-spacing: 1px;
  padding: 4px 10px 6px; text-transform: uppercase;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: 6px; color: var(--ink-1);
  position: relative; transition: all .15s;
  font-size: 14px;
}
.menu-item:hover { background: var(--blue-4); color: var(--blue-1); }
.menu-item.active {
  background: var(--blue-4);
  color: var(--blue-1);
  font-weight: 600;
}
.menu-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-3), var(--blue-1));
}
.menu-ico { width: 18px; height: 18px; display: inline-flex; }
.menu-ico svg { width: 18px; height: 18px; }
.menu-text { flex: 1; }
.menu-badge {
  background: var(--red); color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 1; padding: 3px 6px; min-width: 18px;
  text-align: center; font-style: normal;
}
.sidebar-foot { padding: 10px; text-align: center; color: var(--ink-3); font-size: 11px; }

/* ---- 主区 ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.page-title {
  font-size: 17px; font-weight: 600; color: var(--ink-1);
  position: relative; padding-left: 12px;
}
.page-title::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
  border-radius: 2px; background: linear-gradient(180deg, var(--blue-3), var(--blue-1));
}
.page-actions { display: flex; gap: 8px; align-items: center; }

.page-body { padding: 16px 20px; flex: 1; }
.page-foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 14px 0 18px; }

/* ============ 卡片 ============ */
.card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.card-hd h3 { font-size: 14px; color: var(--ink-1); font-weight: 600; display:flex; align-items:center; gap:8px; }
.card-hd h3::before {
  content:""; width:6px; height:6px; border-radius:2px; background:linear-gradient(135deg, var(--blue-3), var(--blue-1));
}
.card-bd { padding: 16px; }
.card-bd.tight { padding: 0; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 5px; border: 1px solid transparent;
  padding: 7px 16px; font-size: 13px; cursor: pointer;
  transition: all .15s; line-height: 1.4; white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(180deg, var(--blue-3), var(--blue-2));
  color: #fff;
  box-shadow: 0 1px 3px rgba(21, 101, 192, .35);
}
.btn-primary:hover { background: linear-gradient(180deg, #2494ea, var(--blue-3)); color:#fff; }
.btn-outline { background: #fff; color: var(--blue-2); border-color: var(--blue-5); }
.btn-outline:hover { background: var(--blue-4); }
.btn-plain { background: #f4f6f9; color: var(--ink-2); border-color: var(--line); }
.btn-plain:hover { background: #ecf0f5; }
.btn-danger { background: #fff; color: var(--red); border-color: #f2c4c4; }
.btn-danger:hover { background: #fdf0f0; }
.btn-success { background: linear-gradient(180deg, #2eb872, var(--green)); color: #fff; }
.btn-success:hover { background: linear-gradient(180deg,#37c47e,#22a86b); color:#fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-btn { font-size: 13px; margin-right: 10px; }
.link-btn:last-child { margin-right: 0; }

/* ============ 表格 ============ */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td {
  padding: 10px 12px; text-align: left; font-size: 13px;
  border-bottom: 1px solid var(--line); word-break: break-all;
}
.tbl th {
  background: #f7fafd; color: var(--ink-2); font-weight: 600;
  border-bottom: 1px solid var(--blue-5); white-space: nowrap;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: #f9fbfe; }
.tbl td.actions { white-space: nowrap; }
.tbl .muted { color: var(--ink-3); }

/* 斑马纹（可选使用） */
.tbl-striped tbody tr:nth-child(even) td { background: #fafcfe; }
.tbl-striped tbody tr:hover td { background: var(--blue-4); }

/* ============ 徽章 ============ */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.badge-blue   { background: #e4eefb; color: #1565c0; border: 1px solid #c8ddf5; }
.badge-green  { background: #e3f6ec; color: #177c4b; border: 1px solid #c3ecd6; }
.badge-red    { background: #fdecec; color: #c03535; border: 1px solid #f6d2d2; }
.badge-orange { background: #fdf2e4; color: #b26a11; border: 1px solid #f6ddb8; }
.badge-gray   { background: #f0f3f7; color: #64748b; border: 1px solid #dfe6ee; }

/* ============ 提示条 ============ */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert-ok   { background: #effaf3; color: #177c4b; border-color: #c9edd7; }
.alert-warn { background: #fdf7e7; color: #9c6e0d; border-color: #f3e2b3; }
.alert-err  { background: #fdeeee; color: #b03434; border-color: #f3caca; }

/* ============ 表单 ============ */
.form-item { margin-bottom: 15px; }
.form-label { display: block; font-size: 13px; color: var(--ink-1); margin-bottom: 6px; font-weight: 600; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-label .tip { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 8px 10px; font-size: 13px; color: var(--ink-1);
  border: 1px solid #d6e0ec; border-radius: 5px; background: #fff;
  transition: border .15s, box-shadow .15s; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.6; }
.input-readonly { background: #f7f9fb !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-footer { text-align: center; padding-top: 6px; }
.form-footer .btn { min-width: 100px; }
.help-text { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }

/* ============ 搜索工具条 ============ */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px;
}
.toolbar .input { width: auto; min-width: 140px; }
.toolbar .grow { flex: 1; }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--blue-5); margin-bottom: 16px; }
.tab {
  padding: 9px 18px; font-size: 14px; color: var(--ink-2);
  border-radius: 6px 6px 0 0; margin-bottom: -2px; border: 2px solid transparent;
  border-bottom: none; cursor: pointer; background: #fff;
}
.tab:hover { color: var(--blue-2); }
.tab.active {
  color: var(--blue-1); font-weight: 600;
  background: var(--blue-4); border-color: var(--blue-5);
  border-bottom: 2px solid #fff;
}
.tab .num { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.tab.active .num { color: var(--blue-2); }

/* ============ 统计卡片 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15,43,84,.12); }
.stat-ico {
  width: 44px; height: 44px; border-radius: 10px; font-size: 20px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-ico.blue   { background: linear-gradient(135deg, #e3eefb, #d3e5f8); }
.stat-ico.green  { background: linear-gradient(135deg, #e2f6ec, #cdeeda); }
.stat-ico.orange { background: linear-gradient(135deg, #fdf1e1, #fbe4c4); }
.stat-ico.red    { background: linear-gradient(135deg, #fdeaea, #f8d3d3); }
.stat-ico.gray   { background: linear-gradient(135deg, #eef1f5, #e2e8f0); }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ink-1); }
.stat-num small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.stat-label { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ============ 审批时间线 ============ */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--blue-5); border-radius: 1px;
}
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--blue-2);
}
.tl-dot.blue  { border-color: var(--blue-3); color: var(--blue-2); }
.tl-dot.green { border-color: var(--green); color: var(--green); }
.tl-dot.red   { border-color: var(--red); color: var(--red); }
.tl-dot.gray  { border-color: #b7c3d1; color: #7b8a9c; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-user { font-weight: 600; font-size: 13px; }
.tl-time { color: var(--ink-3); font-size: 12px; }
.tl-comment {
  margin-top: 5px; font-size: 13px; color: var(--ink-2);
  background: #f7fafd; border: 1px solid var(--line);
  padding: 7px 10px; border-radius: 5px; line-height: 1.6;
}

/* ============ 详情信息行 ============ */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-cell { padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; display: flex; }
.detail-cell:nth-last-child(-n+2):not(.full) { border-bottom: none; }
.detail-key {
  color: var(--ink-3); width: 92px; flex-shrink: 0;
}
.detail-val { color: var(--ink-1); flex: 1; word-break: break-all; }
.detail-cell.full .detail-val { line-height: 1.7; white-space: pre-wrap; }

/* ============ 考勤/月历 通用月历 ============ */
.cal { width: 100%; border-collapse: collapse; background: #fff; }
.cal th {
  padding: 8px 4px; font-size: 13px; color: var(--ink-2);
  background: #f7fafd; border: 1px solid var(--line); font-weight: 600;
}
.cal td {
  border: 1px solid var(--line); height: 74px; vertical-align: top;
  padding: 4px 6px; font-size: 12px; cursor: pointer; transition: background .12s;
}
.cal td:hover { background: #f4f9ff; }
.cal td.other-month { background: #fafbfc; color: #c5cdd8; }
.cal td.today { outline: 2px solid var(--blue-3); outline-offset: -2px; }
.cal .cal-daynum { font-size: 14px; font-weight: 600; color: var(--ink-1); }
.cal .cal-daynum.weekend { color: #d06464; }
.cal .cal-event {
  display: block; margin-top: 3px; font-size: 12px; padding: 2px 6px;
  border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-meeting  { background: #e4eefb; color: #1565c0; border-left: 3px solid #1565c0; }
.cal-business { background: #e8f7f0; color: #147854; border-left: 3px solid #22a06b; }
.cal-out      { background: #fdf3e3; color: #a4650f; border-left: 3px solid #e8962e; }
.cal-personal { background: #f0eefa; color: #5f51c9; border-left: 3px solid #7a6bdc; }

/* 考勤月历状态色 */
.att-ok     { background: #eaf8f0; }
.att-late   { background: #fdf3e3; }
.att-early  { background: #fdeeee; }
.att-absent { background: #f3f5f8; }
.cal .att-tag { display: inline-block; margin-top: 4px; font-size: 11px; padding: 1px 6px; border-radius: 8px; }
.att-tag.ok     { background: #d8f2e3; color: #178055; }
.att-tag.late   { background: #fbeacc; color: #a4650f; }
.att-tag.early  { background: #f9d9d9; color: #b23333; }
.att-tag.absent { background: #e8ecf1; color: #77839a; }

/* ============ 面包屑 ============ */
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--blue-2); }

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 42px 0; color: var(--ink-3); font-size: 13px; }
.empty .empty-ico { font-size: 34px; display: block; margin-bottom: 10px; opacity: .7; }

/* ============ 分页 ============ */
.pager { display: flex; gap: 6px; align-items: center; padding: 14px 16px; justify-content: center; }
.pager a, .pager span {
  min-width: 30px; height: 30px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 5px; font-size: 13px;
  background: #fff; color: var(--ink-2);
}
.pager a:hover { border-color: var(--blue-3); color: var(--blue-2); }
.pager .cur { background: var(--blue-2); border-color: var(--blue-2); color: #fff; font-weight: 600; }
.pager-info { border: none; background: none; color: var(--ink-3); margin-left: 8px; }

/* ============ 弹窗 ============ */
.modal-mask {
  display: none; position: fixed; inset: 0;
  background: rgba(17, 33, 56, .45); z-index: 900;
  align-items: center; justify-content: center;
  backdrop-filter: blur(1px);
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 10px; width: 400px; max-width: 92vw;
  box-shadow: 0 10px 40px rgba(9, 30, 66, .25); overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.modal-title { padding: 14px 18px; font-weight: 600; border-bottom: 1px solid var(--line); font-size: 15px; }
.modal-body { padding: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.modal-foot { padding: 12px 18px; text-align: right; background: #fafbfd; display: flex; justify-content: flex-end; gap: 8px; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(46, 148, 233, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(30, 108, 217, .4), transparent 60%),
    linear-gradient(135deg, #082f63 0%, #0b4f9e 45%, #1565c0 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}
.login-card {
  width: 400px; max-width: 94vw; position: relative; z-index: 2;
  background: rgba(255,255,255,.97);
  border-radius: 12px; padding: 34px 36px 30px;
  box-shadow: 0 20px 60px rgba(5, 25, 57, .5);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand-ico {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-3), var(--blue-1));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 80, 168, .4);
}
.login-brand-ico svg { width: 28px; height: 28px; }
.login-brand h1 { font-size: 20px; color: var(--ink-1); letter-spacing: 3px; }
.login-brand p { font-size: 12px; color: var(--ink-3); margin-top: 6px; letter-spacing: 1px; }
.login-form .form-item { margin-bottom: 18px; }
.login-input-wrap { position: relative; }
.login-input-wrap .input { padding-left: 38px; height: 42px; font-size: 14px; }
.login-input-wrap .pfx {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 15px; width: 18px; text-align: center;
}
.login-btn {
  width: 100%; height: 42px; font-size: 15px; letter-spacing: 6px;
  border-radius: 6px; border: none; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2), var(--blue-3));
  box-shadow: 0 3px 10px rgba(18, 88, 175, .35);
  transition: filter .15s; font-family: inherit;
}
.login-btn:hover { filter: brightness(1.1); }
.login-foot { margin-top: 18px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* ============ 通用小工具 ============ */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--ink-3); }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.text-bold { font-weight: 600; }
.f-right { text-align: right; }
.w-100 { width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* 公告列表 */
.notice-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: #f8fbff; }
.notice-item .n-ico { font-size: 16px; margin-top: 1px; }
.notice-item .n-main { flex: 1; min-width: 0; }
.notice-item .n-title {
  font-size: 14px; color: var(--ink-1); font-weight: 500;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.notice-item .n-title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.notice-item .n-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* 公告正文 */
.rich-text { line-height: 2; font-size: 14px; color: #333; white-space: pre-wrap; word-break: break-word; }

/* 文件类型图标色 */
.file-ext {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 2px 4px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: #fff; font-family: Consolas, monospace;
}
.ext-doc  { background: #2b579a; }
.ext-xls  { background: #1e7145; }
.ext-ppt  { background: #c43e1c; }
.ext-pdf  { background: #d13030; }
.ext-img  { background: #7a52c7; }
.ext-zip  { background: #b8860b; }
.ext-txt  { background: #64748b; }
.ext-cad  { background: #1861a8; }
.ext-def  { background: #8a99aa; }

/* 通讯录名片 */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); position: relative;
}
.contact-card:hover { box-shadow: 0 4px 12px rgba(15,43,84,.13); }
.contact-name { font-size: 15px; font-weight: 600; }
.contact-pos { font-size: 12px; color: var(--ink-3); margin: 2px 0 8px; }
.contact-row { font-size: 13px; color: var(--ink-2); margin-top: 5px; word-break: break-all; }
.contact-tag { position: absolute; top: 12px; right: 12px; }

/* 打卡大按钮 */
.punch-box {
  text-align: center; padding: 28px 16px 24px;
  background: linear-gradient(180deg, #f6faff, #fff);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.punch-clock { font-size: 40px; font-weight: 700; font-family: Consolas, "Microsoft YaHei", monospace; letter-spacing: 2px; color: var(--ink-1); }
.punch-state { margin: 10px 0 18px; font-size: 13px; color: var(--ink-2); }
.punch-btn {
  display: inline-block; width: 120px; height: 120px; border-radius: 50%;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 18px; letter-spacing: 3px; color: #fff;
  background: linear-gradient(145deg, #2b8de8, #1259b3);
  box-shadow: 0 6px 20px rgba(21, 101, 192, .4), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .12s, filter .15s;
}
.punch-btn:hover { filter: brightness(1.08); }
.punch-btn:active { transform: scale(.96); }
.punch-btn.done {
  background: linear-gradient(145deg, #9fb2c8, #7b8fa8);
  box-shadow: 0 4px 12px rgba(100, 116, 139, .35);
}
.punch-time { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

/* 工作台两栏 */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: 1fr; } }

.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #f8fbff; }
.list-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .time { color: var(--ink-3); font-size: 12px; flex-shrink: 0; }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--ink-2); font-size: 12px; transition: all .15s; background: #fff;
}
.quick-item:hover { border-color: var(--blue-5); background: var(--blue-4); color: var(--blue-1); transform: translateY(-2px); }
.quick-item .q-ico {
  width: 38px; height: 38px; border-radius: 9px; font-size: 17px;
  background: #f0f5fb; display: flex; align-items: center; justify-content: center;
}

/* ============ 权限勾选表 ============ */
.perm-group { margin-bottom: 14px; }
.perm-group-title {
  font-size: 13px; font-weight: 600; color: var(--blue-1);
  padding: 6px 10px; background: var(--blue-4); border-radius: 5px; margin-bottom: 8px;
}
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; padding-left: 6px; }
.perm-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.perm-item input { cursor: pointer; }
.perm-item .perm-code { color: var(--ink-3); font-size: 11px; font-family: Consolas, monospace; }

/* ============ 简单响应式 ============ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cell:nth-last-child(-n+2):not(.full) { border-bottom: 1px solid var(--line); }
  .detail-cell.full { border-bottom: 1px solid var(--line); }
}

/* 打印 */
@media print {
  .topbar, .sidebar, .page-actions, .toolbar, .page-foot { display: none !important; }
  .main { width: 100%; }
}

/* ============ 写邮件 · 通讯录自动匹配下拉 ============ */
.contact-pick { position: relative; }
.contact-pick-list {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 20px rgba(15,43,84,.12); max-height: 240px; overflow-y: auto;
  display: none;
}
.contact-pick-list.show { display: block; }
.contact-pick-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  cursor: pointer; font-size: 13px; border-bottom: 1px solid #f2f5f9;
}
.contact-pick-item:last-child { border-bottom: none; }
.contact-pick-item:hover { background: var(--blue-4); }
.contact-pick-item .cp-name { font-weight: 600; color: var(--ink-1); min-width: 56px; }
.contact-pick-item .cp-email { color: var(--blue-2); flex: 1; word-break: break-all; }
.contact-pick-item .cp-type {
  font-size: 11px; color: var(--ink-3); background: #f4f6f9; border-radius: 4px;
  padding: 1px 6px; white-space: nowrap;
}

/* ============ 审批/任务附件列表 ============ */
.attach-item {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  margin-bottom: 6px; background: #fafbfd; font-size: 13px;
}
.attach-item .btn { margin-left: auto; }
