@charset "utf-8";
/* ==========================================================================
   租赁经营系统 · 界面改版「收敛层」refine.css
   --------------------------------------------------------------------------
   定位说明（重要）
   这不是一套新设计语言。所有颜色、阴影、圆角、字号、动效都直接引用
   polish.css / theme.css 里已经存在的变量，不新增任何 token、不改一处 HTML
   结构，只把「同一区域里多个同等强调的操作」重新排队：
     页头主操作（实心品牌渐变）
        > 面板头操作（描边次级）
           > 筛选栏查询（浅底 / 品牌字）
              > 表格行操作（幽灵态，hover 才浮出底面）

   回退方式（三选一，都不需要改动任何源码）
     ① 在任意页面 URL 后加 ?ui=legacy  —— 该页整体回到旧版
     ② 删掉 index.html 里 <link rel="stylesheet" href="/refine.css"> 这一行
     ③ 用 artifacts/refine-20261020/orig/ 里的备份覆盖 public/ 同名文件
   因为每条规则都挂在 html.ui-refined 之下，legacy 模式下本文件天然零作用。
   ========================================================================== */

/* ==========================================================================
   01 筛选栏 / 排班工具条
   旧版 operations.css 把筛选栏里的 submit 直接刷成 --blue 实心，
   视觉权重与页头主操作一模一样 —— 这是「同一屏出现两个主按钮」的根因。
   这里把它压到「浅底 + 品牌字」：仍然一眼可点，但不再和页头主操作抢焦点。
   （operations.css 里的原规则没有删除，只是被这里按更高优先级覆盖，
     因此 ?ui=legacy 时会完整复原。）
   ========================================================================== */
.ui-refined .operations-filter button[type="submit"],
.ui-refined .calendar-tools button[type="submit"] {
  background: var(--surface-solid);
  border-color: var(--n-300);
  color: var(--brand-700);
  padding-inline: 14px;
  box-shadow: var(--sd-1), var(--sd-inset-top);
}
.ui-refined .operations-filter button[type="submit"]:hover:not(:disabled),
.ui-refined .calendar-tools button[type="submit"]:hover:not(:disabled) {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-700);
  box-shadow: var(--sd-2), var(--sd-inset-top);
}
.ui-refined .operations-filter button[type="submit"]:active:not(:disabled),
.ui-refined .calendar-tools button[type="submit"]:active:not(:disabled) {
  background: var(--brand-100);
  transform: translateY(1px);
}

/* 「清空条件」进一步降一级：透明底，只在 hover 时出现中性底色，
   让「查询」和「清空」在同一组内也有明确的主从差异。 */
.ui-refined .operations-filter button[type="reset"],
.ui-refined .calendar-tools button[type="reset"] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--n-600);
}
.ui-refined .operations-filter button[type="reset"]:hover:not(:disabled),
.ui-refined .calendar-tools button[type="reset"]:hover:not(:disabled) {
  background: var(--n-100);
  border-color: var(--n-200);
  color: var(--n-800);
  box-shadow: none;
}

/* ==========================================================================
   02 表格行内操作 → 幽灵态
   商品资料页每行 2–3 个实心描边按钮、全表上千个，整屏没有视觉重心。
   这里统一降为幽灵态（透明底 + 品牌字），hover 才浮出 --brand-50。
   刻意保留：行内的 .primary / .danger 不被降级（当前没有，但保留语义安全）。
   ========================================================================== */
.ui-refined .table-scroll td .button.small:not(.primary):not(.danger),
.ui-refined .table-wrap td .button.small:not(.primary):not(.danger) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--brand-600);
  padding-inline: 8px;
}
.ui-refined .table-scroll td .button.small:not(.primary):not(.danger):hover:not(:disabled),
.ui-refined .table-wrap td .button.small:not(.primary):not(.danger):hover:not(:disabled) {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-700);
  box-shadow: none;
}
.ui-refined .table-scroll td .button.small:not(.primary):not(.danger):active:not(:disabled),
.ui-refined .table-wrap td .button.small:not(.primary):not(.danger):active:not(:disabled) {
  background: var(--brand-100);
}
/* 危险操作保留红色语义，但同样去掉边框与阴影 */
.ui-refined .table-scroll td .button.small.danger,
.ui-refined .table-wrap td .button.small.danger {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.ui-refined .table-scroll td .button.small.danger:hover:not(:disabled),
.ui-refined .table-wrap td .button.small.danger:hover:not(:disabled) {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: #912018;
  box-shadow: none;
}

/* ==========================================================================
   03 面板头并列操作 → 收紧成一组
   主动报价「挑选器材」面板头原有 4 个并列按钮，读起来是 4 个同权操作。
   不改字号不改配色，只统一高度 + 收紧间距，让它们视觉上成为一个操作组，
   从而让页头的实心主操作自然成为唯一焦点。
   ========================================================================== */
.ui-refined .panel-head > .head-actions,
.ui-refined .panel-head > .panel-head-actions {
  gap: 6px;
}
.ui-refined .panel-head > .head-actions > .button,
.ui-refined .panel-head > .panel-head-actions > .button {
  min-height: 30px;
}
/* 页头操作组保持 8px 间距，与面板头形成层级差 */
.ui-refined .page-head > .head-actions {
  gap: 8px;
}

/* ==========================================================================
   04 商品资料精简表（配合 operations.mjs 的 5 列 refined 视图）
   列表只承担「识别 + 决策」：型号为主、品牌为辅；价格下面的收费条件
   折叠为带 title 的角标，hover 看全文（原文进入「编辑 / 核价」弹窗）。
   ========================================================================== */
.ui-refined .products-refined td {
  vertical-align: top;
}
.ui-refined .products-refined th:first-child { width: 34%; }
.ui-refined .products-refined th:nth-child(2) { width: 14%; white-space: nowrap; }
.ui-refined .products-refined th:nth-child(3) { width: 16%; white-space: nowrap; }
.ui-refined .products-refined th:nth-child(4) { width: 20%; }
.ui-refined .products-refined th:last-child { width: 16%; white-space: nowrap; }

/* 型号为主信息，品牌作为次级说明压在下面一行 */
.ui-refined .products-refined .product-name-cell {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--n-900);
  line-height: 1.35;
}
.ui-refined .products-refined .product-name-cell + .muted,
.ui-refined .products-refined td > small.muted {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--n-500);
}
/* 有 title 的说明是「折叠后的次要信息」，给一个可发现 hover 的视觉暗示 */
.ui-refined .products-refined td > small.muted[title] {
  cursor: help;
  text-decoration: underline dotted var(--n-400);
  text-underline-offset: 2px;
}
/* 状态列多个标签排在一起时补一个内间距，避免粘连 */
.ui-refined .products-refined td > .tag + .tag {
  margin-left: 4px;
}
.ui-refined .products-refined .tag {
  white-space: nowrap;
}

/* ==========================================================================
   05 无障碍与降级
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ui-refined .operations-filter button[type="submit"],
  .ui-refined .calendar-tools button[type="submit"],
  .ui-refined .operations-filter button[type="reset"],
  .ui-refined .calendar-tools button[type="reset"] {
    transition: none;
  }
}
@media (prefers-contrast: more) {
  /* 高对比偏好下，幽灵按钮补回可见边框 */
  .ui-refined .table-scroll td .button.small:not(.primary):not(.danger),
  .ui-refined .table-wrap td .button.small:not(.primary):not(.danger) {
    border-color: var(--n-300);
  }
}
