/**
 * iOS 26.5 风格 UI：玻璃拟态弹窗、圆形关闭按钮、3D 按钮
 * 作用于全部主题（html[data-theme]），加载于 themes.css 之后
 */

:root,
[data-theme]{
  --ios-glass-surface: color-mix(in srgb, var(--surface) 72%, transparent);
  --ios-glass-surface-strong: color-mix(in srgb, var(--surface) 86%, transparent);
  --ios-glass-border: color-mix(in srgb, var(--text) 12%, transparent);
  --ios-glass-highlight: color-mix(in srgb, #fff 42%, transparent);
  --ios-overlay: color-mix(in srgb, var(--bg) 48%, transparent);
  --ios-blur: 22px;
  --ios-blur-strong: 36px;
  --ios-radius-xl: 22px;
  --ios-close-size: 2rem;
  --ios-spring: cubic-bezier(0.34, 1.25, 0.64, 1);
  --ios-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ios-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ios-dur-fast: 0.18s;
  --ios-dur-overlay: 0.24s;
  --ios-dur-panel: 0.28s;
  /* 参考招商侧栏 pill 按钮（发布/装修/维修/入住）— 统一高度基准 */
  --ios-btn-radius: 999px;
  --ios-btn-py: 0.45rem;
  --ios-btn-px: 0.85rem;
  --ios-btn-font: 0.75rem;
  --ios-btn-lh: 1.25;
  --ios-btn-primary-face: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary-hover) 68%, #fff 32%) 0%,
    var(--primary) 44%,
    var(--primary-deep) 100%
  );
  --ios-btn-primary-border: color-mix(in srgb, var(--primary-deep) 58%, #000 6%);
  --ios-btn-primary-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 52%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--primary-deep) 62%, transparent),
    0 5px 16px color-mix(in srgb, rgb(var(--primary-rgb)) 44%, transparent),
    0 2px 4px color-mix(in srgb, var(--bg) 38%, transparent);
  /* 悬停：参考录像回放「查询回放」— 中间下沉、内凹 */
  --ios-btn-primary-shadow-hover:
    inset 0 4px 14px color-mix(in srgb, var(--primary-deep) 58%, #000 10%),
    inset 0 -2px 0 color-mix(in srgb, #fff 52%, transparent),
    0 1px 0 color-mix(in srgb, #fff 28%, transparent),
    0 10px 22px color-mix(in srgb, var(--bg) 46%, transparent),
    0 4px 10px color-mix(in srgb, rgb(var(--primary-rgb)) 16%, transparent);
  --ios-btn-primary-shadow-active:
    inset 0 6px 16px color-mix(in srgb, var(--primary-deep) 68%, #000 12%),
    inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent),
    0 1px 4px color-mix(in srgb, rgb(var(--primary-rgb)) 22%, transparent);
  --ios-btn-neutral-face: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 78%, #fff 22%) 0%,
    color-mix(in srgb, var(--surface2) 92%, transparent) 100%
  );
  --ios-btn-neutral-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    inset 0 -2px 0 color-mix(in srgb, var(--border) 72%, transparent),
    0 4px 14px color-mix(in srgb, var(--bg) 32%, transparent),
    0 1px 3px color-mix(in srgb, var(--bg) 28%, transparent);
  --ios-btn-neutral-shadow-hover:
    inset 0 4px 12px color-mix(in srgb, var(--border) 55%, transparent),
    inset 0 -2px 0 color-mix(in srgb, #fff 52%, transparent),
    0 1px 0 color-mix(in srgb, #fff 22%, transparent),
    0 8px 18px color-mix(in srgb, var(--bg) 40%, transparent);
  --ios-btn-neutral-shadow-active:
    inset 0 5px 12px color-mix(in srgb, var(--border) 62%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 20%, transparent),
    0 1px 3px color-mix(in srgb, var(--bg) 22%, transparent);
  --ios-btn-sink-y: 2px;
  --ios-btn-sink-scale: 0.985;
}

/* —— 遮罩：毛玻璃背景 —— */
.alert-modal,
.doc-mgmt-var-picker-overlay,
.doc-mgmt-upload-overlay,
.param-init-overlay,
.cloud-media-upload-overlay,
.app-loading-overlay{
  backdrop-filter: blur(var(--ios-blur)) saturate(185%);
  -webkit-backdrop-filter: blur(var(--ios-blur)) saturate(185%);
  background: var(--ios-overlay);
}

.alert-modal{
  background: color-mix(in srgb, var(--bg) 52%, transparent);
}

/* —— 弹窗面板：玻璃卡片 —— */
.form-modal-box,
.alert-box,
.doc-mgmt-var-picker-dialog,
.param-init-overlay-panel,
.doc-mgmt-upload-overlay-card,
.cloud-media-upload-panel{
  background: var(--ios-glass-surface);
  backdrop-filter: blur(var(--ios-blur-strong)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--ios-blur-strong)) saturate(200%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-xl);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 28px 64px color-mix(in srgb, var(--bg) 58%, transparent),
    0 10px 24px color-mix(in srgb, var(--bg) 32%, transparent);
}

.form-modal-header,
.doc-mgmt-var-picker-head{
  background: color-mix(in srgb, var(--surface2) 35%, transparent);
  border-bottom-color: var(--ios-glass-border);
}

.form-modal-footer{
  background: color-mix(in srgb, var(--surface2) 40%, transparent);
  border-top-color: var(--ios-glass-border);
}

/* —— 关闭按钮：圆形凸起 + 悬停放大 —— */
.form-modal-close,
.doc-mgmt-var-picker-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ios-close-size);
  height: var(--ios-close-size);
  min-width: var(--ios-close-size);
  min-height: var(--ios-close-size);
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface2) 82%, transparent);
  border: 1px solid var(--ios-glass-border);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 2px 10px color-mix(in srgb, var(--bg) 28%, transparent);
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    transform 0.24s var(--ios-spring),
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-modal-close:hover,
.doc-mgmt-var-picker-close:hover{
  transform: scale(1.14);
  color: var(--text);
  background: color-mix(in srgb, var(--surface2) 92%, var(--primary) 6%);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 6px 18px color-mix(in srgb, var(--bg) 34%, transparent);
}

.form-modal-close:active,
.doc-mgmt-var-picker-close:active{
  transform: scale(0.94);
  transition-duration: 0.1s;
}

/* —— 按钮：pill 形 glossy 3D + 悬停内凹下沉 —— */
/* display:inline-flex 会盖掉 UA 的 [hidden]{display:none}，须显式恢复 */
.btn-primary[hidden],
.btn-ghost[hidden],
.btn-secondary[hidden],
.btn-sm[hidden],
.list-pagination-btn[hidden]{
  display: none !important;
}

.btn-primary,
.btn-ghost,
.btn-secondary,
.btn-sm.btn-primary,
.btn-sm.btn-ghost,
.btn-sm.btn-secondary,
.list-pagination-btn,
.form-modal-footer .btn-primary,
.form-modal-footer .btn-ghost,
.form-modal-footer .btn-secondary,
button[type="submit"].btn-primary{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ios-btn-radius);
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  padding: var(--ios-btn-py) var(--ios-btn-px);
  font-size: var(--ios-btn-font);
  line-height: var(--ios-btn-lh);
  min-height: 0;
  transition:
    transform 0.2s var(--ios-spring),
    box-shadow 0.2s ease,
    filter 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

/* 主色 pill：蓝色纵向渐变 + 顶部内高光 + 底部内阴影 + 外投影 */
.btn-primary,
button[type="submit"].btn-primary{
  background: var(--ios-btn-primary-face);
  color: var(--btn-text, #fff);
  border: 1px solid var(--ios-btn-primary-border);
  box-shadow: var(--ios-btn-primary-shadow);
}

.btn-primary:hover,
button[type="submit"].btn-primary:hover{
  filter: brightness(0.95);
  transform: translateY(var(--ios-btn-sink-y)) scale(var(--ios-btn-sink-scale));
  box-shadow: var(--ios-btn-primary-shadow-hover);
}

.btn-primary:active,
button[type="submit"].btn-primary:active{
  filter: brightness(0.92);
  transform: translateY(calc(var(--ios-btn-sink-y) + 1px)) scale(0.97);
  box-shadow: var(--ios-btn-primary-shadow-active);
  transition-duration: 0.1s;
}

/* 次要 pill：同结构浅色 glossy */
.btn-ghost,
.btn-secondary,
.list-pagination-btn{
  background: var(--ios-btn-neutral-face);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--ios-btn-neutral-shadow);
}

.btn-ghost:hover,
.btn-secondary:hover,
.list-pagination-btn:hover:not(:disabled){
  filter: brightness(0.97);
  transform: translateY(var(--ios-btn-sink-y)) scale(var(--ios-btn-sink-scale));
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
  color: var(--primary-hover);
  box-shadow: var(--ios-btn-neutral-shadow-hover);
}

.btn-ghost:active,
.btn-secondary:active,
.list-pagination-btn:active:not(:disabled){
  filter: brightness(0.94);
  transform: translateY(calc(var(--ios-btn-sink-y) + 1px)) scale(0.97);
  box-shadow: var(--ios-btn-neutral-shadow-active);
  transition-duration: 0.1s;
}

/* 覆盖 app.css 中财务格内按钮的扁平样式 */

#form-modal .form-modal-submit:disabled,
.btn-primary:disabled,
.btn-secondary:disabled{
  transform: none;
  filter: grayscale(0.25) opacity(0.72);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent),
    0 2px 6px color-mix(in srgb, rgb(var(--primary-rgb)) 15%, transparent);
  cursor: not-allowed;
}

/* 覆盖 app.css 中偏高的按钮 padding / min-height */
.form-modal-footer .btn-primary,
.form-modal-footer .btn-ghost,
.form-modal-footer .btn-secondary,
.form-modal-footer--triple .btn-primary,
.form-modal-footer--triple .btn-ghost,
.form-modal-footer--triple .btn-secondary{
  padding: var(--ios-btn-py) var(--ios-btn-px);
  font-size: var(--ios-btn-font);
  line-height: var(--ios-btn-lh);
  min-height: 0;
}

/* —— 链接（A 标签）：全主题悬停放大 + 提亮 —— */
a{
  color: var(--primary);
  text-decoration: none;
  transition:
    transform 0.24s var(--ios-spring),
    filter 0.24s ease,
    color 0.2s ease;
  transform-origin: center center;
}

a:hover{
  color: var(--primary-hover);
  filter: brightness(1.22);
  transform: scale(1.08);
}

a:active{
  filter: brightness(1.1);
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* 内联文字链接需 inline-block 才能缩放 */
a:not(.btn-primary):not(.btn-ghost):not(.btn-secondary):not(.nav-item):not(.nav-subitem){
  display: inline-block;
}

/* 药丸/按钮式链接：叠加 3D 感 */

a.btn-primary,
a.btn-ghost,
a.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a.btn-primary:hover,
a.btn-ghost:hover,
a.btn-secondary:hover{
  filter: brightness(0.95);
  transform: translateY(var(--ios-btn-sink-y)) scale(var(--ios-btn-sink-scale));
}

a.btn-primary:active,
a.btn-ghost:active,
a.btn-secondary:active{
  filter: brightness(0.92);
  transform: translateY(calc(var(--ios-btn-sink-y) + 1px)) scale(0.97);
}

/* 导航链接：略小幅度，避免侧栏抖动 */
a.nav-item:hover,
a.nav-subitem:hover{
  filter: brightness(1.15);
  transform: scale(1.03);
}

/* 关闭按钮悬停同时提亮 */
.form-modal-close:hover,
.doc-mgmt-var-picker-close:hover{
  filter: brightness(1.2);
}

/* —— 全局 iOS 26.5 玻璃背景与布局 —— */
body{
  background:
    radial-gradient(ellipse 110% 75% at 8% -8%, color-mix(in srgb, rgb(var(--primary-rgb)) 14%, transparent), transparent 58%),
    radial-gradient(ellipse 85% 65% at 98% 105%, color-mix(in srgb, rgb(var(--accent-rgb)) 10%, transparent), transparent 52%),
    var(--bg);
}

/* 侧栏与主区必须同色不透明底，避免半透明玻璃叠出不同色（硬刷新时接缝更明显） */
.main-app,
.sidebar,
.content{
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar{
  border-right-color: var(--border);
  box-shadow: none;
}

/* 品牌栏与顶栏共用同一顶栏底色，左右顶对齐无色差 */
.sidebar-brand,
.topbar{
  background: color-mix(in srgb, var(--surface) 72%, var(--bg) 28%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: var(--border);
  box-shadow: none;
}

.card,
.stat-card,
.password-policy-hint{
  background: var(--ios-glass-surface);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  border-color: var(--ios-glass-border);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 8px 28px color-mix(in srgb, var(--bg) 28%, transparent);
}

.card-header{
  background: color-mix(in srgb, var(--surface2) 32%, transparent);
  border-bottom-color: var(--ios-glass-border);
}

.field input,
.field textarea,
.field select,
.captcha-img,
.theme-select,
.doc-mgmt-input[type="text"],
.setting-input select,
.setting-input input{
  background: color-mix(in srgb, var(--surface2) 78%, transparent);
  border-color: var(--ios-glass-border);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--bg) 22%, transparent);
  transition:
    border-color var(--ios-dur-fast) ease,
    box-shadow var(--ios-dur-fast) ease,
    background var(--ios-dur-fast) ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.theme-select:focus,
.doc-mgmt-input[type="text"]:focus{
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow:
    inset 0 1px 2px color-mix(in srgb, var(--bg) 18%, transparent),
    0 0 0 3px var(--focus-ring);
}

.login-card{
  background: color-mix(in srgb, var(--ios-glass-surface-strong) 88%, transparent);
  backdrop-filter: blur(var(--ios-blur-strong)) saturate(190%);
  -webkit-backdrop-filter: blur(var(--ios-blur-strong)) saturate(190%);
  border-color: var(--ios-glass-border);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 28px 64px color-mix(in srgb, var(--bg) 55%, transparent);
}

.login-tabs{
  background: color-mix(in srgb, var(--surface2) 65%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-tab.active{
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 2px 8px color-mix(in srgb, var(--bg) 22%, transparent);
}

.nav-group.expanded .nav-group-body{
  background: color-mix(in srgb, var(--ios-glass-surface) 88%, transparent);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.nav-subgroup.expanded .nav-subgroup-body{
  background: color-mix(in srgb, var(--ios-glass-surface) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-dropdown-panel,
.app-animated-dropdown{
  background: var(--ios-glass-surface-strong);
  backdrop-filter: blur(var(--ios-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--ios-blur)) saturate(180%);
  border-color: var(--ios-glass-border);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 12px 32px color-mix(in srgb, var(--bg) 38%, transparent);
  transition:
    max-height 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.flatpickr-calendar{
  background: var(--ios-glass-surface-strong) !important;
  backdrop-filter: blur(var(--ios-blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--ios-blur)) saturate(175%);
  border-color: var(--ios-glass-border) !important;
}

.toast{
  /* 操作提示固定浅底；字色按状态区分，见下方 toast-* .toast-body */
  background: color-mix(in srgb, #fff 92%, var(--surface));
  color: #303133;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    0 12px 36px color-mix(in srgb, var(--bg) 28%, transparent);
  animation: ios-toast-in 0.32s var(--ios-spring) both;
}

.toast .toast-close{
  color: #a8abb2;
}

.toast .toast-close:hover{
  background: rgba(0, 0, 0, .06);
}

.toast-success .toast-icon{ background: #22c55e; }
.toast-error .toast-icon{ background: #ef4444; }
.toast-warning .toast-icon{ background: #f97316; }
.toast-info .toast-icon{ background: #3b82f6; }

.toast-success .toast-body{ color: #067647; }
.toast-error .toast-body{ color: #b91c1c; }
.toast-warning .toast-body{ color: #b45309; }
.toast-info .toast-body{ color: #1d4ed8; }

@keyframes ios-toast-in{
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* —— 弹窗/对话框：打开与关闭微动画 —— */
@keyframes ios-overlay-in{
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ios-overlay-out{
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ios-panel-in{
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ios-panel-out{
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
}

.ios-overlay-panel{
  transform-origin: center center;
  will-change: transform, opacity;
}

.alert-modal:not(.hidden):not(.ios-overlay-closing),
.doc-mgmt-var-picker-overlay:not(.hidden):not(.ios-overlay-closing),
.doc-mgmt-upload-overlay:not(.hidden):not(.ios-overlay-closing),
.param-init-overlay:not(.hidden):not(.ios-overlay-closing),
.cloud-media-upload-overlay:not(.hidden):not(.ios-overlay-closing),
.app-loading-overlay--fullscreen:not(.hidden):not(.ios-overlay-closing){
  animation: ios-overlay-in var(--ios-dur-overlay) var(--ios-ease-out) both;
}

.alert-modal:not(.hidden):not(.ios-overlay-closing) > .form-modal-box,
.alert-modal:not(.hidden):not(.ios-overlay-closing) > .alert-box,
.doc-mgmt-var-picker-overlay:not(.hidden):not(.ios-overlay-closing) > .doc-mgmt-var-picker-dialog,
.doc-mgmt-upload-overlay:not(.hidden):not(.ios-overlay-closing) > .doc-mgmt-upload-overlay-card,
.param-init-overlay:not(.hidden):not(.ios-overlay-closing) > .param-init-overlay-panel,
.cloud-media-upload-overlay:not(.hidden):not(.ios-overlay-closing) > .cloud-media-upload-panel,
.app-loading-overlay:not(.app-loading-overlay--leaving) > .app-loading-spinner{
  animation: ios-panel-in var(--ios-dur-panel) var(--ios-spring) 0.03s both;
}

.alert-modal.ios-overlay-closing,
.doc-mgmt-var-picker-overlay.ios-overlay-closing,
.doc-mgmt-upload-overlay.ios-overlay-closing,
.param-init-overlay.ios-overlay-closing,
.cloud-media-upload-overlay.ios-overlay-closing,
.app-loading-overlay--fullscreen.ios-overlay-closing{
  animation: ios-overlay-out var(--ios-dur-overlay) var(--ios-ease-in) both;
  pointer-events: none;
}

.alert-modal.ios-overlay-closing > .form-modal-box,
.alert-modal.ios-overlay-closing > .alert-box,
.doc-mgmt-var-picker-overlay.ios-overlay-closing > .doc-mgmt-var-picker-dialog,
.doc-mgmt-upload-overlay.ios-overlay-closing > .doc-mgmt-upload-overlay-card,
.param-init-overlay.ios-overlay-closing > .param-init-overlay-panel,
.cloud-media-upload-overlay.ios-overlay-closing > .cloud-media-upload-panel,
.app-loading-overlay--leaving > .app-loading-spinner{
  animation: ios-panel-out calc(var(--ios-dur-panel) - 0.04s) var(--ios-ease-in) both;
}

.form-modal-loading-overlay{
  backdrop-filter: blur(var(--ios-blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--ios-blur)) saturate(175%);
  animation: ios-overlay-in 0.2s var(--ios-ease-out) both;
}

.form-modal-loading-overlay .app-loading-spinner{
  animation: ios-panel-in 0.24s var(--ios-spring) both;
}

.cloud-media-upload-panel{
  background: var(--ios-glass-surface);
  backdrop-filter: blur(var(--ios-blur-strong)) saturate(195%);
  -webkit-backdrop-filter: blur(var(--ios-blur-strong)) saturate(195%);
  border-color: var(--ios-glass-border);
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight),
    0 28px 64px color-mix(in srgb, var(--bg) 58%, transparent);
}

/* —— 全局响应加速：缩短过渡时长 —— */
.nav-group-body,
.nav-subgroup-body{
  transition-duration: 0.28s !important;
}

.nav-item,
.nav-group-head,
.nav-subgroup-head{
  transition-duration: 0.18s !important;
}

.btn-primary,
.btn-ghost,
.btn-secondary{
  transition-duration: 0.18s !important;
}

@media (max-width: 768px) {
  :root,
  [data-theme] {
    --ios-blur: 16px;
    --ios-blur-strong: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alert-modal,
  .doc-mgmt-var-picker-overlay,
  .doc-mgmt-upload-overlay,
  .param-init-overlay,
  .cloud-media-upload-overlay,
  .app-loading-overlay--fullscreen,
  .form-modal-loading-overlay,
  .toast {
    animation: none !important;
  }
  .form-modal-close,
  .doc-mgmt-var-picker-close,
  .btn-primary,
  .btn-ghost,
  .btn-secondary,
  .list-pagination-btn,
  a {
    transition: none;
  }
  .form-modal-close:hover,
  .doc-mgmt-var-picker-close:hover,
  .btn-primary:hover,
  .btn-ghost:hover,
  .btn-secondary:hover,
  .list-pagination-btn:hover,
  a:hover,
  a:active {
    transform: none;
    filter: none;
  }
}

/* 文案发布向导：与 .field 一致的主题玻璃控件（覆盖 app.css，加载于 themes 之后） */
.cw-publish-page .input,
.cw-publish-page input[type="text"],
.cw-publish-page input[type="number"],
.cw-publish-page input[type="date"],
.cw-publish-page input[type="time"],
.cw-publish-page select,
.cw-publish-page .cw-pub-ctrl .input,
.cw-publish-page .cw-pub-mat-form input,
.cw-publish-page .cw-pub-mat-form select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.875rem;
  color: var(--input-fg, var(--text));
  background: color-mix(in srgb, var(--surface2) 78%, transparent);
  border: 1px solid var(--ios-glass-border, var(--border));
  border-radius: 10px;
  padding: 0 0.72rem;
  height: 2.2rem;
  min-height: 2.2rem;
  max-height: 2.2rem;
  line-height: 2.1rem;
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--bg) 22%, transparent);
  transition:
    border-color var(--ios-dur-fast, 0.18s) ease,
    box-shadow var(--ios-dur-fast, 0.18s) ease,
    background var(--ios-dur-fast, 0.18s) ease;
  box-sizing: border-box;
  max-width: 100%;
  aspect-ratio: auto;
  flex: none;
}
.cw-publish-page textarea,
.cw-publish-page textarea.input,
.cw-publish-page .cw-pub-textarea,
.cw-publish-page .cw-pub-mat-form textarea {
  min-height: 5.5rem;
  max-height: none;
  height: auto;
  padding: 0.7rem 0.8rem;
  line-height: 1.55;
  resize: vertical;
}
.cw-publish-page .input:hover,
.cw-publish-page input[type="text"]:hover,
.cw-publish-page input[type="number"]:hover,
.cw-publish-page input[type="date"]:hover,
.cw-publish-page input[type="time"]:hover,
.cw-publish-page select:hover,
.cw-publish-page textarea:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
}
.cw-publish-page .input:focus,
.cw-publish-page input[type="text"]:focus,
.cw-publish-page input[type="number"]:focus,
.cw-publish-page input[type="date"]:focus,
.cw-publish-page input[type="time"]:focus,
.cw-publish-page select:focus,
.cw-publish-page textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, var(--surface2));
  box-shadow:
    inset 0 1px 2px color-mix(in srgb, var(--bg) 18%, transparent),
    0 0 0 3px var(--focus-ring, color-mix(in srgb, var(--primary) 22%, transparent));
}
.cw-publish-page select.input,
.cw-publish-page select {
  padding-right: 2rem;
  background-color: color-mix(in srgb, var(--surface2) 78%, transparent);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.cw-publish-page select:focus {
  background-color: color-mix(in srgb, var(--surface) 88%, var(--surface2));
  background-image:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%);
}
.cw-publish-page .cw-pub-inline {
  width: var(--cw-pub-inline-w, 6.75rem) !important;
  min-width: var(--cw-pub-inline-w, 6.75rem) !important;
  max-width: var(--cw-pub-inline-w, 6.75rem) !important;
  flex: 0 0 var(--cw-pub-inline-w, 6.75rem);
}
.cw-publish-page .cw-pub-w-pair {
  width: calc(6.75rem * 2 + 0.45rem * 2 + 0.9rem) !important;
  max-width: 100% !important;
}
.cw-publish-page .cw-pub-short,
.cw-publish-page .cw-pub-num {
  width: 50cqw !important;
  max-width: 100% !important;
  flex: none !important;
  height: 2.2rem !important;
  min-height: 2.2rem !important;
  max-height: 2.2rem !important;
  aspect-ratio: auto !important;
}
.cw-publish-page .cw-pub-ctrl-pair .input {
  width: auto;
  flex: none !important;
}
.cw-publish-page .cw-pub-ctrl-unit {
  width: auto;
  max-width: 100%;
}
.cw-publish-page .cw-pub-ctrl-unit .input,
.cw-publish-page .cw-pub-ctrl-unit .cw-pub-short,
.cw-publish-page .cw-pub-ctrl-unit .cw-pub-num {
  flex: none !important;
  width: 50cqw !important;
  max-width: none !important;
  min-width: 0 !important;
}
.cw-publish-page .cw-pub-ctrl-inline {
  display: grid;
  grid-template-columns: 50cqw 1.5rem auto;
  align-items: center;
  column-gap: 0.45rem;
  width: 100%;
}
.cw-publish-page .cw-pub-ctrl-inline .cw-pub-short,
.cw-publish-page .cw-pub-ctrl-inline > .input {
  width: 100% !important;
  max-width: none !important;
}
.cw-publish-page .cw-pub-gather-group {
  width: 50%;
  max-width: 100%;
}
.cw-publish-page .cw-pub-gather-group .input {
  width: 100% !important;
  max-width: none !important;
  height: 2.2rem !important;
  min-height: 2.2rem !important;
  max-height: 2.2rem !important;
  flex: none !important;
}
.cw-publish-page .cw-pub-date-row,
.cw-publish-page .cw-pub-itin-item {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.cw-publish-page .cw-pub-date-row .input,
.cw-publish-page .cw-pub-itin-item .input {
  flex: 1;
  width: auto !important;
  min-width: 0;
}
.cw-publish-page input[type="date"],
.cw-publish-page input[type="time"] {
  color-scheme: inherit;
}
.cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
.cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.75;
  cursor: pointer;
  filter: invert(0.2);
}
html[data-theme="midnight"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="obsidian"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="space"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="neon"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="cyber"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="vampire"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="mocha"] .cw-publish-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="midnight"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="obsidian"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="space"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="neon"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="cyber"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="vampire"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="mocha"] .cw-publish-page input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
}
.cw-publish-page .cw-pub-check,
.cw-publish-page .cw-pub-radio,
.cw-publish-page .cw-pub-fee-item {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0.2rem;
  border-radius: 8px;
  transition: background var(--ios-dur-fast, 0.15s) ease;
}
.cw-publish-page .cw-pub-check:hover,
.cw-publish-page .cw-pub-radio:hover,
.cw-publish-page .cw-pub-fee-item:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.cw-publish-page .cw-pub-check input[type="checkbox"],
.cw-publish-page .cw-pub-radio input[type="radio"],
.cw-publish-page .cw-pub-fee-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 1.05rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  border: 1.5px solid color-mix(in srgb, var(--border) 70%, var(--primary) 30%);
  background: color-mix(in srgb, var(--surface2) 80%, var(--surface));
  box-shadow: inset 0 1px 1px color-mix(in srgb, var(--bg) 18%, transparent);
  display: inline-grid;
  place-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  accent-color: var(--primary);
}
.cw-publish-page .cw-pub-check input[type="checkbox"],
.cw-publish-page .cw-pub-fee-item input[type="checkbox"] {
  border-radius: 5px;
}
.cw-publish-page .cw-pub-radio input[type="radio"] {
  border-radius: 50%;
}
.cw-publish-page .cw-pub-check input[type="checkbox"]::before,
.cw-publish-page .cw-pub-fee-item input[type="checkbox"]::before {
  content: "";
  width: 0.55rem;
  height: 0.32rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.12s ease;
  margin-top: -0.1rem;
}
.cw-publish-page .cw-pub-radio input[type="radio"]::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.12s ease;
}
.cw-publish-page .cw-pub-check input[type="checkbox"]:checked,
.cw-publish-page .cw-pub-fee-item input[type="checkbox"]:checked,
.cw-publish-page .cw-pub-radio input[type="radio"]:checked {
  background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--accent, var(--primary))));
  border-color: transparent;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.cw-publish-page .cw-pub-check input[type="checkbox"]:checked::before,
.cw-publish-page .cw-pub-fee-item input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}
.cw-publish-page .cw-pub-radio input[type="radio"]:checked::before {
  transform: scale(1);
}
.cw-publish-page .cw-pub-fee-item:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.cw-pub-wait-overlay {
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(var(--ios-blur, 14px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--ios-blur, 14px)) saturate(160%);
}
.cw-pub-wait-panel {
  background: var(--ios-glass-surface-strong, color-mix(in srgb, var(--surface) 92%, transparent));
  border-color: var(--ios-glass-border, var(--border));
  box-shadow:
    inset 0 1px 0 var(--ios-glass-highlight, transparent),
    0 18px 48px color-mix(in srgb, var(--bg) 45%, transparent);
}
