/* ============================================================
   KEKE 企业管理平台 · 静态 Demo
   components.css — 卡片 / 指标 / 按钮 / 表格 / 表单 / 弹窗 / 图表
   视觉语言参考 PreAdmin(Kanakku)
   ============================================================ */

/* ==================== 卡片 ==================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
}
.card--flat { box-shadow: none; }
.card--gold { border-color: var(--gold); }
.card--accent::before { display: none; }
.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 12px;
}
.card__head--plain { padding-bottom: 4px; }
.card__titles { flex: 1; min-width: 0; }
.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -.005em;
}
.card__title .ico { color: var(--muted); }
.card__desc { margin-top: 3px; font-size: var(--fs-13); color: var(--muted); }
.card__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.card__body { padding: 0 20px 20px; flex: 1; min-width: 0; }
.card__body--flush { padding: 0; }
.card__body--tight { padding: 14px 16px 16px; }
.card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--light);
}
.card__foot-note { font-size: var(--fs-12); color: var(--muted); margin-right: auto; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--heading);
  font-size: var(--fs-13);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--sh-1);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease),
    background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { background: var(--light); border-color: #C6CACE; box-shadow: var(--sh-3); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ico { flex: none; }

.btn--primary {
  border-color: transparent;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 10px -4px rgba(var(--primary-rgb), .55);
}
.btn--primary:hover { background: linear-gradient(135deg, #8E63FD 0%, #5C1BC0 100%); border-color: transparent; box-shadow: 0 6px 14px -4px rgba(var(--primary-rgb), .6); }
.btn--dark { border-color: transparent; background: var(--heading); color: #fff; box-shadow: var(--sh-1); }
.btn--dark:hover { background: var(--secondary); border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--body); }
.btn--ghost:hover { background: var(--light); color: var(--heading); border-color: transparent; box-shadow: none; }
.btn--danger { border-color: rgba(239, 30, 30, .3); background: var(--surface); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { height: 32px; padding: 0 11px; font-size: var(--fs-12); }
.btn--lg { height: 42px; padding: 0 20px; font-size: var(--fs-14); }
.btn--block { width: 100%; }

/* 分段控件 */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--light);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.segmented button {
  height: 26px;
  padding: 0 12px;
  border-radius: var(--r-xs);
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--body);
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.segmented button:hover { color: var(--heading); }
.segmented button.is-active { background: var(--surface); color: var(--heading); font-weight: 600; box-shadow: var(--sh-1); }

/* ==================== 表单控件 ==================== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--body);
  display: flex;
  align-items: center;
  gap: 5px;
}
.field__req { color: var(--danger); font-weight: 700; }
.field__hint { font-size: var(--fs-11); color: var(--faint); }

.input, .select, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--light);
  font-size: var(--fs-13);
  color: var(--heading);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 84px; line-height: var(--lh-normal); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #C6CACE; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}
.input[readonly], .input:disabled, .select:disabled {
  background: var(--light-2);
  color: var(--muted);
  cursor: not-allowed;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2390979F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.input-group { display: flex; align-items: center; gap: 8px; }
.input-group .input { flex: 1; }
.input-affix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--light);
  color: var(--muted);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.input-affix .ico { color: var(--faint); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--body); cursor: pointer; user-select: none; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--surface);
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.radio-card:hover { border-color: var(--primary); }
.radio-card.is-checked { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.radio-card__dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid #C6CACE;
  margin-top: 2px; flex: none;
  display: grid; place-items: center;
  transition: border-color .18s var(--ease);
}
.radio-card.is-checked .radio-card__dot { border-color: var(--primary); }
.radio-card.is-checked .radio-card__dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.radio-card__title { font-size: var(--fs-13); font-weight: 500; color: var(--heading); }
.radio-card__desc { font-size: var(--fs-11); color: var(--muted); margin-top: 2px; }

.switch {
  position: relative; width: 38px; height: 21px; border-radius: 99px;
  background: #C6CACE; transition: background .18s var(--ease); flex: none; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .18s var(--ease);
}
.switch.is-on { background: var(--primary); }
.switch.is-on::after { transform: translateX(17px); }

/* 上传占位 */
.upload {
  border: 1.5px dashed #C6CACE;
  border-radius: var(--r-lg);
  padding: 26px;
  text-align: center;
  background: var(--light);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.upload:hover { border-color: var(--primary); background: var(--primary-soft); }
.upload__icon {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.upload__title { font-size: var(--fs-13); font-weight: 600; color: var(--heading); }
.upload__desc { font-size: var(--fs-12); color: var(--muted); margin-top: 4px; }

/* ==================== 表格 ==================== */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.table-toolbar__spacer { flex: 1; }

.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--light);
  border-bottom: 1px solid var(--border-soft);
}
.filters .field { min-width: 168px; }
.filters .field--grow { flex: 1; min-width: 220px; }
.filters__actions { display: flex; gap: 8px; margin-left: auto; }

.table-scroll { width: 100%; overflow-x: auto; }
.dtable { width: 100%; font-size: var(--fs-13); }
.dtable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--light);
  border-bottom: 1px solid var(--border);
  color: var(--heading);
  font-size: var(--fs-13);
  font-weight: 600;
  text-align: left;
  padding: 11px 16px;
  white-space: nowrap;
}
.dtable thead th.is-sortable { cursor: pointer; user-select: none; }
.dtable thead th.is-sortable:hover { color: var(--primary); }
.dtable thead th .sort-ico { display: inline-block; margin-left: 5px; opacity: .35; vertical-align: -2px; }
.dtable thead th.is-sorted .sort-ico { opacity: 1; color: var(--primary); }
.dtable tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--body);
  vertical-align: middle;
}
.dtable tbody tr { transition: background .16s var(--ease); }
.dtable tbody tr:hover { background: var(--light-2); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable .cell--num { font-variant-numeric: tabular-nums; }
.dtable .cell--strong { font-weight: 600; color: var(--heading); }
.dtable .cell--muted { color: var(--muted); }
.dtable__actions { display: flex; gap: 4px; justify-content: flex-end; }
.dtable th.col-actions, .dtable td.col-actions { text-align: right; width: 1%; white-space: nowrap; }
.dtable__link { color: var(--primary); font-weight: 500; }
.dtable__link:hover { text-decoration: underline; }

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-12);
  color: var(--muted);
}
.pager__spacer { flex: 1; }
.pager__pages { display: flex; gap: 4px; }
.pager__page {
  min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  font-size: var(--fs-12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s var(--ease);
}
.pager__page:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pager__page.is-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.pager__page.is-disabled { opacity: .45; pointer-events: none; }

/* ==================== 空状态 ==================== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 40px 24px;
  text-align: center;
}
.empty--sm { padding: 26px 20px; }
.empty__art { width: 132px; height: 92px; margin-bottom: 6px; opacity: .95; }
.empty__title { font-size: var(--fs-14); font-weight: 600; color: var(--heading); }
.empty__desc { font-size: var(--fs-13); color: var(--muted); max-width: 380px; line-height: var(--lh-loose); }
.empty__action { margin-top: 14px; }
.empty__note {
  margin-top: 12px;
  font-size: var(--fs-11);
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--light);
  border: 1px solid var(--border-soft);
}

/* ==================== 页签 ==================== */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
  position: relative;
  padding: 11px 16px;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.tabs__item:hover { color: var(--heading); }
.tabs__item.is-active { color: var(--primary); font-weight: 600; }
.tabs__item.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.tabs__count { display: inline-block; margin-left: 6px; font-size: var(--fs-11); color: var(--faint); font-variant-numeric: tabular-nums; }

/* ==================== 弹窗 / 抽屉 ==================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 19, 33, .48);
  z-index: 200;
  display: flex;
}
.modal {
  margin: auto;
  width: min(var(--modal-w, 640px), calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-pop);
  overflow: hidden;
  animation: modalIn .24s var(--ease) both;
}
@keyframes modalIn {
  from { transform: translateY(12px) scale(.98); }
  to { transform: none; }
}
.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.modal__head-icon {
  width: 34px; height: 34px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.modal__titles { flex: 1; min-width: 0; }
.modal__title { font-size: var(--fs-16); font-weight: 600; color: var(--heading); }
.modal__desc { font-size: var(--fs-12); color: var(--muted); margin-top: 2px; }
.modal__body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--light);
}
.modal__foot-note { flex: 1; font-size: var(--fs-11); color: var(--faint); }

.drawer-overlay { justify-content: flex-end; }
.drawer {
  width: min(480px, 100vw);
  height: 100%;
  background: var(--surface);
  box-shadow: -16px 0 40px -20px rgba(5, 19, 33, .35);
  display: flex;
  flex-direction: column;
  animation: drawerIn .26s var(--ease) both;
}
@keyframes drawerIn { from { transform: translateX(14px); } to { transform: none; } }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.drawer__body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer__foot { display: flex; gap: 9px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border-soft); background: var(--light); }

/* ==================== 提示 ==================== */
.toast-wrap {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--heading);
  color: #EDF2F8;
  font-size: var(--fs-13);
  box-shadow: var(--sh-pop);
  border: 1px solid rgba(255, 255, 255, .1);
  animation: toastIn .24s var(--ease) both;
  max-width: 460px;
}
.toast.is-out { animation: toastOut .24s var(--ease) both; }
@keyframes toastIn { from { transform: translateY(-12px) scale(.97); } to { transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
.toast__icon {
  width: 22px; height: 22px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center;
  background: rgba(var(--primary-rgb), .28); color: var(--primary-200);
}
.toast__tag {
  font-size: var(--fs-11); letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary-200); font-weight: 700;
  padding-left: 9px; margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, .16);
}

/* ==================== 指标卡 ==================== */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi {
  position: relative;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-3); border-color: #C6CACE; }
.kpi__top { display: flex; align-items: center; gap: 10px; }
.kpi__icon {
  width: 46px; height: 46px; border-radius: var(--r-lg); flex: none;
  display: grid; place-items: center;
  background: var(--accent, var(--primary));
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 6px 14px -6px var(--accent, var(--primary));
}
.kpi__icon .ico { width: 20px; height: 20px; }
.kpi__label { font-size: var(--fs-13); color: var(--body); font-weight: 400; }
.kpi__value {
  margin-top: 6px;
  font-size: var(--fs-28);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  color: var(--heading);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpi__value small { font-size: var(--fs-13); font-weight: 400; color: var(--muted); letter-spacing: 0; }
.kpi__value.is-empty { color: var(--faint); font-size: var(--fs-20); font-weight: 500; }
.kpi__foot {
  margin-top: 10px;
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-12); color: var(--muted);
}
.kpi__spark { position: absolute; right: 0; bottom: 0; left: 0; height: 34px; opacity: .38; }
.kpi__skel {
  margin-top: 10px; height: 5px; border-radius: 99px;
  background: linear-gradient(90deg, var(--light), #FDFDFE, var(--light));
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==================== 快捷入口 ==================== */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.card--fill .card__body { display: flex; flex-direction: column; }
.card--fill .quick-grid { flex: 1; grid-auto-rows: minmax(1fr, auto); }
.card--fill .quick { height: 100%; justify-content: center; gap: 12px; padding: 16px 8px; }
.card--fill .quick__icon { width: 44px; height: 44px; border-radius: var(--r-lg); }
.card--fill .quick__icon .ico { width: 20px; height: 20px; }

.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--light);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--heading);
  text-align: center;
  transition: all .2s var(--ease);
}
.quick:hover { border-color: var(--primary); background: var(--surface); box-shadow: var(--sh-3); transform: translateY(-2px); }
.quick__icon {
  width: 38px; height: 38px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--accent-tint, var(--primary-soft));
  color: var(--accent, var(--primary));
  transition: transform .2s var(--ease);
}
.quick:hover .quick__icon { transform: scale(1.08) rotate(-3deg); }

/* ==================== 图表 ==================== */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: var(--fs-12); color: var(--body); }
.chart-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend__dot { width: 9px; height: 9px; border-radius: 3px; }
.chart-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.chart-watermark span {
  font-size: var(--fs-31);
  font-weight: 700;
  letter-spacing: .3em;
  color: rgba(5, 19, 33, .04);
  transform: rotate(-12deg);
  user-select: none;
}
.chart-axis { font-size: var(--fs-11); fill: var(--faint); }
.chart-grid-line { stroke: var(--border-soft); stroke-width: 1; }
.chart-bar { transition: opacity .18s var(--ease); }
.chart-bar:hover { opacity: .78; }

/* 进度条 */
.progress { height: 7px; border-radius: 99px; background: var(--light); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; background: var(--primary); }
.progress-row { display: grid; grid-template-columns: 92px 1fr 46px; align-items: center; gap: 12px; font-size: var(--fs-13); }
.progress-row + .progress-row { margin-top: 11px; }
.progress-row__label { color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-row__val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==================== 步骤条 ==================== */
.steps { display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; }
.step { flex: 1; min-width: 110px; position: relative; padding-right: 12px; }
.step__dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: var(--fs-12); font-weight: 700;
  background: var(--surface); color: var(--muted);
  border: 1.5px solid var(--border);
  margin-bottom: 9px;
  position: relative; z-index: 1;
}
.step.is-done .step__dot { background: var(--success); border-color: var(--success); color: #fff; }
.step.is-current .step__dot {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .14);
}
.step::after {
  content: "";
  position: absolute;
  top: 13px; left: 30px; right: 6px;
  height: 1.5px;
  background: var(--border);
}
.step:last-child::after { display: none; }
.step.is-done::after { background: var(--success); opacity: .4; }
.step__title { font-size: var(--fs-14); font-weight: 500; color: var(--heading); }
.step__desc { font-size: var(--fs-12); color: var(--muted); margin-top: 3px; }

/* ==================== 时间线 ==================== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 1.5px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute; left: -23px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border);
}
.tl-item.is-active::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14); }
.tl-item__title { font-size: var(--fs-14); font-weight: 500; color: var(--heading); }
.tl-item__meta { font-size: var(--fs-12); color: var(--muted); margin-top: 2px; }
.tl-item__desc { font-size: var(--fs-13); color: var(--body); margin-top: 5px; }

/* ==================== 描述列表 ==================== */
.desc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.desc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.desc-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  min-width: 0;
}
.desc-item__label { font-size: var(--fs-12); color: var(--muted); flex: none; width: 92px; }
.desc-item__value { font-size: var(--fs-13); color: var(--heading); font-weight: 500; min-width: 0; word-break: break-word; }
.desc-item--span2 { grid-column: span 2; }

/* ==================== 看板 ==================== */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kb-col { background: var(--light); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; min-height: 180px; }
.kb-col__head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.kb-col__dot { width: 7px; height: 7px; border-radius: 50%; }
.kb-col__title { font-size: var(--fs-13); font-weight: 600; color: var(--heading); }
.kb-col__count { font-size: var(--fs-11); color: var(--faint); margin-left: auto; }
.kb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 12px;
  box-shadow: var(--sh-1);
  transition: all .2s var(--ease);
}
.kb-card + .kb-card { margin-top: 9px; }
.kb-card:hover { border-color: var(--primary); box-shadow: var(--sh-3); transform: translateY(-1px); }
.kb-card__title { font-size: var(--fs-13); font-weight: 500; color: var(--heading); }
.kb-card__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: var(--fs-12); color: var(--muted); }
.kb-col__empty {
  border: 1px dashed #C6CACE;
  border-radius: var(--r-md);
  padding: 18px 10px;
  text-align: center;
  font-size: var(--fs-12);
  color: var(--faint);
}

/* ==================== 日历 ==================== */
.cal { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.cal__head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--light); border-bottom: 1px solid var(--border); }
.cal__head span { padding: 10px 0; text-align: center; font-size: var(--fs-12); font-weight: 600; color: var(--body); }
.cal__body { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__cell { min-height: 92px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 7px 8px; }
.cal__cell:nth-child(7n) { border-right: 0; }
.cal__day { font-size: var(--fs-12); color: var(--body); font-variant-numeric: tabular-nums; }
.cal__cell.is-out .cal__day { color: var(--faint); }
.cal__cell.is-today .cal__day {
  display: inline-grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 600;
}
.cal__event {
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  font-size: var(--fs-11);
  background: var(--primary-soft);
  color: var(--primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-left: 2px solid var(--primary);
}
.cal__event--muted { background: var(--light); color: var(--muted); border-left-color: var(--border); }

/* ==================== 树 ==================== */
.tree { font-size: var(--fs-13); }
.tree-node { user-select: none; }
.tree-node__row {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--body);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.tree-node__row:hover { background: var(--light); color: var(--heading); }
.tree-node__row.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.tree-node__caret { transition: transform .2s var(--ease); color: var(--faint); flex: none; }
.tree-node.is-open > .tree-node__row .tree-node__caret { transform: rotate(90deg); }
.tree-node__children { padding-left: 18px; display: none; }
.tree-node.is-open > .tree-node__children { display: block; }
.tree-node__count { margin-left: auto; font-size: var(--fs-11); color: var(--faint); }

/* ==================== 通知 / 待办 ==================== */
.notice-list { display: flex; flex-direction: column; }
.notice-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: background .16s var(--ease);
}
.notice-item:last-child { border-bottom: 0; }
.notice-item__icon {
  width: 34px; height: 34px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--accent-tint, var(--primary-soft));
  color: var(--accent, var(--primary));
}
.notice-item__body { flex: 1; min-width: 0; }
.notice-item__title { font-size: var(--fs-13); font-weight: 500; color: var(--heading); }
.notice-item__meta { font-size: var(--fs-12); color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ==================== 模块磁贴 ==================== */
.mod-tile {
  position: relative;
  display: block;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.mod-tile::before { display: none; }
.mod-tile::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--accent-tint, var(--primary-soft));
  opacity: .8;
  transition: transform .2s var(--ease);
}
.mod-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--primary); }
.mod-tile:hover::after { transform: scale(1.15); }
.mod-tile__icon {
  position: relative;
  width: 44px; height: 44px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--accent, var(--primary));
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 6px 14px -6px var(--accent, var(--primary));
}
.mod-tile__code {
  position: absolute;
  right: 18px; top: 14px;
  font-size: var(--fs-28);
  font-weight: 700; letter-spacing: -.02em;
  color: rgba(5, 19, 33, .05);
  z-index: 0;
}
.mod-tile__name { position: relative; font-size: var(--fs-16); font-weight: 600; color: var(--heading); }
.mod-tile__en { position: relative; font-size: var(--fs-11); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.mod-tile__desc { position: relative; font-size: var(--fs-13); color: var(--muted); margin-top: 10px; line-height: var(--lh-loose); min-height: 42px; }
.mod-tile__foot {
  position: relative;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-12); color: var(--primary); font-weight: 500;
}
.mod-tile__foot .ico { transition: transform .2s var(--ease); }
.mod-tile:hover .mod-tile__foot .ico { transform: translateX(3px); }

/* ==================== Hero ==================== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 28px 32px;
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 18px 40px -22px rgba(var(--primary-rgb), .7);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(760px 320px at 78% 8%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(760px 320px at 78% 8%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero__grid { position: relative; z-index: 1; display: flex; gap: 30px; align-items: center; }
.hero__main { flex: 1; min-width: 0; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-11); letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .8); font-weight: 600;
}
.hero__eyebrow::before { content: ""; width: 22px; height: 1px; background: rgba(255, 255, 255, .6); }
.hero h1 { margin-top: 12px; font-size: var(--fs-31); font-weight: 600; letter-spacing: -.02em; color: #fff; }
.hero p { margin-top: 10px; font-size: var(--fs-14); color: rgba(255, 255, 255, .78); max-width: 640px; line-height: var(--lh-loose); }
.hero__stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.hero__stat__v { font-size: var(--fs-24); font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.hero__stat__l { font-size: var(--fs-12); color: rgba(255, 255, 255, .62); margin-top: 2px; letter-spacing: .02em; }
.hero__brand { flex: none; text-align: center; padding: 0 12px; }
.hero__brand img { width: 96px; margin: 0 auto; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .28)); }
.hero__brand .wordmark {
  margin-top: 12px;
  font-size: var(--fs-20); font-weight: 700; letter-spacing: .42em;
  color: #F3E6C2; text-indent: .42em;
}
.hero__brand .tag { font-size: var(--fs-11); letter-spacing: .18em; color: rgba(255, 255, 255, .6); margin-top: 6px; }
.hero__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: var(--fs-12); color: rgba(255, 255, 255, .88);
}
.hero__badge .ico { color: var(--primary-200); }

/* ==================== 提示条 ==================== */
.notice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  border: 1px solid rgba(var(--primary-rgb), .18);
  font-size: var(--fs-13);
  color: #4B31A0;
}
.notice-strip .ico { color: var(--primary); flex: none; }
.notice-strip b { color: #351F7D; }

/* ==================== 悬浮气泡 ==================== */
.popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-pop);
  z-index: 60;
  overflow: hidden;
  animation: modalIn .2s var(--ease) both;
}
.popover__head {
  padding: 12px 16px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-13); font-weight: 600; color: var(--heading);
}
.popover__body { max-height: 320px; overflow-y: auto; }
.popover__foot { padding: 10px 16px; border-top: 1px solid var(--border-soft); text-align: center; }
.popover__link { font-size: var(--fs-13); color: var(--primary); font-weight: 500; }
.popover__link:hover { text-decoration: underline; }
.pop-host { position: relative; }

/* ==================== 表单区块 ==================== */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form__group {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-13); font-weight: 600; color: var(--heading);
  margin: 20px 0 14px; padding-bottom: 9px;
  border-bottom: 1px solid var(--border-soft);
}
.form__group:first-child { margin-top: 4px; }
.form__group .ico { color: var(--primary); }
.form__actions {
  display: flex; align-items: center; gap: 9px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.form__note { margin-left: auto; font-size: var(--fs-11); color: var(--faint); }
@media (max-width: 760px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==================== 工具类 ==================== */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.fw-1 { flex: 1; min-width: 0; }
.text-right { text-align: right; }
