:root {
  --app-bg: #f5f6f8;
  --app-card: #fff;
  --app-border: #e2e5ea;
  --app-primary: #1550e0;
  --app-primary-soft: #eaf1ff;
  --app-text: #1f2733;
  --app-text-muted: #5b6472;
  --app-green: #16a34a;
  --app-red: #dc2626;
  /* 悬停高光统一取值: 白色卡片上的悬停必须一眼可见。
     禁止再使用 #fafbfc / #fbfcfe / #f6f8fa 这类近白值——它们与未悬停状态在屏幕上没有差别。 */
  --app-hover: #e8effc;           /* 内容区悬停: 表格行、列表项、卡片标题行、可点块 */
  --app-hover-neutral: #e5e9ef;   /* 控件悬停: 自身已有蓝色选中态的控件(导航/标签页/下拉选项/日期快捷项)与表单触发器 */
  --app-select-height: 36px;
  --app-select-radius: 9px;
  --app-select-menu-radius: 12px;
  /* 动效令牌(全站统一取值): 界面反馈一律 <300ms——按压与悬停要"立刻", 入场才允许慢一点。
     新动效一律引用令牌, 不再逐处写裸时长; 调研依据见 research/动效调研.md。 */
  --motion-press: 90ms;                          /* 按压反馈: 再慢就觉得"卡" */
  --motion-fast: 140ms;                          /* 悬停/焦点/开关/小控件 */
  --motion-base: 200ms;                          /* 浮层与提示入场(下拉/日期泡泡/弹窗遮罩) */
  --motion-slow: 260ms;                          /* 大块内容入场(弹窗/面板切换): UI 反馈的上限 */
  --ease-out: cubic-bezier(.22,.61,.36,1);       /* 入场: 快起慢收 */
  --ease-inout: cubic-bezier(.4,0,.2,1);         /* 双向: 展开与收起 */
  --ease-spring: cubic-bezier(.34,1.3,.64,1);    /* 弹窗入场: 轻微回弹, 不做夸张弹跳 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }

/* 公共下拉组件 AppSelect：原生 select 保留为数据源，视觉层统一增强。 */
.app-select {
  position: relative;
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.app-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-select-trigger {
  appearance: none;
  width: 100%;
  height: var(--app-select-control-height, var(--app-select-height));
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-select-radius);
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.app-select-trigger:hover {
  border-color: #b6c2d0;
  background: var(--app-hover-neutral, #e5e9ef);
}

.app-select-trigger:focus-visible,
.app-select.is-open .app-select-trigger {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(26, 102, 255, .14);
}

.app-select-trigger:disabled {
  cursor: not-allowed;
  color: var(--app-text-muted);
  background: #f2f4f7;
  opacity: .72;
}

.app-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-select-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #667085;
  transition: transform .16s ease;
}

.app-select.is-open .app-select-chevron { transform: rotate(180deg); }

.app-select-menu {
  position: fixed;
  z-index: 12000;
  width: max-content;
  min-width: 108px;
  max-width: min(360px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 16px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-select-menu-radius);
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .16), 0 2px 8px rgba(15, 23, 42, .06);
  overscroll-behavior: contain;
  animation: app-select-open .13s ease-out;
}

@keyframes app-select-open {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.app-select-option {
  position: relative;
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.app-select-option:hover,
.app-select-option:focus-visible {
  outline: none;
  background: var(--app-hover-neutral, #e5e9ef);
}

.app-select-option[aria-selected="true"] {
  color: var(--app-primary);
  background: var(--app-primary-soft);
  font-weight: 500;
}

.app-select-option[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: var(--app-primary);
}

.app-select-option:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  background: transparent;
}

.app-select-check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  opacity: 0;
}

.app-select-option[aria-selected="true"] .app-select-check { opacity: 1; }

/* 公共可搜索单选 AppSearchSelect：输入即筛选，浮层选项复用 AppSelect 的视觉与角色。
   宽度由挂载容器决定，组件自身填满容器。 */
.app-search-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.app-search-select-field {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--app-select-control-height, var(--app-select-height));
  padding: 0 8px 0 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-select-radius);
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  cursor: text;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.app-search-select-field:hover {
  border-color: #b6c2d0;
  background: var(--app-hover-neutral, #e5e9ef);
}

.app-search-select.is-open .app-search-select-field,
.app-search-select-field:focus-within {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(26, 102, 255, .14);
}

.app-search-select-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #667085;
}

.app-search-select-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
}

.app-search-select-input::placeholder { color: #98a2b3; }

.app-search-select-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 70%;
  padding: 1px 3px 1px 8px;
  border-radius: 999px;
  background: var(--app-primary-soft);
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 500;
}

.app-search-select-tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-search-select-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  cursor: pointer;
}

.app-search-select-clear svg { width: 12px; height: 12px; }

.app-search-select-clear:hover,
.app-search-select-clear:focus-visible {
  outline: none;
  background: rgba(21, 80, 224, .14);
}

/* 浮层沿用 .app-select-menu（fixed 定位，不被卡片/滚动容器裁剪），仅补齐键盘高亮与空态。 */
.app-search-select-menu .app-select-option.is-active { background: var(--app-hover-neutral, #e5e9ef); }

.app-search-select-empty {
  padding: 10px 12px;
  color: var(--app-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

/* 公共日期组件 AppDatePicker：原生 date input 保留为数据源与表单字段。 */
.app-date {
  position: relative;
  display: inline-block;
  min-width: 142px;
  max-width: 100%;
  vertical-align: middle;
}

.app-date-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-date-trigger {
  appearance: none;
  width: 100%;
  height: var(--app-date-control-height, 36px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.app-date-trigger:hover { border-color: #b6c2d0; background: var(--app-hover-neutral, #e5e9ef); }
.app-date-trigger:focus-visible,
.app-date.is-open .app-date-trigger {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(21, 80, 224, .14);
}
.app-date-trigger:disabled { cursor: not-allowed; color: var(--app-text-muted); background: #f2f4f7; opacity: .72; }
.app-date-value { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.app-date-calendar-icon { width: 17px; height: 17px; flex: 0 0 17px; color: var(--app-primary); }
.app-date-chevron { width: 16px; height: 16px; flex: 0 0 16px; color: #667085; transition: transform .16s ease; }
.app-date.is-open .app-date-chevron { transform: rotate(180deg); }

.app-date-popover {
  position: fixed;
  z-index: 12500;
  width: min(760px, calc(100vw - 16px));
  max-height: min(620px, calc(100vh - 16px));
  overflow: auto;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .16), 0 2px 8px rgba(15, 23, 42, .06);
  font-size: 13px;
  animation: app-date-open .14s ease-out;
  overscroll-behavior: contain;
}
.app-date-popover.mode-month { width: min(430px, calc(100vw - 16px)); }
@keyframes app-date-open { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }

.app-date-main { display: grid; grid-template-columns: 124px minmax(0, 1fr); min-width: 0; }
.app-date-quick-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  border-right: 1px solid var(--app-border);
  background: #fbfcfe;
}
.app-date-quick {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.app-date-quick:hover,
.app-date-quick:focus-visible { outline: none; background: var(--app-hover-neutral, #e5e9ef); color: var(--app-primary); }
.app-date-quick.active { background: var(--app-primary-soft); color: var(--app-primary); font-weight: 600; }
.app-date-quick:nth-last-child(3) { margin-top: 5px; padding-top: 1px; border-radius: 0 0 7px 7px; }

.app-date-content { min-width: 0; padding: 16px 18px 18px; }
.app-date-fields { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 15px; }
.app-date-fields.single { justify-content: flex-start; }
.app-date-field {
  width: 222px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  color: var(--app-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.app-date-field .app-date-calendar-icon { margin-left: auto; order: 2; color: #667085; }
.app-date-field:hover { border-color: #b6c2d0; background: var(--app-hover-neutral, #e5e9ef); }
.app-date-field.active { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(21, 80, 224, .11); }
.app-date-field-sep { color: var(--app-text-muted); }

.app-date-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-date-calendar { min-width: 0; }
.app-date-calendar > header,
.app-date-month-panel > header {
  height: 34px;
  display: grid;
  grid-template-columns: 76px 1fr 76px;
  align-items: center;
  margin-bottom: 7px;
}
.app-date-calendar > header strong,
.app-date-month-panel > header strong { text-align: center; font-size: 14px; font-weight: 600; }
.app-date-nav-group { display: flex; align-items: center; }
.app-date-nav {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}
.app-date-nav:hover,
.app-date-nav:focus-visible { outline: none; background: var(--app-primary-soft); color: var(--app-primary); }
.app-date-nav svg { width: 17px; height: 17px; }
.app-date-calendar > header > .app-date-nav-group:last-child { justify-content: flex-end; }
.app-date-weekdays,
.app-date-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.app-date-weekdays span { padding: 7px 0 8px; color: var(--app-text-muted); font-size: 12px; font-weight: 500; }
.app-date-day {
  position: relative;
  height: 38px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.app-date-day > span {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.app-date-day:hover > span,
.app-date-day:focus-visible > span { background: var(--app-primary-soft); color: var(--app-primary); outline: none; }
.app-date-day:focus-visible { outline: none; }
.app-date-day.other { color: #b7bfca; }
.app-date-day.today { color: var(--app-primary); font-weight: 600; }
/* “今天”标签独占日期圆点下方的 8px 空间，避免选中态圆点压住文字。 */
.app-date-day.today > span { width: 30px; height: 30px; transform: translateY(-4px); }
.app-date-day small { position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%); color: var(--app-primary); font-size: 8px; line-height: 8px; white-space: nowrap; }
.app-date-day.in-range,
.app-date-day.range-start,
.app-date-day.range-end { background: var(--app-primary-soft); color: var(--app-primary); }
.app-date-day.range-start { border-radius: 8px 0 0 8px; }
.app-date-day.range-end { border-radius: 0 8px 8px 0; }
.app-date-day.range-start.range-end { border-radius: 8px; background: transparent; }
.app-date-day.range-start > span,
.app-date-day.range-end > span { background: var(--app-primary); color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(21, 80, 224, .24); }
.app-date-day.range-start small,
.app-date-day.range-end small { color: var(--app-primary); bottom: -2px; }
.app-date-day:disabled { color: #c8ced7; cursor: not-allowed; background: transparent; }
.app-date-day:disabled > span { background: transparent; }

.app-date-month-panel { max-width: 360px; margin: 0 auto; }
.app-date-month-panel > header { grid-template-columns: 42px 1fr 42px; }
.app-date-month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 5px; }
.app-date-month {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
  font: inherit;
}
.app-date-month:hover,
.app-date-month:focus-visible { outline: none; border-color: #c8d8ff; background: var(--app-primary-soft); color: var(--app-primary); }
.app-date-month.active { border-color: var(--app-primary); background: var(--app-primary); color: #fff; font-weight: 600; }

.app-date-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--app-border);
  background: #fff;
}
.app-date-summary { color: var(--app-text); font-weight: 500; }

@media (max-width: 760px) {
  .app-date-popover { width: min(94vw, 420px); }
  .app-date-main { display: block; }
  .app-date-quick-list { flex-direction: row; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--app-border); }
  .app-date-quick { width: auto; min-width: max-content; padding: 0 11px; text-align: center; }
  .app-date-quick:nth-last-child(3) { margin-top: 0; }
  .app-date-content { padding: 13px 12px 15px; }
  .app-date-fields { gap: 7px; }
  .app-date-field { min-width: 0; width: 1px; flex: 1; padding: 0 8px; }
  .app-date-calendar:nth-child(2) { display: none; }
  .app-date-calendars { grid-template-columns: 1fr; }
  .app-date-footer { min-height: 58px; padding: 10px 12px; }
  .app-date-summary { font-size: 12px; }
}

@media (max-width: 640px), (pointer: coarse) {
  .app-select-trigger { height: max(var(--app-select-control-height, var(--app-select-height)), 42px); }
  .app-select-option { min-height: 44px; font-size: 16px; }
  .app-search-select-field { height: max(var(--app-select-control-height, var(--app-select-height)), 42px); }
  .app-search-select-input { font-size: 16px; }
  .app-date-trigger { height: max(var(--app-date-control-height, 36px), 42px); font-size: 15px; }
  .app-date-day { height: 42px; font-size: 15px; }
  .app-date-day > span { width: 36px; height: 36px; }
  .app-date-day.today > span { width: 34px; height: 34px; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .app-select-menu { animation: none; }
  .app-select-chevron { transition: none; }
  .app-search-select-field { transition: none; }
  .app-date-popover { animation: none; }
  .app-date-chevron { transition: none; }
}

/* 公共反馈提示、确认弹窗、实体选择器与数据表辅助组件。 */
body.app-dialog-open { overflow: hidden; }
.app-dialog-mask {
  position: fixed;
  z-index: 20000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.app-dialog {
  width: min(100%, 420px);
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: var(--app-card);
  color: var(--app-text);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .25);
  animation: app-dialog-open .18s ease-out;
}
@keyframes app-dialog-open { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.app-dialog:focus { outline: none; }
.app-dialog-title { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.app-dialog-message { color: var(--app-text-muted); font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.app-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.app-dialog-button {
  min-width: 88px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #f4f6f8;
  color: var(--app-text);
  font-weight: 600;
  cursor: pointer;
}
.app-dialog-button.primary { border-color: var(--app-primary); background: var(--app-primary); color: #fff; }
.app-dialog-button.danger { border-color: var(--app-red); background: var(--app-red); color: #fff; }
.app-dialog-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21, 80, 224, .18); }

.app-toast {
  position: fixed;
  z-index: 21000;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  max-width: min(92vw, 560px);
  padding: 11px 16px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-radius: 10px;
  background: #1f2733;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease;
}
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.app-toast.ok { background: #126b3a; }
.app-toast.err { background: #a51d2d; }
.app-toast.warn { background: #9a4b08; }

/* ===== 图标: 一律用 SVG 绘制(AppIcon, common.js) =====
   尺寸取 1em、颜色继承 currentColor, 与它替换掉的 emoji 占位一致, 无需逐处调字号。 */
.app-icon { width: 1em; height: 1em; flex: 0 0 auto; display: inline-block; vertical-align: -.125em; fill: none; }
.app-toast-icon { width: 15px; height: 15px; margin-top: 2px; }

.app-entity-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 2px;
}
.app-entity-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  color: var(--app-text);
  font-size: 13px;
  cursor: pointer;
}
.app-entity-option.is-selected { border-color: #c7d7ff; background: var(--app-primary-soft); }
.app-entity-option input { width: 15px; height: 15px; margin: 0; flex: 0 0 auto; }
.app-entity-option:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.app-entity-empty { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--app-text-muted); }
.app-table-sort { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: inherit; font-weight: inherit; cursor: pointer; }
.app-table-sort-icon { color: var(--app-text-muted); font-size: 12px; }
.app-table-sort-icon.active { color: var(--app-primary); }

@media (max-width: 640px) {
  .app-dialog-mask { align-items: flex-end; padding: 12px; }
  .app-dialog { width: 100%; border-radius: 18px; }
  .app-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-entity-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .app-dialog { animation: none; }
  .app-toast { transition: none; }
}

/* ===== 主播登录: 单页表单 + 卡片内 Tab 切换(验证码登录 / 密码登录) ===== */
.login-tabs { display: flex; gap: 22px; margin: 14px 0 2px; border-bottom: 1px solid rgba(0,0,0,.07); }
.login-tab { background: none; border: none; padding: 8px 2px 10px; font-size: 15px; font-weight: 600;
  color: var(--text-3, var(--txt3, #8b93a1)); cursor: pointer; position: relative; }
.login-tab.active { color: var(--text, var(--txt, #1f2733)); }
.login-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--primary, #1a66ff); }
.login-submit { margin-top: 18px; }
.fld-group { display: flex; align-items: stretch; border: 1px solid #dfe3ea; border-radius: 12px;
  background: #fff; overflow: hidden; }
.fld-group:focus-within { border-color: var(--primary, #1a66ff); box-shadow: 0 0 0 3px rgba(26,102,255,.12); }
.fld-group > input { flex: 1 1 auto; min-width: 0; border: none; box-shadow: none; background: transparent; border-radius: 0; }
.fld-group > input:focus { border: none; box-shadow: none; outline: none; }
.fld-prefix { display: flex; align-items: center; padding: 0 0 0 14px; font-size: 16px; font-weight: 600;
  color: var(--text-2, var(--txt2, #5b6472)); }
.fld-action { flex: 0 0 auto; border: none; background: none; padding: 0 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--primary, #1a66ff); white-space: nowrap; }
.fld-action:disabled { color: var(--text-3, var(--txt3, #8b93a1)); cursor: default; }
.fld-hint { margin-top: 6px; font-size: 12px; color: var(--text-3, var(--txt3, #8b93a1)); }

/* ===== 公共分页条 (AppPager, common.js) =====
   共 N 条 / 第 X-Y 页 + 上一页/下一页 + 可直接点击的数字页码 + 每页条数。
   变量带 fallback: 组件按公共样式放在 common.css, 在未加载 admin.css 的页面也不会失去可读性。 */
.app-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; }
.app-pager-info { font-size: 12.5px; color: var(--text-3, var(--app-text-muted)); white-space: nowrap; }
.app-pager-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.app-pager-btns .btn[disabled] { opacity: .42; cursor: not-allowed; }
.app-pager .app-page-size { min-width: 112px; height: 32px; border: 1px solid var(--border, var(--app-border));
  border-radius: 8px; padding: 0 8px; font-size: 13px; color: var(--text, var(--app-text)); background: #fff; }
.app-pager-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.app-pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.app-pager-pages .app-page-btn { min-width: 34px; height: 32px; padding: 0 6px;
  justify-content: center; font-variant-numeric: tabular-nums; }
.app-pager-pages .app-page-btn[aria-current="page"] { cursor: default; }
.app-pager-gap { padding: 0 2px; color: var(--text-3, var(--app-text-muted)); font-size: 13px; }

/* ===== 减少动态效果偏好: 全站动效一键关闭 =====
   动效只是锦上添花: 关掉之后功能、信息层级和状态区分必须完全不变(颜色、描边、文案、位置都不依赖动画)。
   放在 common.css 末尾、用 !important 覆盖全站(含各页面样式表), 免得新增动画时漏掉这一条;
   时长压到 .01ms 而不是 animation:none——依赖 animationend 摘类的脚本逻辑仍然照常收尾。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

