/* ==========================================================================
 * ui-freeze.css —— 111 整套 UI 冻结皮肤（字面值写死）
 * 基准：线上 ink 卡其奶油主题当前渲染值（2026-11-12 抓取）
 *
 * 色板
 *   画布     #f6eddf   卡片/表面 #fffaf0   浅奶油 #f8f0e2
 *   边框     #d8cbb2   细边框   #e6dcc6
 *   正文     #383c30   次要    #7a7364
 *   卡其主色 #6f7651   hover   #5b6844
 *   危险红   #d9534f   hover   #c9463f   active #b93a34
 *
 * 两层写死：
 *   1) :root 设计令牌全部固化 —— 卡片、文字、边框、阴影、圆角都从这里取值
 *   2) 组件层显式规则 —— 按钮 / 输入框 / 分段控制器 / 分区 pill
 * 目的：不再受主题切换、ink 渐变注入、CSS 变量被运行时改写的影响。
 * ========================================================================== */

/* ================= 1. 设计令牌（全部写死） ================= */
:root {
  --font-ui: "Noto Sans SC", sans-serif !important;
  --font-mono: "Noto Sans SC", sans-serif !important;
  --fw-heading: 700 !important;
  --fw-list: 500 !important;
  --fw-caption: 400 !important;
  --color-caption: #888 !important;
  --color-list-text: #333 !important;
  --farm-bg: #f6eddf !important;
  --farm-bg-subtle: #f8f0e2 !important;
  --farm-surface: #fffaf0 !important;
  --farm-surface-elevated: #fffdf8 !important;
  --farm-border: #d8cbb2 !important;
  --farm-border-subtle: #e6dcc6 !important;
  --farm-text: #383c30 !important;
  --farm-muted: #7a7364 !important;
  --farm-accent: #6f7651 !important;
  --farm-accent-hover: #5b6844 !important;
  --farm-accent-soft: rgba(111,118,81,.12) !important;
  --farm-input-bg: #fffaf0 !important;
  --farm-elevated-bg: #fbf4e8 !important;
  --farm-radius: 16px !important;
  --farm-radius-sm: 12px !important;
  --farm-radius-lg: 20px !important;
  --farm-shadow: 3px 4px 0 #c0b6a34a,0 3px 8px #52442c0d !important;
  --farm-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08) !important;
  --farm-sidebar-width: 260px !important;
  --farm-header-height: 56px !important;
  --farm-glass: rgba(255,250,240,.72) !important;
  --farm-glass-border: rgba(255,250,240,.6) !important;
  --theme-primary: #6f7651 !important;
  --theme-secondary: #5b6844 !important;
  --farm-card-bg: #fffaf0 !important;
  --farm-notice-bg: #fffbeb !important;
  --farm-notice-border: #fde68a !important;
  --farm-notice-text: #92400e !important;
  --farm-tip-bg: #fffbeb !important;
  --farm-tip-text: #b45309 !important;
  --farm-stat-inset-bg: #f3f4f6 !important;
  --farm-stat-inset-ring: rgba(15, 23, 42, .04) !important;
  --farm-chip-bg: #fffaf0 !important;
  --farm-chip-muted-bg: #f8f0e2 !important;
  --farm-success-text: #16a34a !important;
  --farm-danger-text: #dc2626 !important;
  --app-modal-z: 1100 !important;
  --app-modal-overlay-bg: rgb(15 23 42 / 50%) !important;
  --app-modal-max-height: min( 78dvh, calc(100dvh - 24px - 0px - 0px) ) !important;
  --color-canvas: #f6eddf !important;
  --color-bg-muted: #f8f0e2 !important;
  --color-surface: #fffaf0 !important;
  --color-border: rgba(122,106,80,.30) !important;
  --color-border-subtle: rgba(150,133,105,.24) !important;
  --color-accent: #6f7651 !important;
  --color-accent-hover: #5b6844 !important;
  --color-accent-muted: rgba(111,118,81,.14) !important;
  --color-text: #383c30 !important;
  --color-text-muted: #7a7364 !important;
  --color-muted-foreground: #7a8a96 !important;
  --color-success: #16a34a !important;
  --color-success-muted: rgba(22, 163, 74, 0.12) !important;
  --color-warn: #d97706 !important;
  --color-danger: #dc2626 !important;
  --shadow-card: 3px 4px 0 #c0b6a34a,0 3px 8px #52442c0d !important;
  --shadow-float: 0 10px 28px rgba(31, 35, 48, 0.12) !important;
  --theme-bg: #f6eddf !important;
  --theme-text: #383c30 !important;
  --theme-gradient: linear-gradient(125deg,#8b9467,#6f7651) !important;
  --zcool: "ZCOOL KuaiLe","Noto Sans SC",system-ui,sans-serif !important;
  --sans: "Noto Sans SC",system-ui,sans-serif !important;
  --wood-deep: #b35f7c !important;
  --wood: #d989a6 !important;
  --wood-mid: #e8a5bd !important;
  --wood-light: #f7d3e0 !important;
  --wood-edge: #9a4e6a !important;
  --frame: #f0b2c8 !important;
  --frame-deep: #d989a6 !important;
  --frame-light: #fce0ea !important;
  --panel: #fff4f8 !important;
  --panel-shade: #f6d8e4 !important;
  --counter: #f7a8c4 !important;
  --counter-deep: #e885ab !important;
  --board: #7a4a5e !important;
  --board-edge: #f0a8c0 !important;
  --board-light: #9a6a7e !important;
  --btn: #ff9ebb !important;
  --btn-deep: #ef6f9c !important;
  --btn-edge: #c8547f !important;
  --btn-light: #ffd6e4 !important;
  --brown: #d989a6 !important;
  --brown-deep: #b35f7c !important;
  --brown-light: #f0b8cc !important;
  --red: #ff5a7a !important;
  --text: #8a3b57 !important;
  --text-soft: #b07792 !important;
  --text-light: #fff6fa !important;
  --text-on-btn: #8a3b57 !important;
  --stage-bg: #f3d6e2 !important;
}

/* ================= 2. 画布与正文 ================= */
html,
body {
  background-color: #f6eddf !important;
  color: #383c30 !important;
}
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
h1, h2, h3, h4, h5, h6 {
  color: #383c30 !important;
}
.text-slate-500, .text-gray-500, .text-slate-400, .text-gray-400,
.text-farm-muted, [class*="text-muted"] {
  color: #7a7364 !important;
}

/* ================= 3. 卡片与面板 ================= */
html:not(.dark) .app-root [class*="bg-white"][class*="border"],
html.dark .app-root [class*="bg-white"][class*="border"],
html:not(.dark) .app-root [class*="rounded-2xl"][class*="border"],
html.dark .app-root [class*="rounded-2xl"][class*="border"],
.app-root .ink-card {
  background-color: #fffaf0 !important;
  background-image: none !important;
  border-color: rgba(150, 133, 105, .34) !important;
  box-shadow: 3px 4px 0 rgba(192, 182, 163, .29), 0 3px 8px rgba(82, 68, 44, .05) !important;
}

/* ================= 4. 表单控件（账号页 + 弹窗；不改暗色「农场大脑」面板） ================= */
html:not(.dark) .app-root .account-filter-bar input,
html.dark .app-root .account-filter-bar input,
html:not(.dark) .app-root .shadow-xl input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html.dark .app-root .shadow-xl input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html:not(.dark) .app-root .shadow-xl textarea,
html.dark .app-root .shadow-xl textarea,
html:not(.dark) .app-root .shadow-xl select,
html.dark .app-root .shadow-xl select {
  background-color: #fffaf0 !important;
  background-image: none !important;
  border-color: #d8cbb2 !important;
  color: #383c30 !important;
}
html:not(.dark) .app-root .account-filter-bar input::placeholder,
html:not(.dark) .app-root .shadow-xl input::placeholder,
html:not(.dark) .app-root .shadow-xl textarea::placeholder {
  color: #a89f8c !important;
}

/* ================= 5. 按钮：奶油描边（次要） ================= */
html:not(.dark) .app-root button[class*="rounded-lg"][class*="font-medium"],
html.dark .app-root button[class*="rounded-lg"][class*="font-medium"] {
  background: #fffaf0 !important;
  background-image: none !important;
  border: 1px solid #d8cbb2 !important;
  color: #5f6a49 !important;
  box-shadow: 0 1px 2px rgba(56, 60, 48, .05) !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class*="font-medium"]:hover,
html.dark .app-root button[class*="rounded-lg"][class*="font-medium"]:hover {
  background: #f8f0e2 !important;
  border-color: #c9bb9e !important;
  color: #4a4632 !important;
  transform: none !important;
  filter: none !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class*="font-medium"]:active,
html.dark .app-root button[class*="rounded-lg"][class*="font-medium"]:active {
  background: #f2ead8 !important;
  border-color: #bfae8c !important;
}

/* ================= 6. 按钮：卡其实心（主操作） ================= */
html:not(.dark) .app-root button[class*="rounded-lg"][class~="text-white"],
html.dark .app-root button[class*="rounded-lg"][class~="text-white"] {
  background: #6f7651 !important;
  background-image: none !important;
  border: 1px solid #6f7651 !important;
  color: #fffdf5 !important;
  box-shadow: 0 1px 3px rgba(56, 60, 48, .18) !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class~="text-white"]:hover,
html.dark .app-root button[class*="rounded-lg"][class~="text-white"]:hover {
  background: #5b6844 !important;
  border-color: #5b6844 !important;
  color: #fffdf5 !important;
  transform: none !important;
  filter: none !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class~="text-white"]:active,
html.dark .app-root button[class*="rounded-lg"][class~="text-white"]:active {
  background: #4f5539 !important;
  border-color: #4f5539 !important;
}

/* ================= 7. 按钮：危险红（立即停止 / 删除） ================= */
html:not(.dark) .app-root button[class*="rounded-lg"][class*="account-danger-action"],
html.dark .app-root button[class*="rounded-lg"][class*="account-danger-action"] {
  background: #d9534f !important;
  background-image: none !important;
  border: 1px solid #c9463f !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class*="account-danger-action"]:hover,
html.dark .app-root button[class*="rounded-lg"][class*="account-danger-action"]:hover {
  background: #c9463f !important;
  border-color: #b93a34 !important;
  color: #ffffff !important;
  transform: none !important;
  filter: none !important;
}
html:not(.dark) .app-root button[class*="rounded-lg"][class*="account-danger-action"]:active,
html.dark .app-root button[class*="rounded-lg"][class*="account-danger-action"]:active {
  background: #b93a34 !important;
  border-color: #a8332d !important;
}
.app-root button.account-danger-action:disabled {
  opacity: .6 !important;
  cursor: not-allowed !important;
}

/* ================= 8. 自定义入口按钮 ================= */
html:not(.dark) .app-root .dashboard-add-account,
html.dark .app-root .dashboard-add-account,
html:not(.dark) .app-root .account-auto-relogin-trigger,
html.dark .app-root .account-auto-relogin-trigger {
  background: #6f7651 !important;
  background-image: none !important;
  border: 1px solid #6f7651 !important;
  color: #fffdf5 !important;
  box-shadow: 0 1px 3px rgba(56, 60, 48, .18) !important;
}
html:not(.dark) .app-root .dashboard-add-account:hover,
html.dark .app-root .dashboard-add-account:hover,
html:not(.dark) .app-root .account-auto-relogin-trigger:hover,
html.dark .app-root .account-auto-relogin-trigger:hover {
  background: #5b6844 !important;
  border-color: #5b6844 !important;
  color: #fffdf5 !important;
  filter: none !important;
}

/* ================= 9. 分区 pill ================= */
html:not(.dark) .app-root .account-section-button,
html.dark .app-root .account-section-button,
html:not(.dark) .app-root .dashboard-section-nav-item,
html.dark .app-root .dashboard-section-nav-item {
  background: #fffaf0 !important;
  background-image: none !important;
  border: 1px solid #d8cbb2 !important;
  color: #6f7651 !important;
}
html:not(.dark) .app-root .account-section-button:hover,
html.dark .app-root .account-section-button:hover,
html:not(.dark) .app-root .dashboard-section-nav-item:hover,
html.dark .app-root .dashboard-section-nav-item:hover {
  background: #f8f0e2 !important;
  border-color: #c9bb9e !important;
  color: #4a4632 !important;
}
html:not(.dark) .app-root .account-section-button.is-active,
html.dark .app-root .account-section-button.is-active {
  background: #f0ebda !important;
  border-color: #6f7651 !important;
  color: #4a4632 !important;
}
html:not(.dark) .app-root .dashboard-section-nav-item.is-active,
html.dark .app-root .dashboard-section-nav-item.is-active {
  background: #6f7651 !important;
  border-color: #6f7651 !important;
  color: #fffdf5 !important;
}

/* ================= 10. 分段控制器（添加账号 tab） ================= */
.k103-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
  padding: 4px !important;
  margin: 0 0 14px !important;
  background: #f8f0e2 !important;
  border: 1px solid #d8cbb2 !important;
  border-radius: 7px !important;
}
.k103-tabs > button[hidden] {
  display: none !important;
}
.k103-tabs > button {
  display: block !important;
  flex: none !important;
  width: auto !important;
  height: 34px !important;
  line-height: 34px !important;
  padding: 0 4px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 5px !important;
  opacity: 1 !important;
  background: transparent !important;
  background-image: none !important;
  color: #7a7364 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.k103-tabs > button:hover {
  color: #6f7651 !important;
  background: rgba(255, 250, 240, .7) !important;
}
.k103-tabs > button.k103-active {
  background: #fffaf0 !important;
  color: #6f7651 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 5px rgba(56, 60, 48, .12) !important;
}

/* ================= 11. VX 车载扫码面板 ================= */
.kvx-hide {
  display: none !important;
}
.kvx-wrap {
  padding: 2px 0 0;
}
.kvx-card {
  background: #fffaf0 !important;
  border: 1px solid #d8cbb2 !important;
  border-radius: 12px !important;
  padding: 18px 16px !important;
  box-shadow: 0 1px 2px rgba(56, 60, 48, .05) !important;
}
.kvx-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #383c30 !important;
  text-align: center !important;
}
.kvx-sub {
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #7a7364 !important;
  text-align: center !important;
}
.kvx-qr {
  width: 208px !important;
  height: 208px !important;
  margin: 16px auto 12px !important;
  background: #ffffff !important;
  border: 1px solid #d8cbb2 !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}
.kvx-qr img {
  width: 192px !important;
  height: 192px !important;
  display: block !important;
}
.kvx-qr-hint {
  font-size: 12px !important;
  color: #a89f8c !important;
}
.kvx-status {
  min-height: 20px !important;
  text-align: center !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #7a7364 !important;
}
.kvx-status.is-warn { color: #8a6d3b !important; }
.kvx-status.is-ok { color: #4c7a34 !important; font-weight: 600 !important; }
.kvx-status.is-bad { color: #b93a34 !important; }
.kvx-actions {
  display: flex !important;
  justify-content: center !important;
  margin-top: 12px !important;
}
.kvx-btn {
  height: 34px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  border: 1px solid #6f7651 !important;
  background: #6f7651 !important;
  background-image: none !important;
  color: #fffdf5 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background .18s ease, border-color .18s ease;
}
.kvx-btn:hover {
  background: #5b6844 !important;
  border-color: #5b6844 !important;
  color: #fffdf5 !important;
}
.kvx-btn.ghost {
  background: #fffaf0 !important;
  border-color: #d8cbb2 !important;
  color: #5f6a49 !important;
}
.kvx-btn.ghost:hover {
  background: #f8f0e2 !important;
  border-color: #c9bb9e !important;
  color: #4a4632 !important;
}
.kvx-tip {
  margin-top: 12px !important;
  padding-top: 10px !important;
  border-top: 1px dashed #e6dcc6 !important;
  font-size: 11.5px !important;
  line-height: 1.6 !important;
  color: #a89f8c !important;
}

/* Tailwind 的 .flex 等类会覆盖 UA 的 [hidden] */
[hidden] {
  display: none !important;
}
