/* 自动生成：UNAI API 模板所需的最小工具类集（勿手改） */
/* ============================================================
   [v2 追加] 响应式工具栏 / 行内操作 / 微交互动画
   —— 以下为新类名，不覆盖任何既有工具类，可安全全局引入
   ============================================================ */
:root {
  --unai-ease: cubic-bezier(.2,.8,.3,1);
  --unai-dur: .2s;
}
/* 1) 按钮统一：横向弹性排列 + 点击/悬停微交互 */
button, .btn, .btn-primary, .btn-outline, .btn-ghost {
  transition: background-color var(--unai-dur) var(--unai-ease),
              color var(--unai-dur) var(--unai-ease),
              border-color var(--unai-dur) var(--unai-ease),
              box-shadow var(--unai-dur) var(--unai-ease),
              transform .12s var(--unai-ease),
              opacity var(--unai-dur) var(--unai-ease);
}
button:not(:disabled):hover { filter: brightness(.96); }
button:not(:disabled):active { transform: scale(.955); }
button:disabled { opacity: .6; cursor: not-allowed; }

/* 2) 工具栏：始终横向排列（空间不足才换行），绝不逐项竖排 */
.unai-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.unai-toolbar .spacer { flex: 1 1 auto; }

/* 3) 固定工具栏：列表滚动时按钮钉住不动（相对页面滚动钉顶） */
.unai-toolbar-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  /* 钉顶时补一条下边界，避免与内容"糊"在一起 */
  box-shadow: 0 1px 0 rgba(229,230,235,.9);
}

/* 4) 列表项操作区：横向排列，移动端吸附在表格最右侧（列表横向滚动按钮不动） */
.unai-row-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

/* 4b) 表格独立滚动容器：横向滚动只发生在表格内部，工具栏/标题栏保持不动 */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > table { margin: 0; }

/* 4c) 桌面端同样需要放开 .table-wrap 的裁切：
    overflow:hidden 会成为 sticky 的包含块（scrollport），
    使内部工具栏无法钉顶、吸附列失去参考系。
    模板内联 <style> 在 unai.css 之后，故用 body 前缀提升特异性。
    圆角改由内部容器承担，视觉不变。 */
body .table-wrap { overflow: visible; }
body .table-wrap > .unai-toolbar-sticky     { border-radius: 11px 11px 0 0; }
body .table-wrap > .table-scroll:first-child { border-radius: 11px 11px 0 0; }
body .table-wrap > .table-scroll:last-child  { border-radius: 0 0 11px 11px; }
body .table-wrap > .table-scroll:first-child:last-child { border-radius: 11px; }

@media (max-width: 767px) {
  /* 移动端才启用操作列吸附（桌面端表格通常不溢出，无需吸附） */
  .unai-row-actions-cell {
    position: sticky;
    right: 0;
    z-index: 5;
    background: #fff;
    box-shadow: -10px 0 10px -10px rgba(17, 24, 39, .22);
  }
  thead .unai-row-actions-cell { background: #F9FAFB; z-index: 6; }
  /* sticky 单元格需要独立边框模型，否则部分浏览器不生效 */
  .table-scroll table { border-collapse: separate; border-spacing: 0; }
  .table-scroll td { border-bottom: 1px solid #F3F4F6; }
  .table-scroll th { border-bottom: 1px solid #E5E6EB; }
  .table-scroll tr:last-child td { border-bottom: none; }
}



/* ============================================================
   6) 行内操作紧凑化：把横向空间还给列表内容
   —— 操作列按内容收缩（width:1%），按钮统一紧凑尺寸；
   —— 图标按钮（.unai-act-ico）仅 28px 宽，多按钮场景不再挤压数据列。
   ============================================================ */
.unai-row-actions-cell { width: 1%; white-space: nowrap; }
.unai-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border: none;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.unai-act-ico { padding: 0; width: 28px; min-width: 28px; }
.unai-act svg { width: 14px; height: 14px; display: block; }
@media (max-width: 767px) {
  /* 触屏保证可点面积 */
  .unai-act { height: 30px; min-width: 32px; font-size: 12px; }
  .unai-act-ico { width: 32px; min-width: 32px; }
  .unai-act svg { width: 15px; height: 15px; }
}

/* 5) 防截断：任何"限制尺寸"的容器都必须可滚动或自适应，绝不静默裁切内容。
    —— 通用兜底：内容超限时允许滚动，而不是被 overflow:hidden 截断。
    —— 仅作用于带类名的容器，避免影响既有视觉。 */
.unai-scrollable {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.unai-scroll-x { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
.unai-scroll-y { overflow-y: auto; overflow-x: visible; -webkit-overflow-scrolling: touch; }

/* 自适应长文本：不再用 overflow:hidden 硬截断，而是换行显示完整内容 */
.unai-wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: visible;
}
/* 表格单元格内的长内容（密钥、错误信息、URL 等）默认换行，避免被裁掉 */
.unai-cell-wrap { max-width: 320px; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }

/* 弹层/卡片容器统一放开裁切：圆角由内层承担，内容超高时自身可滚动 */
.unai-modal-scroll {
  overflow: auto;
  max-height: min(86vh, 900px);
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  /* 移动端：任何横向溢出容器都能左右滑动查看完整内容 */
  .unai-scroll-x, .table-scroll { overflow-x: auto; }
  .unai-modal-scroll { max-height: 88vh; }
}

/* 5) 微交互动画库 */
@keyframes unai-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes unai-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes unai-pop-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes unai-row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes unai-spin { to { transform: rotate(360deg); } }

.unai-fade { animation: unai-fade-in .22s var(--unai-ease) both; }
.unai-pop { animation: unai-pop-in .24s var(--unai-ease) both; }
.unai-slide { animation: unai-slide-up .26s var(--unai-ease) both; }

/* 退场动画（弹层关闭时使用，避免"瞬间消失"的生硬感） */
@keyframes unai-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes unai-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.97); } }
.unai-fade-out { animation: unai-fade-out .17s var(--unai-ease) both; }
.unai-pop-out  { animation: unai-pop-out .17s var(--unai-ease) both; }

/* 卡片入场的"仅首屏"闸门：父级加 .unai-anim-once 时子卡片才入场，
   用于避免轮询重绘导致动画反复播放 */
.unai-anim-once > * { animation: unai-slide-up .3s var(--unai-ease) both; }
.unai-anim-once > *:nth-child(1)  { animation-delay: .02s; }
.unai-anim-once > *:nth-child(2)  { animation-delay: .05s; }
.unai-anim-once > *:nth-child(3)  { animation-delay: .08s; }
.unai-anim-once > *:nth-child(4)  { animation-delay: .11s; }
.unai-anim-once > *:nth-child(5)  { animation-delay: .14s; }
.unai-anim-once > *:nth-child(6)  { animation-delay: .17s; }
.unai-anim-once > *:nth-child(n+7) { animation-delay: .2s; }

/* 表格行渐入（错峰，避免整齐划一的生硬感） */
.unai-stagger tbody tr { animation: unai-row-in .28s var(--unai-ease) both; }
.unai-stagger tbody tr:nth-child(1)  { animation-delay: .01s; }
.unai-stagger tbody tr:nth-child(2)  { animation-delay: .03s; }
.unai-stagger tbody tr:nth-child(3)  { animation-delay: .05s; }
.unai-stagger tbody tr:nth-child(4)  { animation-delay: .07s; }
.unai-stagger tbody tr:nth-child(5)  { animation-delay: .09s; }
.unai-stagger tbody tr:nth-child(6)  { animation-delay: .11s; }
.unai-stagger tbody tr:nth-child(7)  { animation-delay: .13s; }
.unai-stagger tbody tr:nth-child(8)  { animation-delay: .15s; }
.unai-stagger tbody tr:nth-child(n+9) { animation-delay: .16s; }

/* 行悬停高亮 + 平滑过渡 */
.unai-hover-rows tbody tr { transition: background-color .16s var(--unai-ease); }
.unai-hover-rows tbody tr:hover { background-color: #F8FAFF; }
.unai-hover-rows tbody tr:hover .unai-row-actions-cell { background-color: #F8FAFF; }

/* 加载态按钮 */
.unai-btn-loading { pointer-events: none; opacity: .75; position: relative; }
.unai-btn-loading::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 6px;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
  vertical-align: -2px; animation: unai-spin .7s linear infinite;
}

/* 触屏无 hover 时避免"卡住"的 hover 态 */
@media (hover: none) {
  button:hover { filter: none; }
}

/* ============================================================
   移动端专项：工具栏按钮一律横排（绝不竖排堆叠）
   - 标题独占一行
   - 按钮组紧随其后横向排列（flex-wrap 保证不溢出、不竖排）
   - 工具栏钉顶（unai-toolbar-sticky），列表/表格滚动时按钮位置不动
   ============================================================ */
@media (max-width: 767px) {
  .unai-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 8px;
  }
  /* 标题（首个 span / 首个 div 文本块）独占一整行 */
  .unai-toolbar > span:first-child,
  .unai-toolbar > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  /* 按钮与按钮组保持自身宽度、横向排列 */
  .unai-toolbar > button,
  .unai-toolbar > a,
  .unai-toolbar > .unai-toolbar {
    flex: 0 0 auto;
  }
  /* 按钮文字不换行，保证"横置"观感 */
  .unai-toolbar button { white-space: nowrap; }

  /* 钉顶工具栏在移动端加一点内边距，避免贴边 */
  .unai-toolbar-sticky { top: 0; }
}

/* 无障碍：尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

*,*::before,*::after{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{font-family:system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;color:#111827;}
a{text-decoration:none;color:inherit;}
button{font-family:inherit;}
.table-wrap{background:#fff;border:1px solid #E5E6EB;border-radius:12px;overflow:hidden;}
table{width:100%;border-collapse:collapse;font-size:14px;}
th{text-align:left;padding:12px 16px;background:#F9FAFB;color:#6B7280;font-weight:500;border-bottom:1px solid #E5E6EB;white-space:nowrap;}
td{padding:12px 16px;border-bottom:1px solid #F3F4F6;color:#374151;}
tr:last-child td{border-bottom:none;}
.bg-\[\#0052D9\] { background-color:#0052D9; }
.bg-\[\#E8F0FE\] { background-color:#E8F0FE; }
.bg-\[\#F6F7F9\] { background-color:#F6F7F9; }
.bg-brand-100 { background-color:#E8F0FE; }
.bg-white { background-color:#fff; }
.border { border-width:1px;border-style:solid; }
.border-\[\#C5D8FF\] { border-color:#C5D8FF; }
.border-\[\#D6E4FF\] { border-color:#D6E4FF; }
.border-\[\#E5E6EB\] { border-color:#E5E6EB; }
.border-\[\#F0F1F3\] { border-color:#F0F1F3; }
.border-b { border-bottom-width:1px;border-bottom-style:solid; }
.border-border-primary { border-color:#E5E6EB; }
.border-r { border-right-width:1px;border-right-style:solid; }
.border-t { border-top-width:1px;border-top-style:solid; }
.fixed { position:fixed; }
.flex { display:flex; }
.flex-1 { flex:1 1 0%; }
.flex-col { flex-direction:column; }
.flex-shrink-0 { flex-shrink:0; }
.flex-wrap { flex-wrap:wrap; }
.font-bold { font-weight:700; }
.font-medium { font-weight:500; }
.font-normal { font-weight:400; }
.font-sans { font-family:system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; }
.font-semibold { font-weight:600; }
.gap-1 { gap:4px; }
.gap-2 { gap:8px; }
.gap-3 { gap:12px; }
.gap-4 { gap:16px; }
.gap-6 { gap:24px; }
.gap-8 { gap:32px; }
.gap-x-12 { gap-left:48px;gap-right:48px; }
.gap-y-4 { gap-top:16px;gap-bottom:16px; }
.grid { display:grid; }
.grid-cols-1 { grid-template-columns:repeat(1,minmax(0,1fr)); }
.h-8 { height:32px; }
.h-\[60px\] { height:60px; }
.h-full { height:100%; }
.hidden { display:none; }
.inline-block { display:inline-block; }
.inline-flex { display:inline-flex; }
.items-baseline { align-items:baseline; }
.items-center { align-items:center; }
.items-start { align-items:flex-start; }
.justify-between { justify-content:space-between; }
.justify-center { justify-content:center; }
.leading-relaxed { line-height:1.625; }
.leading-tight { line-height:1.25; }
.max-w-\[1200px\] { max-width:1200px; }
.max-w-\[400px\] { max-width:400px; }
.max-w-\[520px\] { max-width:520px; }
.max-w-\[640px\] { max-width:640px; }
.max-w-\[720px\] { max-width:720px; }
.mb-12 { margin-bottom:48px; }
.mb-2 { margin-bottom:8px; }
.mb-3 { margin-bottom:12px; }
.mb-4 { margin-bottom:16px; }
.mb-6 { margin-bottom:24px; }
.mb-8 { margin-bottom:32px; }
.min-h-screen { min-height:100vh; }
.min-w-0 { min-width:0; }
.mr-2 { margin-right:8px; }
.mr-3 { margin-right:12px; }
.mt-1 { margin-top:4px; }
.mt-1\.5 { margin-top:6px; }
.mt-12 { margin-top:48px; }
.mt-2 { margin-top:8px; }
.mt-3 { margin-top:12px; }
.mt-4 { margin-top:16px; }
.mt-5 { margin-top:20px; }
.mt-6 { margin-top:24px; }
.mt-8 { margin-top:32px; }
.mx-auto { margin-left:auto;margin-right:auto; }
.p-3 { padding:12px; }
.p-4 { padding:16px; }
.pb-\[80px\] { padding-bottom:80px; }
.pt-5 { padding-top:20px; }
.pt-\[140px\] { padding-top:140px; }
.px-2 { padding-left:8px;padding-right:8px; }
.px-4 { padding-left:16px;padding-right:16px; }
.px-5 { padding-left:20px;padding-right:20px; }
.px-8 { padding-left:32px;padding-right:32px; }
.py-1\.5 { padding-top:6px;padding-bottom:6px; }
.py-10 { padding-top:40px;padding-bottom:40px; }
.py-2 { padding-top:8px;padding-bottom:8px; }
.py-3 { padding-top:12px;padding-bottom:12px; }
.py-3\.5 { padding-top:3.5px;padding-bottom:3.5px; }
.py-8 { padding-top:32px;padding-bottom:32px; }
.py-\[72px\] { padding-top:72px;padding-bottom:72px; }
.rounded-full { border-radius:9999px; }
.rounded-lg { border-radius:8px; }
.shadow-lg { box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1); }
.space-y-3 > * + * { margin-top:12px; }
.space-y-6 > * + * { margin-top:24px; }
.space-y-8 > * + * { margin-top:32px; }
.text-\[\#0052D9\] { font-size:#0052D9; }
.text-\[12px\] { font-size:12px; }
.text-\[13px\] { font-size:13px; }
.text-\[14px\] { font-size:14px; }
.text-\[15px\] { font-size:15px; }
.text-\[16px\] { font-size:16px; }
.text-\[17px\] { font-size:17px; }
.text-\[22px\] { font-size:22px; }
.text-\[24px\] { font-size:24px; }
.text-\[26px\] { font-size:26px; }
.text-\[28px\] { font-size:28px; }
.text-\[36px\] { font-size:36px; }
.text-brand-700 { color:#0052D9; }
.text-center { text-align:center; }
.text-sm { font-size:14px; }
.text-text-primary { color:#111827; }
.text-text-secondary { color:#6B7280; }
.text-white { color:#fff; }
.text-white\/80 { color:rgba(255,255,255,0.8); }
.top-0 { top:0; }
.transition-all { transition:all .2s ease; }
.transition-colors { transition:color .2s ease,background-color .2s ease,border-color .2s ease; }
.transition-transform { transition:transform .2s ease; }
.truncate { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.w-8 { width:32px; }
.w-\[220px\] { width:220px; }
.w-full { width:100%; }
.z-\[100\] { z-index:100; }
.bg-\[\#0040AF\] { background-color:#0040AF; }
.bg-\[\#E8F0FE\] { background-color:#E8F0FE; }
.bg-\[\#F0F5FF\] { background-color:#F0F5FF; }
.text-brand-700 { color:#0052D9; }
.group:hover .-translate-y-1 { transform:translateY(-4px); }
.group:hover .scale-105 { transform:scale(1.05); }
.group:hover .translate-x-1 { transform:translateX(4px); }
@media (min-width:640px){.flex-row { flex-direction:row; }.inline { display:inline; }}
@media (min-width:768px){.flex { display:flex; }.flex-row { flex-direction:row; }.gap-3 { gap:12px; }.gap-4 { gap:16px; }.grid-cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }.grid-cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }.hidden { display:none; }.p-6 { padding:24px; }.px-6 { padding-left:24px;padding-right:24px; }.text-\[18px\] { font-size:18px; }}
@media (min-width:1024px){.grid-cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }.grid-cols-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }.px-6 { padding-left:24px;padding-right:24px; }.text-\[18px\] { font-size:18px; }.text-\[48px\] { font-size:48px; }}

/* FIX_CARDFIT_GLOBAL: 表单控件始终不溢出其容器 */
input,select,textarea,button{max-width:100%;box-sizing:border-box;}
input,select,textarea{min-width:0;}
.stat-card input,.stat-card select,.stat-card textarea,.stat-card button,.card input,.card select,.card textarea,.card button{min-width:0;max-width:100%;}

/* ============================================================

/* ============================================================
   FIX_NATIVE  v2 —— 统一接管浏览器原生控件外观
   关键：本区块必须使用 !important。
   原因：ENTUI.js 是 Tailwind 运行时，会在 document.head 末尾
   追加自己的 <style>（位于 unai.css 之后），同特异性规则会被它
   覆盖；同时 admin.html 窄屏媒体查询里存在
   .stat-card [style*="display:flex"] > input { flex:1 1 100% !important }
   这种高特异性 !important 规则，会把复选框拉伸成长方形。
   ============================================================ */

/* ---------- 1) 复选框：完全接管，锁定正方形 ---------- */
input[type="checkbox"], input[type=checkbox] {
  -webkit-appearance: none !important; appearance: none !important;
  width: 16px !important; height: 16px !important;
  min-width: 16px !important; max-width: 16px !important;
  min-height: 16px !important; max-height: 16px !important;
  flex: 0 0 16px !important;
  border: 1.5px solid #C7CDD6 !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 0 0 !important;
  cursor: pointer !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  display: inline-block !important;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease,
              background-size .18s cubic-bezier(.2,.8,.3,1) !important;
}
input[type="checkbox"]:hover, input[type=checkbox]:hover { border-color: #0052D9 !important; }
input[type="checkbox"]:checked, input[type=checkbox]:checked {
  background-color: #0052D9 !important; border-color: #0052D9 !important;
}
input[type="checkbox"]:checked, input[type=checkbox]:checked {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 11px 11px !important;
}
input[type="checkbox"]:disabled, input[type=checkbox]:disabled {
  background-color: #F3F4F6 !important; border-color: #E5E6EB !important; cursor: not-allowed !important;
}
input[type="checkbox"]:disabled:checked, input[type=checkbox]:disabled:checked {
  background-color: #D1D5DB !important; border-color: #D1D5DB !important;
}
input[type="checkbox"]:focus-visible, input[type=checkbox]:focus-visible {
  outline: none !important; box-shadow: 0 0 0 3px rgba(0,82,217,.15) !important;
}

/* ---------- 2) 单选框 ---------- */
input[type="radio"], input[type=radio] {
  -webkit-appearance: none !important; appearance: none !important;
  width: 16px !important; height: 16px !important;
  min-width: 16px !important; max-width: 16px !important;
  min-height: 16px !important; max-height: 16px !important;
  flex: 0 0 16px !important;
  border: 1.5px solid #C7CDD6 !important; border-radius: 50% !important;
  background-color: #fff !important; background-image: none !important;
  cursor: pointer !important; position: relative !important;
  margin: 0 !important; padding: 0 !important;
  box-sizing: border-box !important; display: inline-block !important;
  transition: border-color .18s ease, border-width .18s ease, box-shadow .18s ease !important;
}
input[type="radio"]:hover, input[type=radio]:hover { border-color: #0052D9 !important; }
input[type="radio"]:checked, input[type=radio]:checked { border-color: #0052D9 !important; border-width: 5px !important; }
input[type="radio"]:focus-visible, input[type=radio]:focus-visible {
  outline: none !important; box-shadow: 0 0 0 3px rgba(0,82,217,.15) !important;
}

/* ---------- 3) 下拉框：自绘箭头 + 保留过渡动画 ---------- */
select {
  -webkit-appearance: none !important; appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 16px 16px !important;
  padding-right: 32px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}
select::-ms-expand { display: none !important; }
select:focus {
  outline: none !important;
  border-color: #0052D9 !important;
  box-shadow: 0 0 0 3px rgba(0,82,217,.08) !important;
}

/* ---------- 4) 滚动条：细身圆角 ---------- */
* { scrollbar-width: thin; scrollbar-color: #C7CDD6 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: #C7CDD6; border-radius: 8px;
  border: 2px solid transparent; background-clip: content-box;
  transition: background-color .18s ease;
}
::-webkit-scrollbar-thumb:hover { background-color: #9CA3AF; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- 5) 搜索框清除按钮 ---------- */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none !important; }

/* ---------- 6) 防「文字竖排」 ---------- */
label, th, legend, .stat-tile-label, .ff-hint, button { word-break: keep-all; }
.unai-wrap { overflow-wrap: break-word; }
.unai-cell-wrap { overflow-wrap: break-word; }

/* ---------- 7) 全局平滑过渡：让所有交互不再生硬 ---------- */
input, select, textarea, button, a, .btn-primary, .nav-item, .tab, .subtab,
.unai-act, .stat-tile, .stat-card, .ff, .ff > label, .card, tr, td, th,
label, .menu-btn, .avatar-btn, .avatar-menu a, .modal-close, .plaza-stat {
  transition-property: background-color, border-color, color, box-shadow, opacity, transform;
  transition-duration: .18s;
  transition-timing-function: cubic-bezier(.2,.8,.3,1);
}
/* 输入框聚焦时轻微抬升，反馈更柔和 */
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="number"]:focus, input[type="tel"]:focus, input[type="search"]:focus, textarea:focus {
  transition: border-color .18s ease, box-shadow .18s ease;
}
/* 按钮按下时轻微缩放，触感更自然 */
button:not(:disabled):active { transform: scale(.97); }
/* 表格行 hover 平滑 */
tbody tr { transition: background-color .16s ease; }

/* ---------- 8) 卡片 hover 反馈：轻微上浮 + 阴影加深 ---------- */
.stat-tile, .stat-card, .card, .plaza-stat {
  transition: box-shadow .2s cubic-bezier(.2,.8,.3,1),
              transform .2s cubic-bezier(.2,.8,.3,1),
              border-color .2s cubic-bezier(.2,.8,.3,1) !important;
}
.stat-tile:hover, .plaza-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,40,120,.09);
  border-color: #D6E4FF !important;
}
/* 开关卡片 hover */
.ff-toggle:hover { border-color: #C5D8FF !important; }
/* 下拉框展开时（focus）轻微放大，反馈更自然 */
select:focus { transform: translateY(-1px); }
