/* 设计方向：克制的中性色 + 单一强调色（沿用原系统的墨绿色调，但更沉稳），
   一套字体（Inter，中文走系统的 PingFang SC/微软雅黑），左侧竖排导航，
   矩形圆角按钮（不用胶囊），阴影降到几乎看不见，弹窗/标签页用自定义组件替代
   浏览器原生 confirm()和文字导航。动画克制：只在弹窗开关、htmx局部刷新处给一点点过渡，
   别的地方不加，因为这是每天要打开几十次的工具，不是营销页。 */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 品牌色：墨绿，比原来的亮天蓝更沉稳专业 */
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #f0fdfa;

  /* 中性色 */
  --text: #18181b;
  --text-muted: #71717a;
  --text-subtle: #a1a1aa;
  --border: #e4e4e7;
  --bg: #fafafa;
  --surface: #ffffff;

  /* 语义色：只用于真正表示状态的地方，不做装饰 */
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  /* 形状：按钮/输入是矩形圆角，标签是胶囊 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* 阴影：几乎不可见，主要靠边框分隔 */
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 12px 32px rgba(24, 24, 27, 0.10);

  --font: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  --sidebar-w: 224px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-dark);
}

h1, h2, h3, h4 {
  margin-top: 0;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- 左侧导航 ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 18px 14px;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.sidebar-brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sidebar-brand .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 6px 10px;
  overflow-y: auto;
}

.sidebar-nav a,
.sidebar-nav .disabled-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}

.sidebar-nav a svg,
.sidebar-nav .disabled-link svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-nav .disabled-link {
  color: var(--text-subtle);
  cursor: default;
}

/* 侧栏树状分组（比如"人事"下面挂"员工花名册/员工档案/人事文档"），
   跟顶层单个链接共用同一套字体/间距节奏，只是多了展开/收起。 */
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  margin-bottom: 2px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.nav-group-toggle svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-group-toggle .chevron {
  margin-left: auto;
  transition: transform 0.15s ease;
}

.nav-group.is-open .nav-group-toggle .chevron {
  transform: rotate(180deg);
}

.nav-group-toggle:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-subgroup {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.18s ease;
}

.nav-subgroup > * {
  overflow: hidden;
}

.nav-group.is-open .nav-subgroup {
  grid-template-rows: 1fr;
}

.nav-subgroup a {
  display: flex;
  align-items: center;
  padding: 7px 10px 7px 36px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  position: relative;
}

.nav-subgroup a::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-subtle);
  transform: translateY(-50%);
}

.nav-subgroup a:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-subgroup a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-subgroup a.active::before {
  background: var(--primary);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.sidebar-user .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-user .who {
  flex: 1;
  min-width: 0;
}

.sidebar-user .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .role {
  font-size: 11.5px;
  color: var(--text-muted);
}

.sidebar-user button {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: var(--radius-sm);
}

.sidebar-user button:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.main {
  flex: 1;
  min-width: 0;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 28px;
}

.page.wide {
  max-width: 1360px;
}

/* ---------- 卡片 / 通用组件 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar input[type="text"] {
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 240px;
  font-family: var(--font);
}

.toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* 列多的表格默认会把每个格子的字挤到换行，看着很局促——改成不换行+让外层 .card 的
   overflow-x:auto 接管，字段多的表格横向滚动，而不是每个字都挤成竖排。 */
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  position: relative;
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--border);
}

/* 拖拽调整列宽的手柄，见 base.html 底部 makeTableResizable()。 */
.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  user-select: none;
}

.col-resizer:hover,
.col-resizer.is-resizing {
  background: var(--primary);
  opacity: 0.5;
}

tr:hover {
  background: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn.danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-bg);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tag.muted {
  background: #f4f4f5;
  color: var(--text-muted);
}

.tag.warn {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- 标签页（替代原来管道符分隔的文字子导航） ---------- */

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f4f4f5;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.tabs .tab {
  padding: 7px 14px;
  border-radius: calc(var(--radius-md) - 4px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.tabs .tab:hover {
  color: var(--text);
}

.tabs .tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

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

form.stacked label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
}

form.stacked label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

form.stacked input,
form.stacked select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

form.stacked input:focus,
form.stacked select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

form.stacked input:disabled {
  background: var(--bg);
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.error-box {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

/* ---------- 弹窗（原生 <dialog>，JS 切 .is-open 触发过渡，兼容性比 @starting-style 好） ---------- */

dialog.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-width: 380px;
  width: calc(100% - 40px);
  color: var(--text);
  opacity: 0;
  transform: scale(0.96) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

dialog.modal.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
}

dialog.modal::backdrop {
  background: rgba(24, 24, 27, 0);
  transition: background 0.15s ease;
}

dialog.modal.is-open::backdrop {
  background: rgba(24, 24, 27, 0.45);
}

dialog.modal h3 {
  font-size: 16px;
}

dialog.modal p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 登录页 ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(480px circle at 50% 0%, var(--primary-light), transparent 60%), var(--bg);
}

.login-card {
  width: min(356px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.login-card h1 {
  font-size: 20px;
  text-align: center;
  color: var(--text);
  margin-bottom: 26px;
}

/* ---------- 组织架构树 ---------- */

.tree ul {
  list-style: none;
  padding-left: 18px;
}

.tree > ul {
  padding-left: 0;
}

.tree li {
  margin: 6px 0;
}

.tree .dept-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tree .dept-name {
  font-weight: 600;
}

.tree .dept-actions a {
  font-size: 12px;
  margin-left: 8px;
}

.empty-hint {
  color: var(--text-muted);
  font-size: 14px;
  padding: 28px 0;
  text-align: center;
}

/* ---------- 统计卡片：中性底色，颜色只出现在数字本身 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.stat-card .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.stat-card .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-card .num.tone-primary { color: var(--primary); }
.stat-card .num.tone-success { color: var(--success); }
.stat-card .num.tone-warning { color: var(--warning); }
.stat-card .num.tone-danger { color: var(--danger); }

/* ---------- 快捷入口（工作台，见 dashboard/index.html） ---------- */

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.quick-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.quick-link .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.quick-link .label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.quick-link .hint {
  margin-top: -6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.quick-link .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- 团队日历（生日/入职周年，见 calendar/index.html） ---------- */

.cal-card {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}

.cal-weekdays span {
  padding: 4px 0 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 84px;
  padding: 10px 4px 8px;
  border-radius: var(--radius-md);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.cal-cell:not(.is-empty):hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.cal-cell.is-empty {
  background: transparent;
}

.cal-daynum {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cal-cell.is-today .cal-daynum {
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.cal-dots {
  display: flex;
  gap: 4px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg);
}

.cal-cell:hover .cal-dot {
  box-shadow: 0 0 0 2px var(--primary-light);
}

.cal-dot.tone-birthday { background: var(--warning); }
.cal-dot.tone-anniversary { background: var(--primary); }

.cal-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  z-index: 20;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cal-cell.has-events:hover .cal-popover,
.cal-cell.has-events:focus-visible .cal-popover {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.cal-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cal-event-list li + li {
  border-top: 1px solid var(--border);
}

.cal-event-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.cal-event-list a:hover {
  color: var(--primary-dark);
}

.cal-event-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

/* ---------- htmx 局部刷新：淡入过渡，别的地方不加动画 ---------- */

#employee-rows, #punch-status {
  transition: opacity 0.15s ease;
}

.htmx-added {
  opacity: 0;
}

/* ---------- 手机端适配：侧栏收起为可展开的顶部栏 ---------- */

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-brand {
    flex: 1;
    padding: 10px 12px;
  }

  .sidebar-toggle {
    display: flex;
    margin-right: 10px;
  }

  .sidebar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px;
  }

  .sidebar.is-open .sidebar-nav {
    display: block;
  }

  .sidebar-user {
    border-top: none;
    padding: 8px 10px;
  }

  .sidebar-user .who {
    display: none;
  }

  .page {
    padding: 18px 14px;
  }

  .page.wide {
    padding: 18px 14px;
  }

  .toolbar input[type="text"] {
    min-width: 0;
    width: 100%;
  }

  .cal-cell {
    min-height: 52px;
    padding: 6px 2px;
    gap: 3px;
  }

  .cal-daynum {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .cal-popover {
    display: none;
  }

  .cal-weekdays span {
    font-size: 10px;
    padding: 7px 0;
  }
}

/* ---------- 员工端：底部tab栏 ---------- */
/* 跟侧栏(.sidebar)是平行的两套壳，employee角色走这套，不复用.sidebar的任何样式——
   底部固定tab栏是完全不同的交互模式，硬凑复用反而绕弯路。见 base.html 里
   current.role.value == "employee" 的分叉。 */

.emp-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.emp-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}

.emp-topbar .mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-topbar-title {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-main {
  flex: 1;
  /* 底部留出tab栏的高度，避免内容被遮住；env()是iOS刘海屏/home indicator的安全区 */
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.emp-main .page {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px;
}

.emp-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.emp-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 7px;
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: none;
}

.emp-tabbar a.active {
  color: var(--primary);
}

/* ---------- 员工端：发起审批 图标网格 ---------- */

.emp-apply-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.emp-apply-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  font-size: 12.5px;
  text-align: center;
}

.emp-apply-item .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 员工端："我的"页 ---------- */

.emp-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.emp-profile-header .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.emp-link-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 16px;
}

.emp-link-list a,
.emp-link-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
}

.emp-link-list a:not(:last-child),
.emp-link-list button:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.emp-link-list .chevron {
  color: var(--text-muted);
}

/* ---------- 打卡页：定位授权状态提示 ---------- */

.geo-status {
  margin-bottom: 14px;
  font-size: 13px;
}

.geo-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.geo-ask p {
  margin: 0;
  color: var(--text);
  flex: 1;
  min-width: 180px;
}

.geo-checking,
.geo-ok {
  color: var(--text-muted);
  padding: 10px 14px;
}

.geo-ok {
  color: var(--success);
  background: var(--success-bg);
  border-radius: var(--radius-sm);
}

.geo-denied {
  padding: 12px 14px;
  background: var(--warning-bg);
  border-radius: var(--radius-sm);
}

.geo-denied p {
  margin: 0 0 8px;
  color: var(--warning);
  font-weight: 600;
}

.geo-denied ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text);
}

.geo-denied li {
  margin-bottom: 4px;
  line-height: 1.5;
}
