/* 项目署名：佟浩楠 */
/* 全局颜色、字体和基础主题变量 */
:root {
  color-scheme: light;
  --ink: #152921;
  --muted: #75827d;
  --green: #176b4b;
  --green-dark: #0e4e36;
  --sand: #f5f0e5;
  --cream: #fbfaf6;
  --line: #e4e8e3;
  --orange: #d97b35;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

/* 页面通用盒模型、背景和应用容器 */
* { box-sizing: border-box; }
body { margin: 0; background: #e8eee9; color: var(--ink); }
body.attendance-detail-open { overflow: hidden; }
body.attendance-detail-open::before { position: fixed; z-index: 24; inset: 0; background: #10291f66; backdrop-filter: blur(2px); content: ""; pointer-events: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: var(--cream); box-shadow: 0 0 40px #1d362817; transition: width .22s ease; }
body[data-role="admin"] .shell { width: min(100%, 820px); }

/* 顶部品牌栏、标题和身份标签 */
header { display: flex; align-items: center; gap: 12px; padding: 22px 20px 16px; background: var(--green-dark); color: white; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffff55; border-radius: 14px; background: #ffffff12; font: 700 22px serif; }
h1, h2, p { margin: 0; }
h1 { font-size: 20px; letter-spacing: 2px; }
header p { margin-top: 4px; color: #d6e7de; font-size: 12px; }
.badge { margin-left: auto; padding: 6px 9px; border-radius: 99px; background: #ffffff15; color: #e8f2ed; font-size: 11px; }
.header-badges { margin-left: auto; display: flex; gap: 6px; }
.header-badges .badge { margin-left: 0; }
[hidden] { display: none !important; }
body[data-role="employee"] nav { grid-template-columns: repeat(2, 1fr); }

/* 打卡、记录和管理三个主导航 */
nav { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 14px; background: var(--green-dark); }
.nav-item { padding: 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #b8cfc3; }
.nav-item.active { border-bottom-color: #e1a66f; color: white; font-weight: 700; }
main { padding: 18px; }
.page { display: none; }
.page.active { display: block; }

/* 用户信息、时钟和日期主卡片 */
.hero-card { padding: 20px; border-radius: 22px; background: linear-gradient(145deg, #1a7251, #0c4b35); color: white; box-shadow: 0 14px 35px #13573e35; }
.user-row { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f1c99f; color: #704221; font-weight: 800; }
.user-row strong, .user-row span { display: block; }
.user-row span { margin-top: 3px; color: #c9ded3; font-size: 12px; }
.live-dot { margin-left: auto; font-size: 11px; color: #d7e8df; }
.live-dot i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #83d9a8; box-shadow: 0 0 0 4px #83d9a822; }
.clock { margin-top: 26px; text-align: center; font-size: 48px; font-weight: 200; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.date-text { margin: 4px 0 10px; text-align: center; color: #c9ded3; font-size: 13px; }

/* 定位状态和最近考勤点信息卡片 */
.location-card { margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.section-title, .page-heading { display: flex; align-items: center; justify-content: space-between; }
.pin { margin-right: 8px; color: var(--orange); }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 13px; }
.location-status { margin-top: 17px; font-size: 14px; }
.nearest { margin-top: 8px; color: var(--muted); font-size: 12px; }

/* 圆形打卡按钮和操作结果提示 */
.punch-button { width: 164px; height: 164px; margin: 28px auto 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 8px solid #e5eee8; border-radius: 50%; background: var(--green); color: white; box-shadow: 0 14px 32px #176b4b4a; }
.punch-button:disabled { filter: grayscale(.8); opacity: .55; cursor: not-allowed; }
.punch-button span { font-size: 22px; font-weight: 800; }
.punch-button small { margin-top: 8px; opacity: .72; font-size: 10px; }
.message { min-height: 22px; text-align: center; color: var(--green); font-size: 13px; }
.punch-helper-actions { display: grid; gap: 8px; width: min(320px, 100%); margin: 8px auto 0; }
.interactive-hint { min-height: 42px; border: 0; border-radius: 14px; background: #edf5ef; color: var(--green); font-size: 13px; font-weight: 800; box-shadow: 0 8px 18px #173a280d; }
.interactive-hint.subtle { background: #f6f1e6; color: #8b612a; }
.interactive-hint:active { transform: translateY(1px); }
.modal-overlay[hidden] { display: none; }
.modal-overlay { position: fixed; z-index: 70; inset: 0; display: grid; align-items: center; justify-items: center; padding: 18px; background: #10251c80; backdrop-filter: blur(4px); }
.modal-panel { width: min(720px, 100%); max-height: min(86vh, 760px); overflow: auto; margin: 0; box-shadow: 0 24px 80px #10251c55; }
.compact-modal { width: min(520px, 100%); }
.modal-title-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef3ef; color: var(--green); font-size: 22px; line-height: 1; }

/* 页面标题、通用按钮和记录查询工具 */
.page-heading { margin: 3px 0 17px; }
.page-heading h2 { font-size: 21px; }
.page-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.secondary-button, .primary-button { border: 0; border-radius: 11px; padding: 10px 14px; }
.secondary-button { background: #e8eee9; color: var(--green); }
.primary-button { background: var(--green); color: white; font-weight: 700; }
.record-list.empty { padding: 50px 10px; text-align: center; color: var(--muted); }
.record-tools { display: grid; grid-template-columns: auto 1fr auto 1fr auto auto; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 14px; background: var(--sand); }
.record-tools label { color: var(--muted); font-size: 12px; }
.record-tools input, .record-tools select { min-width: 0; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; border-radius: 13px; background: var(--sand); }
.admin-tab { flex: 1; border: 0; border-radius: 10px; padding: 11px; color: var(--muted); background: transparent; font-weight: 700; }
.admin-tab.active { color: white; background: var(--green); }
.admin-view { display: none; }
.admin-view.active { display: block; }
.attendance-summary { display: inline-flex; align-items: center; min-height: 28px; margin: 0 0 12px; padding: 6px 10px; border-radius: 99px; background: #edf3ef; color: var(--green); font-size: 12px; }

/* 管理工作台：统计卡片、横向功能菜单和单列内容区，手机电脑保持同一交互。 */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.admin-stats article { min-width: 0; padding: 13px; border: 1px solid #e8eadf; border-radius: 18px; background: linear-gradient(145deg, #ffffff, #f6f4ed); box-shadow: 0 8px 24px #173a2810; }
.admin-stats span, .admin-stats small { display: block; color: var(--muted); font-size: 11px; }
.admin-stats strong { display: block; margin: 4px 0; color: var(--green-dark); font-size: 24px; line-height: 1; }
.admin-workspace { display: block; }
.admin-side-menu { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; padding: 6px; border: 1px solid #eee8dc; border-radius: 19px; background: #f6f1e6; box-shadow: 0 8px 22px #173a280c; }
.admin-menu-item { width: 100%; min-width: 0; border: 0; border-radius: 15px; padding: 12px 8px; background: transparent; color: var(--muted); text-align: center; box-shadow: none; }
.admin-menu-item span { display: none; }
.admin-menu-item strong, .admin-menu-item small { display: block; }
.admin-menu-item strong { font-size: 14px; line-height: 1.25; }
.admin-menu-item small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.admin-menu-item.active { border-color: #176b4b22; background: linear-gradient(145deg, var(--green), #0f5a3e); color: white; box-shadow: 0 12px 28px #176b4b30; }
.admin-menu-item.active span { background: #ffffff22; color: white; }
.admin-menu-item.active small { color: #d7e9df; }
.admin-content-panel { min-width: 0; padding: 15px; border: 1px solid #eee8dc; border-radius: 22px; background: #fffdfa; box-shadow: 0 12px 28px #173a280d; }
.point-filter-row { display: flex; gap: 8px; margin: 0 0 13px; padding: 5px; border-radius: 14px; background: var(--sand); }
.point-filter { flex: 1; min-height: 38px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.point-filter.active { background: white; color: var(--green); box-shadow: 0 5px 14px #173a2812; }
.point-group { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: white; }
.point-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px; background: linear-gradient(145deg, #f7f4ec, #fffdfa); border-bottom: 1px solid #eef0eb; }
.point-group-title strong, .point-group-title small { display: block; }
.point-group-title strong { font-size: 16px; }
.point-group-title small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.point-group-count { flex: 0 0 auto; padding: 5px 9px; border-radius: 99px; background: #e9f2ed; color: var(--green); font-size: 11px; font-weight: 800; }
.point-tree { padding: 12px; }
.point-tree-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
.point-tree-item + .point-tree-item { border-top: 1px dashed #e6eae5; }
.point-tree-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: #eef4f0; color: var(--green); font-size: 13px; font-weight: 900; }
.point-tree-main { min-width: 0; }
.point-tree-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.point-tree-top strong { display: block; font-size: 14px; line-height: 1.35; }
.point-kind { display: inline-flex; margin-top: 5px; padding: 4px 7px; border-radius: 99px; background: #edf4ef; color: var(--green); font-size: 10px; font-weight: 800; }
.point-kind.rest { background: #fff2df; color: #9b6121; }
.point-tree-meta { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.point-tree-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.point-list.empty { padding: 36px 10px; border: 1px dashed #dfe5df; border-radius: 16px; text-align: center; color: var(--muted); background: #fbfaf6; }

/* 管理员员工出勤筛选区：字段分组、按钮和记录卡片保持统一视觉层级。 */
.attendance-filter-card { margin-bottom: 16px; padding: 16px; border: 1px solid #ebe5d8; border-radius: 18px; background: linear-gradient(145deg, #f7f3e9, #f4efe3); }
.attendance-filter-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.attendance-filter-title strong { font-size: 15px; }
.attendance-filter-title span { color: var(--muted); font-size: 11px; }
.attendance-filter-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
.attendance-filter-field { display: block; min-width: 0; }
.attendance-filter-field > span { display: block; margin: 0 0 6px 3px; color: #64716b; font-size: 11px; font-weight: 700; }
.attendance-filter-field input, .attendance-filter-field select { height: 44px; min-width: 0; border-color: #dfe4df; box-shadow: 0 2px 8px #253a2d08; }
.attendance-filter-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 13px; }
.attendance-filter-actions button { min-width: 108px; min-height: 43px; }
.inline-filter-action { align-self: end; margin-top: 0; }
.inline-filter-action button { width: 100%; }
.attendance-query-button { background: white; box-shadow: inset 0 0 0 1px #dbe5df; }
.attendance-export-button { box-shadow: 0 7px 16px #176b4b25; }
.attendance-filter-card-compact { padding: 14px; }
.attendance-detail-filter-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.attendance-detail-layout { position: relative; display: block; }
.attendance-table-panel, .attendance-detail-panel { min-width: 0; }
.attendance-table { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 22px #173a280b; }
.attendance-table-head, .attendance-table-row { display: grid; grid-template-columns: 1.05fr .9fr .7fr .7fr .72fr; gap: 8px; align-items: center; }
.attendance-table-head { padding: 11px 13px; background: #f5f3ec; color: #66726d; font-size: 11px; font-weight: 800; }
.attendance-table-row { width: 100%; border: 0; border-top: 1px solid #eef0ec; padding: 12px 13px; background: white; color: var(--ink); text-align: left; }
.attendance-table-row:hover, .attendance-table-row.active { background: #f6fbf8; }
.attendance-table-row.active { box-shadow: inset 4px 0 0 #4e9b74; }
.attendance-table-row strong, .attendance-table-row small { display: block; }
.attendance-table-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.attendance-table-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.attendance-time-cell { color: #50605a; font-size: 12px; font-variant-numeric: tabular-nums; }
.status-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; border-radius: 99px; padding: 5px 8px; background: #e7f3ec; color: var(--green); font-size: 11px; font-style: normal; font-weight: 800; }
.status-chip.warning { background: #fff2df; color: #9b6121; }
.status-chip.danger { background: #f8e6e2; color: #a33d34; }
.status-chip.leave { background: #e7eef8; color: #315f91; }
.attendance-card-list { display: grid; gap: 10px; }
.attendance-row-card { position: relative; display: block; width: 100%; border: 1px solid #dde4df; border-radius: 18px; padding: 14px; background: white; color: var(--ink); text-align: left; box-shadow: 0 6px 18px #173a280a; }
.attendance-row-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 18px 0 0 18px; background: #68a486; content: ""; }
.attendance-row-card:hover, .attendance-row-card.active { border-color: #9fc7b2; background: #fbfffc; box-shadow: 0 10px 26px #176b4b16; }
.attendance-row-card.attendance-missing-row::before { background: #d89c45; }
.attendance-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.attendance-row-head > span { min-width: 0; }
.attendance-row-head strong, .attendance-row-head small, .attendance-row-project, .attendance-row-hint { display: block; }
.attendance-row-head strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.3; }
.attendance-row-head small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.attendance-row-project { margin: 11px 0 10px; color: #50605a; font-size: 12px; line-height: 1.5; }
.attendance-row-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.attendance-row-grid span { min-width: 0; padding: 9px 10px; border-radius: 13px; background: #f6f8f4; }
.attendance-row-grid b, .attendance-row-grid em { display: block; font-style: normal; }
.attendance-row-grid b { color: var(--muted); font-size: 10px; }
.attendance-row-grid em { margin-top: 4px; color: var(--green-dark); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.attendance-row-hint { margin-top: 10px; color: #7b8983; font-size: 11px; }
.attendance-row-pending { display: inline-flex; margin-top: 8px; padding: 5px 8px; border-radius: 99px; background: #fff2df; color: #9b6121; font-size: 11px; font-weight: 800; }
.attendance-detail-panel { position: fixed; z-index: 25; left: 50%; right: auto; top: auto; bottom: 18px; width: min(560px, calc(100vw - 32px)); max-height: min(72vh, 720px); overflow: auto; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 24px 70px #10291f4d; opacity: 0; transform: translate(-50%, calc(100% + 28px)); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
body.attendance-detail-open .attendance-detail-panel { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.attendance-detail-empty { padding: 22px; color: var(--muted); text-align: center; }
.attendance-detail-empty strong, .attendance-detail-empty span { display: block; }
.attendance-detail-empty strong { margin-bottom: 8px; color: var(--ink); font-size: 17px; }
.attendance-detail-card { padding: 18px; }
.attendance-detail-head { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.attendance-detail-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 14px; background: #e8eee9; color: var(--green); font-weight: 900; }
.attendance-detail-head strong, .attendance-detail-head span { display: block; }
.attendance-detail-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.attendance-detail-close { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 50%; background: #eef3ef; color: var(--green); font-size: 22px; line-height: 1; }
.attendance-detail-section { padding: 13px 0; border-bottom: 1px dashed #edf0ed; }
.attendance-detail-section:last-child { border-bottom: 0; }
.attendance-detail-section h3 { margin: 0 0 8px; font-size: 13px; }
.attendance-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.attendance-detail-kv { padding: 9px; border-radius: 12px; background: #f7f8f5; }
.attendance-detail-kv span, .attendance-detail-kv strong { display: block; }
.attendance-detail-kv span { color: var(--muted); font-size: 10px; }
.attendance-detail-kv strong { margin-top: 4px; font-size: 12px; word-break: break-word; }
.attendance-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.attendance-detail-actions button { min-height: 38px; border: 0; border-radius: 12px; padding: 8px 10px; font-size: 12px; font-weight: 800; }
.attendance-detail-actions .danger-action { grid-column: 1 / -1; }
.danger-action { color: #a33d34; background: #f8e7e4; }
.attendance-missing-row { background: #fffaf3; }
#adminAttendanceList .record-item { position: relative; overflow: hidden; padding: 16px 16px 16px 19px; border-color: #dde4df; box-shadow: 0 5px 16px #1d36280a; }
#adminAttendanceList .record-item::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #68a486; content: ""; }
#adminAttendanceList .record-top strong { padding-right: 10px; font-size: 15px; }
#adminAttendanceList .record-meta { padding-top: 2px; border-top: 1px dashed #edf0ed; }
.record-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.attendance-status-panel { margin-bottom: 14px; padding: 13px; border: 1px solid #e5ded0; border-radius: 18px; background: var(--sand); }
.attendance-status-title { margin-bottom: 10px; color: var(--ink); font-weight: 800; }
.attendance-status-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.attendance-status-card strong, .attendance-status-card span, .attendance-status-card small { display: block; }
.attendance-status-card span { margin-top: 4px; color: var(--green); font-size: 12px; font-weight: 800; }
.attendance-status-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.attendance-status-card.warning { border-color: #ead7b6; box-shadow: 0 5px 16px #8a5a1610; }
.attendance-status-card.normal { opacity: .78; }
.attendance-status-actions { display: flex; flex: 0 0 auto; gap: 7px; }

/* 员工补卡申请、管理员审批和待处理打卡提示。 */
.correction-card { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 28px #173a2810; }
.correction-card.modal-panel { margin: 0; }
.correction-note { margin: 9px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.correction-form { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--sand); }
.correction-form label { min-width: 0; }
.correction-form label span { display: block; margin: 0 0 5px 3px; color: #64716b; font-size: 11px; font-weight: 700; }
.correction-list { display: grid; gap: 10px; margin-top: 12px; }
.correction-list.empty { padding: 30px 10px; border: 1px dashed #dfe5df; border-radius: 16px; background: #fbfaf6; color: var(--muted); text-align: center; }
.correction-item { padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 6px 18px #173a280a; }
.correction-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.correction-item strong, .correction-item small, .correction-meta { display: block; }
.correction-item strong { font-size: 15px; line-height: 1.35; }
.correction-item small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.correction-meta { margin-top: 9px; color: #50605a; font-size: 12px; line-height: 1.7; }
.correction-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.correction-actions button { min-height: 36px; border: 0; border-radius: 11px; padding: 8px 12px; font-size: 12px; font-weight: 800; }
.approval-section-title { margin: 6px 0 2px; padding: 8px 10px; border-radius: 12px; background: #edf5ef; color: var(--green); font-size: 13px; font-weight: 900; }
.pending-punch-notice { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: #fff6e9; color: #8b581e; font-size: 13px; line-height: 1.55; }
.pending-punch-notice.normal { background: #edf5ef; color: var(--green); }
.pending-punch-notice span { display: block; }
.pending-rule-link { margin-top: 8px; border: 0; border-radius: 99px; padding: 6px 10px; background: #ffffffa8; color: var(--green); font-size: 12px; font-weight: 800; }

/* 个人日、周、月考勤统计卡片，记录页不再展示管理员全员查询工具。 */
.personal-stats-card { padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 10px 30px #173a2810; }
.personal-stats-head, .stats-person, .stats-date-row, .stats-summary { display: flex; align-items: center; }
.personal-stats-head { justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.stats-person { min-width: 0; gap: 10px; }
.stats-person strong, .stats-person small { display: block; }
.stats-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-person small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.stats-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: #e8eee9; color: var(--green); font-weight: 800; }
.stats-periods { display: flex; padding: 3px; border-radius: 13px; background: #f3f4f2; }
.stats-period { width: 38px; border: 0; border-radius: 10px; padding: 8px 0; background: transparent; color: var(--muted); }
.stats-period.active { background: white; color: var(--ink); font-weight: 800; box-shadow: 0 2px 8px #15292118; }
.stats-date-row { gap: 8px; margin-top: 16px; }
.stats-date-row input { text-align: center; font-weight: 700; }
.stats-date-button { flex: 0 0 38px; height: 38px; border: 0; border-radius: 11px; background: #eef2ef; color: var(--green); font-size: 24px; line-height: 1; }
.stats-range { margin: 12px 0; text-align: center; color: var(--muted); font-size: 12px; }
.stats-summary { gap: 11px; margin: 12px 0 18px; padding: 14px; border-radius: 14px; background: #f5f7f5; }
.stats-summary strong, .stats-summary small { display: block; }
.stats-summary small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.stats-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ba59f; }
.stats-summary.normal .stats-status-dot { background: #2a9c69; }
.stats-summary.pending .stats-status-dot { background: #e49a3a; }
.stats-summary.warning .stats-status-dot { background: #9ba59f; }
.stats-timeline.empty { padding: 36px 8px; text-align: center; color: var(--muted); }
.stats-timeline-item { position: relative; display: flex; gap: 12px; padding: 4px 0 18px; }
.stats-timeline-item:not(:last-child)::before { position: absolute; top: 15px; bottom: -2px; left: 4px; width: 1px; background: var(--line); content: ""; }
.timeline-dot { position: relative; z-index: 1; flex: 0 0 auto; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e9f2ed; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-content .record-top span { color: var(--muted); font-size: 11px; }

/* 考勤记录和项目考勤点列表卡片 */
.record-item, .point-item { margin-bottom: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.record-top, .point-top { display: flex; justify-content: space-between; align-items: center; }
.record-type { padding: 4px 8px; border-radius: 8px; background: #e5f3eb; color: var(--green); font-size: 12px; font-weight: 700; }
.record-meta, .point-meta { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* 管理页面输入框和新增项目表单 */
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #78a28e; box-shadow: 0 0 0 3px #176b4b12; }
.point-form { display: grid; gap: 10px; margin: 14px 0 20px; padding: 15px; border-radius: 16px; background: var(--sand); }
.point-form label, .point-edit-form label { min-width: 0; }
.point-form label span, .point-edit-form label span { display: block; margin: 0 0 5px 3px; color: #64716b; font-size: 11px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.time-window-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-window-grid label { min-width: 0; }
.time-window-grid span { display: block; margin: 0 0 5px 3px; color: #64716b; font-size: 11px; font-weight: 700; }
.time-window-grid input { padding: 10px 8px; font-size: 12px; }
.switch { border: 0; border-radius: 99px; padding: 6px 10px; background: #dfe9e3; color: var(--green); font-size: 11px; }
.switch.off { background: #ececec; color: #888; }
.point-actions { display: flex; align-items: center; gap: 7px; }
.edit-button { border: 0; border-radius: 99px; padding: 6px 10px; background: #e7eef8; color: #315f91; font-size: 11px; }
.edit-button:hover { background: #dbe8f6; }
.delete-button { border: 0; border-radius: 99px; padding: 6px 10px; background: #f8e7e4; color: #a33d34; font-size: 11px; }
.delete-button:hover { background: #f2d5d1; }

/* 修改考勤点弹窗，兼顾电脑和手机管理端。 */
.modal-overlay { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 18px; background: #10291f80; backdrop-filter: blur(4px); }
.modal-card { width: min(100%, 440px); padding: 20px; border-radius: 21px; background: var(--cream); box-shadow: 0 24px 70px #10291f55; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.modal-heading h2 { font-size: 20px; }
.modal-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #e8eee9; color: var(--green); font-size: 23px; line-height: 1; }
.point-edit-form { display: grid; gap: 10px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 9px; margin-top: 5px; }
.modal-actions button { min-height: 44px; }
.modal-actions button:disabled { opacity: .6; cursor: wait; }

/* 小屏幕下重新排列查询工具和表单布局 */
@media (max-width: 520px) {
  body[data-role="admin"] .shell { width: 100%; }
  .modal-overlay { align-items: end; padding: 10px; }
  .modal-panel { width: 100%; max-height: 88vh; border-radius: 24px 24px 16px 16px; }
  .admin-side-menu { top: 0; margin-inline: -2px; }
  .admin-content-panel { padding: 13px; }
  .attendance-detail-filter-grid { grid-template-columns: 1fr 1fr; }
  .attendance-detail-layout { display: block; }
  .attendance-detail-panel { right: auto; left: 50%; bottom: 0; width: 100%; max-height: 78vh; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 24px 24px 0 0; }
  .attendance-filter-grid { grid-template-columns: 1fr 1fr; }
  .attendance-filter-field:first-child { grid-column: 1 / -1; }
  .time-window-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats article:last-child { grid-column: 1 / -1; }
  .admin-side-menu { position: sticky; grid-template-columns: repeat(4, minmax(92px, 1fr)); overflow-x: auto; padding: 5px; }
  .admin-menu-item { min-width: 92px; padding: 10px 8px; }
  .admin-menu-item small { display: none; }
  .admin-content-panel { border-radius: 18px; }
  .point-tree-top { align-items: stretch; flex-direction: column; }
  .point-tree-actions { justify-content: flex-start; }
  .record-tools { grid-template-columns: 1fr 1fr; }
  .record-tools label { grid-column: 1 / -1; }
  .attendance-filter-card { padding: 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .attendance-filter-title { display: block; }
  .attendance-filter-title span { display: block; margin-top: 4px; }
  .attendance-filter-grid { grid-template-columns: 1fr; }
  .attendance-detail-filter-grid { grid-template-columns: 1fr; }
  .attendance-filter-field:first-child { grid-column: auto; }
  .attendance-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .inline-filter-action { display: block; }
  .attendance-filter-actions button { min-width: 0; }
  .attendance-detail-grid { grid-template-columns: 1fr; }
  .attendance-row-grid { grid-template-columns: 1fr 1fr; }
  .attendance-status-card { align-items: stretch; flex-direction: column; }
  .attendance-status-actions, .record-actions { flex-wrap: wrap; justify-content: flex-end; }
  .point-top { align-items: flex-start; gap: 10px; }
  .point-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 360px) { .clock { font-size: 40px; } .form-grid, .time-window-grid { grid-template-columns: 1fr; } }
