:root {
  --oa-primary: #409eff;
  --oa-bg: #f0f2f5;
  --oa-card-bg: #ffffff;
  --oa-sidebar-bg: #001529;
  --oa-sidebar-hover: rgba(255, 255, 255, 0.08);
  --oa-border: #e4e7ed;
  --oa-text: #303133;
  --oa-text-secondary: #909399;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--oa-bg);
  color: var(--oa-text);
  font-size: 14px;
}

#app { min-height: 100vh; }

/* ============ 登录页 ============ */
.login-container {
  display: flex;
  min-height: 100vh;
}
.login-brand {
  flex: 1;
  background: linear-gradient(135deg, #1f4fd8 0%, #2f7bf0 50%, #409eff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0));
  pointer-events: none;
}
.login-brand::before { width: 460px; height: 460px; left: -120px; top: -140px; }
.login-brand::after { width: 380px; height: 380px; right: -110px; bottom: -120px; }
}
.brand-content { max-width: 460px; padding: 40px; }
.brand-logo { margin-bottom: 24px; }
.logo-emoji { font-size: 56px; }
.brand-title { font-size: 34px; font-weight: 700; margin-bottom: 10px; }
.brand-subtitle { font-size: 16px; opacity: 0.85; margin-bottom: 36px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 15px;
  opacity: 0.92;
}
.login-form-wrapper {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 40%);
  position: relative;
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(31, 79, 216, 0.14);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { font-size: 48px; }
.login-logo h1 { font-size: 22px; margin: 10px 0 6px; }
.login-logo p { color: var(--oa-text-secondary); font-size: 13px; }
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-btn { width: 100%; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--oa-text-secondary);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--oa-border);
}
.login-footer { text-align: center; margin-top: 28px; color: #c0c4cc; font-size: 12px; }

/* ============ 主布局 ============ */
.layout-wrapper { display: flex; min-height: 100vh; }
.layout-sidebar {
  width: 220px;
  background: linear-gradient(180deg, #16244d 0%, #1e3a8a 55%, #2563eb 130%);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  flex-shrink: 0;
}
.layout-sidebar.collapsed { width: 64px; }
.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  white-space: nowrap;
}
.sidebar-logo .logo-icon { font-size: 26px; }
.sidebar-logo .logo-text { font-size: 17px; font-weight: 700; }
.sidebar-menu { flex: 1; padding: 8px 0; }
.sidebar-menu .el-menu { border-right: none; }
.sidebar-menu .el-menu-item { border-radius: 10px; margin: 2px 8px; transition: all 0.2s ease; }
.sidebar-menu .el-menu-item:hover { background: var(--oa-sidebar-hover); }
.sidebar-menu .el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(64, 158, 255, 0.9), rgba(96, 175, 255, 0.55));
  box-shadow: 0 4px 14px rgba(64, 158, 255, 0.35);
  color: #fff !important;
  font-weight: 600;
}
.sidebar-menu .el-sub-menu__title { border-radius: 10px; margin: 2px 8px; }
.sidebar-menu .el-menu--inline .el-menu-item { margin-left: 18px; }
.sidebar-footer {
  padding: 14px 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.layout-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.layout-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--oa-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-collapse-btn { font-size: 20px; cursor: pointer; color: var(--oa-text); }
.header-right { display: flex; align-items: center; gap: 18px; }
.header-icon-btn { font-size: 18px; cursor: pointer; color: var(--oa-text-secondary); }
.header-icon-btn:hover { color: var(--oa-primary); }
.header-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-name { font-size: 14px; }

.layout-tabs {
  background: #fff;
  border-bottom: 1px solid var(--oa-border);
  display: flex;
  padding: 0 12px;
  flex-shrink: 0;
}
.layout-tab-item {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--oa-text-secondary);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.layout-tab-item.active {
  color: var(--oa-primary);
  border-bottom-color: var(--oa-primary);
  font-weight: 600;
}
.tab-close { font-size: 14px; }
.tab-close:hover { color: #f56c6c; }

.layout-content { padding: 20px; flex: 1; overflow: auto; }

/* 页面切换过渡 */
.fade-enter-active, .fade-leave-active { transition: opacity 0.22s ease, transform 0.22s ease; }
.fade-enter-from { opacity: 0; transform: translateY(8px); }
.fade-leave-to { opacity: 0; transform: translateY(-6px); }

/* 按钮：饱满 + 点击感 */
.el-button { border-radius: 8px; transition: all 0.18s ease; }
.el-button:not(.is-disabled):active { transform: scale(0.94); }
.el-button--primary {
  background: linear-gradient(135deg, #409eff, #2f7bf0);
  border: none;
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.35);
}
.el-button--primary:not(.is-disabled):hover { box-shadow: 0 6px 16px rgba(64, 158, 255, 0.45); transform: translateY(-1px); }
.el-button--primary:not(.is-disabled):active { transform: scale(0.94); }
.page-card { border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }

/* ============ 通用卡片 ============ */
.page-card {
  background: var(--oa-card-bg);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.stat-card {
  background: var(--oa-card-bg);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.blue { background: rgba(64, 158, 255, 0.12); color: #409eff; }
.stat-icon.green { background: rgba(103, 194, 58, 0.12); color: #67c23a; }
.stat-icon.orange { background: rgba(230, 162, 60, 0.12); color: #e6a23c; }
.stat-icon.red { background: rgba(245, 108, 108, 0.12); color: #f56c6c; }
.stat-info h3 { font-size: 24px; margin-bottom: 2px; }
.stat-info p { color: var(--oa-text-secondary); font-size: 13px; }

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-card {
  background: var(--oa-card-bg);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.chart-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.chart-container { height: 300px; }

@media (max-width: 900px) {
  .chart-row { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-wrapper { width: 100%; }
}

/* ============ 考勤页 ============ */
.clock-card {
  background: linear-gradient(135deg, #083f8f 0%, #0f5ec4 55%, #2a8bf2 100%);
  color: #fff;
  border-radius: 14px;
  padding: 28px 30px;
  box-shadow: 0 8px 24px rgba(8, 63, 143, 0.35);
  position: relative;
  overflow: hidden;
}
.clock-card::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), rgba(255,255,255,0));
  pointer-events: none;
}
.clock-time { font-size: 44px; font-weight: 700; letter-spacing: 2px; }
.clock-date { font-size: 14px; opacity: 0.85; margin-top: 4px; }
.clock-buttons { display: flex; gap: 16px; margin: 20px 0; }
.clock-buttons .el-button { width: 160px; }
.clock-status {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.clock-status-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.clock-status-item .label { font-size: 12px; opacity: 0.8; margin-bottom: 6px; }
.clock-status-item .value { font-size: 15px; font-weight: 600; }
.clock-status-item .value.sub { font-size: 13px; font-weight: 500; opacity: 0.9; margin-top: 4px; }
.gps-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.gps-info { display: flex; align-items: center; gap: 10px; }
.gps-distance { font-size: 13px; }
.oa-map-container { height: 320px; width: 100%; margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--oa-border); z-index: 1; }
.oa-map-preview { height: 200px; width: 100%; margin-top: 12px; border-radius: 8px; overflow: hidden; border: 1px solid var(--oa-border); z-index: 0; }
.oa-map-search-bar { display: flex; gap: 8px; align-items: center; }
.oa-map-address { margin-top: 6px; font-size: 12px; color: var(--oa-text-secondary); }
.oa-map-hint { margin-top: 4px; font-size: 12px; color: var(--oa-text-secondary); }
.filter-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .clock-status { grid-template-columns: repeat(3, 1fr); }
}

/* ============ 审批页 ============ */
.status-tag { font-weight: 500; }
.approval-form-card { max-width: 560px; }

/* ============ 会议室 ============ */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.room-card {
  border: 1px solid var(--oa-border);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafafa;
}
.room-card.disabled { opacity: 0.55; }
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.room-name { font-size: 15px; font-weight: 600; }
.room-meta { font-size: 13px; color: var(--oa-text-secondary); margin-bottom: 4px; }
.room-actions { margin-top: 10px; display: flex; gap: 8px; }

/* ============ 权限管理 ============ */
.perm-role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  margin-bottom: 2px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  color: #303133;
  transition: background-color 0.2s;
}
.perm-role-item:hover {
  background-color: #f5f7fa;
}
.perm-role-item.active {
  background-color: #409eff;
  color: #fff;
}
.perm-role-action {
  font-size: 13px;
  cursor: pointer;
  color: #909399;
}
.perm-role-action:hover {
  color: #409eff;
}
.perm-role-action.danger:hover {
  color: #f56c6c;
}

/* ============ 考勤月历 / 排班 ============ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.cal-head {
  text-align: center;
  font-size: 12px;
  color: #909399;
  padding: 6px 0;
  font-weight: 500;
}
.cal-cell {
  min-height: 72px;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  transition: box-shadow 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.cal-cell:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1;
}
.cal-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
  min-height: 72px;
}
.cal-empty:hover { box-shadow: none; }
.cal-day {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.cal-label {
  margin-top: 1px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.cal-badges {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
}
.cal-badge {
  font-size: 9px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.7);
  color: #606266;
  border: 1px solid #d5d9e0;
  white-space: nowrap;
}
.cal-abnormal .cal-label { font-size: 12px; }
.cal-time {
  color: #606266;
  font-size: 10px;
  margin-top: 3px;
  line-height: 1.3;
  background: rgba(255,255,255,0.6);
  border-radius: 3px;
  padding: 1px 3px;
  display: inline-block;
}
.cal-normal { background: linear-gradient(135deg, #f0f9eb, #e8f5e0); }
.cal-normal .cal-day { color: #3c8c2a; }
.cal-normal .cal-label { color: #67c23a; }
.cal-late, .cal-early { background: linear-gradient(135deg, #fdf6ec, #faf0e0); }
.cal-late .cal-day, .cal-early .cal-day { color: #b47c20; }
.cal-late .cal-label, .cal-early .cal-label { color: #e6a23c; }
.cal-absent, .cal-incomplete { background: linear-gradient(135deg, #fef0f0, #fce8e8); }
.cal-absent .cal-day, .cal-incomplete .cal-day { color: #c0392b; }
.cal-absent .cal-label, .cal-incomplete .cal-label { color: #f56c6c; font-weight: 600; }
.cal-abnormal { box-shadow: inset 0 0 0 1.5px #f56c6c; }
.cal-leave { background: linear-gradient(135deg, #ecf5ff, #e0eeff); }
.cal-leave .cal-day { color: #2a7ab5; }
.cal-leave .cal-label { color: #409eff; }
.cal-outwork { background: linear-gradient(135deg, #f0f9eb, #e8f5e0); }
.cal-outwork .cal-day { color: #3c8c2a; }
.cal-outwork .cal-label { color: #67c23a; }
.cal-rest { background: linear-gradient(135deg, #f4f4f5, #ededed); }
.cal-rest .cal-day { color: #888; }
.cal-rest .cal-label { color: #909399; }
.cal-pending { background: #fafafa; }
.cal-pending .cal-day { color: #666; }
.cal-pending .cal-label { color: #909399; }
.cal-future { background: #fff; }
.cal-future .cal-day { color: #bbb; }

/* ============ 首页（大厂级） ============ */
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dash-hero {
  background: linear-gradient(120deg, #0c2f8f 0%, #1750c2 55%, #1e78e8 100%);
  border-radius: 16px;
  padding: 26px 30px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(12, 47, 143, 0.28);
}
.dash-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.dash-hero-left { z-index: 1; min-width: 0; }
.dash-hero-greet { font-size: 15px; opacity: 0.9; margin-bottom: 6px; }
.dash-hero-name { font-size: 26px; font-weight: 700; letter-spacing: 0.5px; }
.dash-clock-area { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.dash-clock-time { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-clock-date { font-size: 15px; opacity: 0.92; }
.dash-hero-right { display: flex; align-items: center; gap: 16px; z-index: 1; }
.dash-weather {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 12px 20px;
  backdrop-filter: blur(6px);
}
.dash-weather-temp { font-size: 34px; font-weight: 700; line-height: 1; }
.dash-weather-unit { font-size: 15px; font-weight: 400; margin-left: 2px; }
.dash-weather-meta { display: flex; flex-direction: column; gap: 3px; }
.dash-weather-text { font-size: 15px; }
.dash-weather-sub { font-size: 12px; opacity: 0.85; }


.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}
.dash-stat-card {
  background: var(--oa-card-bg);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1px solid #eef0f4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31,45,94,0.10);
  border-color: #dfe4ee;
}
.dash-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}
.dash-stat-icon.i-blue { background: rgba(64,158,255,0.12); color: #409eff; }
.dash-stat-icon.i-orange { background: rgba(245,158,11,0.14); color: #f59e0b; }
.dash-stat-icon.i-green { background: rgba(16,163,127,0.12); color: #10a37f; }
.dash-stat-icon.i-purple { background: rgba(111,66,193,0.12); color: #6f42c1; }
.dash-stat-body { flex: 1; min-width: 0; }
.dash-stat-num { font-size: 24px; font-weight: 700; line-height: 1.15; }
.dash-stat-title { color: var(--oa-text-secondary); font-size: 13px; margin-top: 2px; }
.dash-stat-arrow { color: #c2c9d6; font-size: 18px; transition: transform 0.15s ease, color 0.15s ease; }
.dash-stat-card:hover .dash-stat-arrow { color: #7c8595; transform: translateX(2px); }

.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-section-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dash-section-title .dot { width: 4px; height: 16px; border-radius: 3px; background: linear-gradient(180deg,#2a7de1,#409eff); }
.dash-section-more { font-size: 13px; color: #2a7de1; cursor: pointer; }

.dash-quick-card { background: var(--oa-card-bg); border-radius: 14px; padding: 18px; }
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.dash-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  position: relative;
}
.dash-quick-item:hover { background: #f6f8fc; border-color: #eef1f6; transform: translateY(-2px); }
.dash-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f0f4fb;
  color: #2a7de1;
}
.dash-quick-name { font-size: 12px; color: #4d5666; }
.dash-quick-item .q-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f56c6c;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  display: none;
}
.dash-quick-item.editing .q-del { display: block; }
.dash-quick-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c2c9d6;
  cursor: pointer;
  border: 1px dashed #d7dce6;
  border-radius: 12px;
  font-size: 12px;
}
.dash-quick-add .plus { font-size: 22px; line-height: 1; }

.dash-chart-card { background: var(--oa-card-bg); border-radius: 14px; padding: 18px; }
.dash-trend-legend { display: inline-flex; gap: 16px; }
.dash-trend-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #666; }
.dash-trend-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-overtime { background: linear-gradient(135deg, #f5f0ff, #efe8ff); }
.cal-overtime .cal-day { color: #5b21b6; }
.cal-overtime .cal-label { color: #7c3aed; font-weight: 600; }
.cal-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #606266; }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid #dcdfe6; }
.cal-legend-dot.cal-normal { background: linear-gradient(135deg, #f0f9eb, #e8f5e0); border-color: #67c23a; }
.cal-legend-dot.cal-late, .cal-legend-dot.cal-early { background: linear-gradient(135deg, #fdf6ec, #faf0e0); border-color: #e6a23c; }
.cal-legend-dot.cal-absent, .cal-legend-dot.cal-incomplete { background: linear-gradient(135deg, #fef0f0, #fce8e8); border-color: #f56c6c; }
.cal-legend-dot.cal-leave { background: linear-gradient(135deg, #ecf5ff, #e0eeff); border-color: #409eff; }
.cal-legend-dot.cal-outwork { background: linear-gradient(135deg, #f0f9eb, #e8f5e0); border-color: #67c23a; }
.cal-legend-dot.cal-overtime { background: linear-gradient(135deg, #f5f0ff, #efe8ff); border-color: #7c3aed; }

/* ---- 非正常考勤强标注（不同颜色 + 文字） ---- */
.cal-late { background: linear-gradient(135deg, #fff7e6, #ffefcf); border: 1px solid #ffd591; }
.cal-late .cal-day { color: #c8700a; font-weight: 600; }
.cal-late .cal-label { color: #e6a23c; font-weight: 700; }
.cal-early { background: linear-gradient(135deg, #fef4e6, #fbe9d0); border: 1px solid #f4cd8e; }
.cal-early .cal-day { color: #9a5c06; font-weight: 600; }
.cal-early .cal-label { color: #d48806; font-weight: 700; }
.cal-late_early { background: linear-gradient(135deg, #ffe6e0, #ffd3c8); border: 1px solid #ff9c85; }
.cal-late_early .cal-day { color: #b02a1f; font-weight: 700; }
.cal-late_early .cal-label { color: #f03c28; font-weight: 700; }
.cal-absent { background: linear-gradient(135deg, #fde7e7, #f8d0d0); border: 1px solid #f0a3a3; }
.cal-absent .cal-day { color: #b0302a; font-weight: 700; }
.cal-absent .cal-label { color: #f5222d; font-weight: 700; }
.cal-incomplete { background: linear-gradient(135deg, #fdeef6, #f7d9ea); border: 1px solid #efa6ce; }
.cal-incomplete .cal-day { color: #9b2b68; font-weight: 700; }
.cal-incomplete .cal-label { color: #d3408c; font-weight: 700; }
.cal-compleave { background: linear-gradient(135deg, #eef2fc, #dde6f8); border: 1px solid #b6c7ec; }
.cal-compleave .cal-day { color: #3f5aa5; }
.cal-compleave .cal-label { color: #4570d8; font-weight: 600; }
.cal-half { background: linear-gradient(135deg, #e8f6fc, #d4edf7); border: 1px solid #aed8ec; }
.cal-half .cal-day { color: #2073a8; }
.cal-half .cal-label { color: #2f9bd8; font-weight: 600; }
.cal-normal { background: linear-gradient(135deg, #f0f9eb, #eaf6e2); border: 1px solid #cfe9c2; }
.cal-normal .cal-day { color: #3c8c2a; }
.cal-normal .cal-label { color: #55a63a; font-weight: 600; }

/* ---- 图例补全 ---- */
.cal-legend-dot.cal-late_early { background: linear-gradient(135deg, #ffe6e0, #ffd3c8); border-color: #f03c28; }
.cal-legend-dot.cal-compleave { background: linear-gradient(135deg, #eef2fc, #dde6f8); border-color: #4570d8; }
.cal-legend-dot.cal-half { background: linear-gradient(135deg, #e8f6fc, #d4edf7); border-color: #2f9bd8; }
.cal-legend-dot.cal-pending { background: #f0f2f5; border-color: #c0c4cc; }
.cal-legend-dot.cal-rest { background: #f4f4f5; border-color: #c0c4cc; }
.cal-legend-dot.cal-rest { background: linear-gradient(135deg, #f4f4f5, #ededed); border-color: #909399; }

/* ---- 审批中心模块格子 ---- */
.approval-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  padding: 4px 0 20px;
}
.module-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 98px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f7ff, #e8f1ff);
  border: 1px solid #d9e6f7;
  color: #2b6cb0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.module-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(43, 108, 176, 0.16);
  border-color: #8bb5e8;
}
.module-tile-icon { font-size: 28px; }
.module-tile-label { font-size: 14px; font-weight: 600; color: #2b5f9e; }

/* ============ 企业微信手机端审批适配 ============
   只在窄屏生效，电脑端保持原有布局和尺寸。 */
@media (max-width: 767px) {
  body { font-size: 13px; overflow-x: hidden; }
  .layout-wrapper { min-height: 100dvh; }
  .layout-sidebar { display: none; }
  .layout-header { height: 50px; padding: 0 12px; }
  .header-collapse-btn { display: none; }
  .header-left { gap: 8px; min-width: 0; }
  .header-right { gap: 10px; }
  .header-right .header-icon-btn { display: none; }
  .user-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .layout-tabs { overflow-x: auto; white-space: nowrap; padding: 0 4px; }
  .layout-tab-item { padding: 9px 12px; flex-shrink: 0; }
  .layout-content { padding: 10px; overflow-x: hidden; }

  .approval-page { gap: 10px !important; }
  .approval-page > .page-card { padding: 12px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); }
  .approval-titlebar { margin-bottom: 10px !important; }
  .approval-titlebar > span { font-size: 16px !important; }
  .approval-titlebar .el-button { min-height: 36px; padding: 8px 10px; }
  .approval-modules { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; }
  .module-tile { height: 72px; gap: 5px; border-radius: 10px; }
  .module-tile-icon { font-size: 22px; }
  .module-tile-label { font-size: 11px; }
  .approval-page .el-tabs__item { padding: 0 12px; font-size: 13px; }
  .approval-page .filter-bar { gap: 8px; margin-bottom: 10px; }
  .approval-page .filter-bar .el-select { width: calc(50% - 4px) !important; }
  .approval-page .filter-bar .el-button { width: 100%; min-height: 36px; }
  .approval-page .el-table { font-size: 12px; }
  .approval-page .el-table .cell { padding-left: 6px; padding-right: 6px; }
  .approval-page .el-table__body-wrapper { overflow-x: auto; }

  .el-dialog { width: calc(100vw - 20px) !important; margin: 5vh auto 0 !important; }
  .el-dialog__body { padding: 12px !important; }
  .el-dialog__footer { padding: 10px 12px 12px !important; }
  .approval-page .el-dialog .el-descriptions { font-size: 12px; }
  .approval-page .el-dialog .el-descriptions__label,
  .approval-page .el-dialog .el-descriptions__content { padding: 8px 6px; word-break: break-all; }
  .approval-page .el-dialog .el-button { min-height: 38px; }
  .approval-page .el-dialog .el-form-item { margin-bottom: 14px; }
  .approval-action-row { flex-wrap: wrap; gap: 8px !important; }
  .approval-action-row .el-input { width: 100% !important; flex-basis: 100%; }
  .approval-action-row .el-button { flex: 1 1 calc(50% - 8px); margin-left: 0 !important; }
}

/* 饭堂未来日历 */
.future-past { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }
.future-selected { background: #409eff; color: #fff; border-color: #409eff !important; }
.future-selected span { color: #fff; }
.future-none { background: #f56c6c; color: #fff; border-color: #f56c6c !important; }
.future-none span { color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c0c4cc; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
