/* ==========================================================================
   租赁经营系统 · 视觉重设计 v2（polish.css）
   --------------------------------------------------------------------------
   这是一个「纯视觉层」样式表，加载在所有业务样式之后：
   · 不改动任何 HTML 结构、类名和 JS 逻辑，只做视觉接管
   · 回退方式：删掉 index.html 里 <link rel="stylesheet" href="/polish.css"> 这一行
   --------------------------------------------------------------------------
   目录
   01 配色体系   02 阴影与圆角   03 字体与排版   04 全局细节
   05 应用框架（侧栏 / 顶栏）   06 页面容器与标题   07 面板与卡片
   08 按钮与交互控件             09 表单控件       10 表格
   11 标签 · 徽标 · 提示         12 概览仪表盘重构 13 业务页统一风格
   14 排班模块                   15 登录页        16 响应式
   17 无障碍与降级
   ========================================================================== */

/* ==========================================================================
   01 配色体系
   主色 墨黛蓝（专业、可信）｜辅助色 松石青（设备/流转）｜强调色 琥珀金（金额/关注）
   语义色统一采用「淡背景 + 深字」的组合，保证信息密度场景下依然清晰
   ========================================================================== */
:root {
  /* 主色 — Indigo Slate */
  --brand-50:  #eff3fb;
  --brand-100: #dbe4f4;
  --brand-200: #bccbea;
  --brand-300: #96aad8;
  --brand-400: #6d86c0;
  --brand-500: #4d679b;
  --brand-600: #3d5482;
  --brand-700: #2f4269;
  --brand-800: #22314e;
  --brand-900: #18233a;

  /* 辅助色 — Teal */
  --teal-50:  #e8f5f2;
  --teal-100: #c7e9e2;
  --teal-300: #7cc6b8;
  --teal-500: #12806f;
  --teal-600: #0e6a5b;
  --teal-700: #0b5347;

  /* 强调色 — Amber */
  --amber-50:  #fdf6e7;
  --amber-100: #f9e8c3;
  --amber-300: #edc268;
  --amber-500: #b8802a;
  --amber-600: #9a6720;
  --amber-700: #7b5219;

  /* 中性色 — Cool Gray */
  --n-0:   #ffffff;
  --n-25:  #fcfdff;
  --n-50:  #f7f9fd;
  --n-100: #f1f4fa;
  --n-200: #e7ebf3;
  --n-300: #d8deeb;
  --n-400: #b7c1d3;
  --n-500: #8d99b0;
  --n-600: #66738d;
  --n-700: #48546c;
  --n-800: #2b3550;
  --n-900: #141b2a;

  /* 图表序列色（仪表盘、透视表、图例共用一套） */
  --series-1: #4d679b;
  --series-2: #12806f;
  --series-3: #b8802a;
  --series-4: #6f5bd0;
  --series-5: #b4485f;
  --series-6: #5b6c86;

  /* 语义色 */
  --ok-text:     #0b7a52;
  --ok-bg:       #e7f6ee;
  --ok-border:   #b6e0cd;
  --warn-text:   #a3620c;
  --warn-bg:     #fdf3e3;
  --warn-border: #f0d59f;
  --bad-text:    #b42318;
  --bad-bg:      #fef3f2;
  --bad-border:  #f8cdc8;
  --info-text:   #1d6b96;
  --info-bg:     #eaf4fb;
  --info-border: #bcdcf0;
  --neutral-text: #48546c;
  --neutral-bg:   #f1f4fa;
  --neutral-border: #dde3ee;

  /* —— 覆写底层 token（业务样式里大量引用这些变量，改这里收益最大） —— */
  --blue:        var(--brand-500);
  --blue-hover:  var(--brand-600);
  --blue-soft:   var(--brand-50);
  --ink:         var(--n-900);
  --muted:       var(--n-600);
  --line:        var(--n-200);
  --line-strong: var(--n-300);
  --bg:          #f4f6fa;
  --surface:     var(--n-0);
  --surface-muted: var(--n-50);
  --red:         var(--bad-text);
  --green:       var(--ok-text);
  --amber:       var(--amber-600);
  --sidebar:     244px;
}

/* ==========================================================================
   02 阴影与圆角
   双层阴影：一层紧贴的接触影 + 一层带负扩散的环境影，避免「灰边脏边」
   ========================================================================== */
:root {
  --sd-1: 0 1px 2px rgb(16 24 40 / 5%), 0 1px 3px -1px rgb(16 24 40 / 4%);
  --sd-2: 0 1px 2px rgb(16 24 40 / 4%), 0 8px 18px -10px rgb(16 24 40 / 14%);
  --sd-3: 0 2px 4px rgb(16 24 40 / 5%), 0 20px 40px -18px rgb(16 24 40 / 26%);
  --sd-brand: 0 8px 18px -8px rgb(48 68 116 / 45%);
  --sd-inset-top: inset 0 1px 0 rgb(255 255 255 / 75%);
  --ring: 0 0 0 3px rgb(77 103 155 / 16%);
  --ring-danger: 0 0 0 3px rgb(180 35 24 / 16%);

  --shadow-sm: var(--sd-1);
  --shadow-float: var(--sd-3);

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  --radius-control: var(--r-md);
  --radius-panel: var(--r-lg);

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

  --feedback: 200ms;
  --ease-out: cubic-bezier(.22, .8, .3, 1);

  /* —— 中间语义变量：供深色主题整体翻转（勿在业务 CSS 里直接写死这些颜色） —— */
  --surface-solid: #ffffff;      /* 卡片 / 弹层 / 输入框的实心底（原 #fff / #ffffff / white） */
  --surface-2:     #fbfcfe;      /* 表头、对话框头等次级面 */
  --surface-3:     #f7f9fd;      /* 三级面、按钮渐变端、大背景渐变中间色 */
  --shadow-ink-rgb: 16 24 40;    /* 阴影墨色（原 rgb(16 24 40 / N%) 里的三元组） */
  --overlay:       rgb(16 24 40 / 42%);  /* 遮罩层 */
}

/* ==========================================================================
   03 字体与排版
   ========================================================================== */
:root {
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

html, body {
  font-family: var(--font-sans);
}

body {
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  color: var(--n-900);
  letter-spacing: -0.015em;
  font-weight: 650;
}
h1 { font-size: 22px; line-height: 1.3; letter-spacing: -0.022em; }
h2 { font-size: 16px; }
h3 { font-size: 14.5px; }

p { line-height: 1.6; }

/* 数字统一等宽，金额/数量对齐才显得专业 */
table,
.tag,
.dashboard-today-count strong,
.md-number-value,
.grand-total,
.quote-totals,
.product-price,
.wd-money,
.md-widget,
.overview-dashboard {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ==========================================================================
   04 全局细节
   ========================================================================== */
::selection { background: var(--brand-100); color: var(--brand-800); }

* { scrollbar-width: thin; scrollbar-color: var(--n-300) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--n-300);
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--n-400); background-clip: content-box; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   05 应用框架
   ========================================================================== */
.workspace {
  background:
    radial-gradient(1100px 380px at 8% -8%, var(--surface-solid) 0%, rgb(255 255 255 / 0%) 62%),
    linear-gradient(180deg, var(--surface-3) 0%, var(--surface-3) 340px, var(--surface-3) 100%);
}

/* —— 侧栏 —— */
.sidebar {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%);
  border-right: 1px solid var(--n-200);
  box-shadow: 1px 0 0 rgb(var(--shadow-ink-rgb) / 2%);
  z-index: 20;
}

.sidebar .brand {
  padding: 20px 20px 18px;
  color: var(--brand-800);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar .brand small {
  color: var(--n-500);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.sidebar .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: var(--sd-brand), var(--sd-inset-top);
  font-size: 17px;
  font-weight: 700;
}

.sidebar nav { padding: 2px 12px 18px; }

.nav-section + .nav-section { margin-top: 20px; }
.nav-section > p {
  color: var(--n-500);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 11px 6px;
}

.sidebar .nav-item {
  position: relative;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--n-700);
  font-size: 13.5px;
  font-weight: 500;
  gap: 11px;
  transition: background-color var(--feedback) var(--ease-out),
              color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out);
}
.sidebar .nav-item svg { width: 18px; height: 18px; opacity: 0.85; }
.sidebar .nav-item:hover {
  background: var(--n-50);
  color: var(--brand-700);
  transform: none;
}
.sidebar .nav-item:hover svg { opacity: 1; }

.sidebar .nav-item.active {
  background: linear-gradient(90deg, var(--brand-50) 0%, rgb(239 243 251 / 30%) 100%);
  color: var(--brand-700);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgb(77 103 155 / 12%), 0 1px 2px rgb(var(--shadow-ink-rgb) / 4%);
}
.sidebar .nav-item.active svg { opacity: 1; color: var(--brand-600); }
.sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
}
.sidebar .nav-item:active { transform: scale(.985); }

.sidebar-foot {
  border-top: 1px solid var(--n-200);
  padding: 12px 16px 14px;
  color: var(--n-600);
  font-size: 12px;
}
.sidebar-foot .button {
  border-color: var(--n-200);
  color: var(--n-700);
  background: var(--n-0);
  border-radius: var(--r-sm);
}
.sidebar-foot .button:hover { background: var(--n-50); border-color: var(--n-300); }

/* —— 顶栏 —— */
.topbar {
  min-height: 66px;
  padding: 10px 24px;
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  border-bottom: 1px solid var(--n-200);
  box-shadow: 0 1px 0 rgb(var(--shadow-ink-rgb) / 2%);
  z-index: 15;
}

.menu-toggle,
.icon-button {
  border-radius: var(--r-sm);
  color: var(--n-600);
  transition: background-color var(--feedback) var(--ease-out),
              color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out);
}
.icon-button { padding: 7px; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover {
  background: var(--n-100);
  color: var(--brand-700);
  box-shadow: inset 0 0 0 1px rgb(var(--shadow-ink-rgb) / 4%);
}
.icon-button:active { transform: scale(.94); }

.workspace-location {
  font-size: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--n-200);
}
.workspace-location > span { color: var(--n-500); }
.workspace-location > strong { color: var(--n-800); font-weight: 650; }

.workspace-search {
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border-color: var(--n-200);
  background: rgb(247 249 253 / 90%);
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink-rgb) / 3%);
  transition: background-color var(--feedback) var(--ease-out),
              border-color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out);
}
.workspace-search:hover { background: var(--surface-solid); border-color: var(--n-300); }
.workspace-search:focus-within {
  background: var(--surface-solid);
  border-color: var(--brand-400);
  box-shadow: var(--ring), inset 0 1px 2px rgb(var(--shadow-ink-rgb) / 3%);
}
.workspace-search svg { color: var(--n-500); }
.workspace-search kbd {
  border-color: var(--n-300);
  border-radius: var(--r-xs);
  color: var(--n-500);
  padding: 1px 5px;
}
.workspace-search-results {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-3);
  padding: 6px;
  background: var(--surface-solid);
}
.workspace-search-result {
  border-radius: var(--r-sm);
  padding: 9px 10px;
}
.workspace-search-result:hover,
.workspace-search-result:focus-visible {
  background: var(--brand-50);
  color: var(--brand-700);
}

.environment, .account {
  border-radius: var(--r-md);
  transition: background-color var(--feedback) var(--ease-out);
}
.account { color: var(--n-700); }

.mobile-shade {
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ==========================================================================
   06 页面容器与标题
   ========================================================================== */
.operations-page,
.quote-workspace,
.stock-workspace,
.finance-workspace,
.orders-workspace,
.overview-dashboard,
.quote-workbench {
  padding: 22px 26px 40px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.page-head p { color: var(--n-600); font-size: 13px; margin-top: 4px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.dashboard-section-title h2 { font-size: 16px; font-weight: 700; }
.dashboard-section-title > span { color: var(--n-500); font-size: 12px; }

/* ==========================================================================
   07 面板与卡片
   ========================================================================== */
.panel,
.dashboard-panel,
.dashboard-today-item,
.dashboard-stat,
.operations-section,
.detail-section,
.quote-context,
.dp-section {
  background: var(--surface);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-1);
  transition: box-shadow var(--feedback) var(--ease-out),
              border-color var(--feedback) var(--ease-out);
}
.panel { border-radius: var(--r-lg); overflow: hidden; }
.panel-head,
.dashboard-panel > .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--n-200);
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%);
}
.panel-head h2, .panel-head h3 {
  font-size: 15px;
  font-weight: 650;
  color: var(--n-900);
  letter-spacing: -0.012em;
}
.panel-head-actions, .head-actions .button { gap: 6px; }
.panel-body { padding: 16px 18px; }
.panel-subtitle, .dashboard-panel-subtitle { color: var(--n-500); font-size: 12px; }

/* 悬浮态：卡片微微抬起，表达「可点/可取用」 */
.panel:has(.panel-head):hover,
.dashboard-panel:hover,
.dashboard-today-item:hover {
  box-shadow: var(--sd-2);
  border-color: var(--n-300);
}

/* ==========================================================================
   08 按钮与交互控件
   ========================================================================== */
.button {
  border: 1px solid var(--n-300);
  border-radius: var(--r-md);
  min-height: 36px;
  padding: 7px 14px;
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-3) 100%);
  color: var(--n-800);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  box-shadow: var(--sd-1), var(--sd-inset-top);
  transition: background-color var(--feedback) var(--ease-out),
              border-color var(--feedback) var(--ease-out),
              color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out);
}
.button:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-3) 100%);
  border-color: var(--n-400);
  color: var(--brand-700);
  box-shadow: var(--sd-2), var(--sd-inset-top);
  transform: none;
}
.button:active:not(:disabled) {
  background: var(--surface-3);
  box-shadow: inset 0 2px 4px rgb(var(--shadow-ink-rgb) / 8%);
  transform: translateY(1px);
}

.button.primary {
  background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-600);
  color: var(--surface-solid);
  box-shadow: var(--sd-brand), inset 0 1px 0 rgb(255 255 255 / 22%);
}
.button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
  border-color: var(--brand-700);
  color: var(--surface-solid);
  box-shadow: 0 10px 22px -10px rgb(48 68 116 / 55%), inset 0 1px 0 rgb(255 255 255 / 22%);
  transform: none;
}
.button.primary:active:not(:disabled) {
  background: var(--brand-700);
  box-shadow: inset 0 2px 5px rgb(var(--shadow-ink-rgb) / 24%);
  transform: translateY(1px);
}

.button.danger {
  color: var(--bad-text);
  border-color: var(--bad-border);
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--bad-bg) 100%);
}
.button.danger:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--surface-solid) 0%, #fde7e4 100%);
  border-color: #eda29a;
  color: #912018;
}

.button.text {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--brand-600);
  border-radius: var(--r-sm);
}
.button.text:hover:not(:disabled) {
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: none;
}
.button.text:active:not(:disabled) { background: var(--brand-100); }

.button.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12.5px;
  border-radius: var(--r-sm);
}

.button:disabled {
  background: var(--n-50);
  border-color: var(--n-200);
  color: var(--n-400);
  box-shadow: none;
  opacity: 1;
}
/* 报价篮按钮的禁用态不能被渐变色污染 */
.basket-open.button:disabled,
.button.primary:disabled {
  background: var(--n-50);
  border-color: var(--n-200);
  color: var(--n-400);
  box-shadow: none;
}

.button.working::before { border-width: 2px; opacity: .9; }

/* 分段 / 选项卡 / 分类胶囊 —— 统一成「轨道 + 浮起选中块」语言 */
.tabs,
.operations-tabs,
.catalog-nav,
.category-pills,
.calendar-tools,
.rep-monthbar,
.dashboard-metric-tabs,
.dashboard-detail-filter,
.dashboard-task-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--n-50);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink-rgb) / 3%);
}
.tabs button,
.operations-tabs button,
.catalog-nav button,
.category-pills button,
.calendar-tools button,
.dashboard-metric-tabs button,
.dashboard-detail-filter button,
.dashboard-task-filter button {
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 6px 13px;
  min-height: 32px;
  background: transparent;
  color: var(--n-600);
  font-size: 13px;
  font-weight: 550;
  transition: background-color var(--feedback) var(--ease-out),
              color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out);
}
.tabs button:hover,
.operations-tabs button:hover,
.catalog-nav button:hover,
.category-pills button:hover,
.calendar-tools button:hover {
  background: var(--surface-solid);
  color: var(--brand-700);
}
.tabs button.active,
.operations-tabs button.active,
.catalog-nav button.active,
.category-pills button.active,
.calendar-tools button.active,
.dashboard-metric-tabs button.active {
  background: var(--surface-solid);
  border-color: rgb(77 103 155 / 14%);
  color: var(--brand-700);
  font-weight: 650;
  box-shadow: var(--sd-1);
}

/* ==========================================================================
   09 表单控件
   ========================================================================== */
input,
select,
textarea {
  border: 1px solid var(--n-300);
  border-radius: var(--r-md);
  padding: 8px 11px;
  background: var(--surface-solid);
  color: var(--n-900);
  font-size: 13.5px;
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink-rgb) / 3%);
  transition: border-color var(--feedback) var(--ease-out),
              box-shadow var(--feedback) var(--ease-out),
              background-color var(--feedback) var(--ease-out);
}
input:hover, select:hover, textarea:hover { border-color: var(--n-400); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-400);
  box-shadow: var(--ring);
  outline: 0;
  background: var(--surface-solid);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--n-50);
  color: var(--n-500);
  border-color: var(--n-200);
  box-shadow: none;
}
input::placeholder, textarea::placeholder { color: var(--n-500); }
input[type="checkbox"] { accent-color: var(--brand-500); }
textarea { min-height: 86px; border-radius: var(--r-md); }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366738d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--n-600);
  letter-spacing: 0.02em;
}
.field b { color: var(--n-900); font-weight: 650; }
/* —— 密码显隐切换（field showToggle） —— */
.field-input-wrap { position: relative; display: block; }
.field-input-wrap > input { padding-right: 42px; }
.field-reveal {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--n-500); cursor: pointer;
  border-radius: var(--r-sm);
  transition: color var(--feedback) var(--ease-out), background-color var(--feedback) var(--ease-out);
}
.field-reveal:hover { color: var(--brand-700); background: var(--n-50); }
.field-reveal:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 1px; }
.field-reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
/* 「× 取消记住」比眼睛图标小一号，视觉重量收着点 */
.field-clear svg { width: 16px; height: 16px; }
.field-reveal .ic-eye-off { display: none; }
.field-reveal[aria-pressed="true"] .ic-eye { display: none; }
.field-reveal[aria-pressed="true"] .ic-eye-off { display: block; }
.form-error, .stock-error, .dw-feedback, .dp-feedback {
  color: var(--bad-text);
  font-size: 12.5px;
}

/* ==========================================================================
   10 表格
   ========================================================================== */
.table-scroll,
.md-table-scroll,
.wd-table-scroll,
.dw-table-scroll,
.dp-table-scroll,
.table-wrap {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
  overflow: auto;
}
.table-scroll table,
.md-table-scroll table,
.wd-table-scroll table,
.dw-table-scroll table,
.dp-table-scroll table,
.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--surface-2) 0%, #f5f7fc 100%);
  border-bottom: 1px solid var(--n-200);
  color: var(--n-600);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}
thead th:first-child { border-top-left-radius: var(--r-lg); }
thead th:last-child { border-top-right-radius: var(--r-lg); }

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--n-100);
  color: var(--n-800);
  font-size: 13.5px;
  vertical-align: middle;
}
tbody tr { transition: background-color 140ms var(--ease-out); }
tbody tr:nth-child(even) td { background: rgb(250 251 254 / 60%); }
tbody tr:hover td { background: var(--brand-50); }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--n-900); font-weight: 550; }

tfoot td {
  padding: 11px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--n-200);
  font-weight: 650;
}

.operations-thumb {
  border-radius: var(--r-sm);
  border: 1px solid var(--n-200);
  box-shadow: var(--sd-1);
}
.operations-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.operations-record-title { font-weight: 650; color: var(--n-900); }
.operations-next-action { color: var(--brand-600); font-weight: 600; }
.operations-results-bar { color: var(--n-600); font-size: 12.5px; }

/* ==========================================================================
   11 标签 · 徽标 · 提示
   ========================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--neutral-text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}
.tag.good, .tag.ok, .tag.success {
  background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text);
}
.tag.warn, .tag.warning, .tag.pending {
  background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text);
}
.tag.bad, .tag.danger, .tag.error {
  background: var(--bad-bg); border-color: var(--bad-border); color: var(--bad-text);
}
.tag.info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.tag.accent { background: var(--amber-50); border-color: var(--amber-100); color: var(--amber-700); }

.dashboard-state-dot, .md-status {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--series-1);
  box-shadow: 0 0 0 3px rgb(77 103 155 / 12%);
}
.dashboard-state-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.empty {
  padding: 34px 18px;
  color: var(--n-500);
  font-size: 13px;
  text-align: center;
  background:
    radial-gradient(60px 60px at 50% 30%, rgb(241 244 250 / 90%), transparent 70%);
}
.inline-notice,
.file-note,
.dp-note,
.md-widget-note,
.prep-w-stamp {
  border-radius: var(--r-md);
  border: 1px solid var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
  padding: 9px 12px;
  font-size: 12.5px;
}
.save-state { color: var(--n-500); font-size: 12px; }

/* ==========================================================================
   12 概览仪表盘重构
   逻辑：一级「今日经营」→ 二级「快捷入口」→ 三级「数据面板」
   ========================================================================== */
.overview-dashboard {
  --dashboard-positive-1: #e6ecf7;
  --dashboard-positive-2: #c4d3ea;
  --dashboard-positive-3: #8fa8d6;
  --dashboard-positive-4: #4d679b;
  --dashboard-negative-1: #fbeade;
  --dashboard-negative-2: #f3cdae;
  --dashboard-negative-3: #dd9f72;
  --dashboard-negative-4: #b87244;
}

/* 一级：今日经营三卡 */
.dashboard-today { margin-bottom: 18px; }
.dashboard-today-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-today-item {
  position: relative;
  overflow: hidden;
  padding: 16px 18px 15px;
  border-radius: var(--r-xl);
  box-shadow: var(--sd-2);
}
.dashboard-today-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
}
.dashboard-today-item:nth-child(2)::before { background: linear-gradient(90deg, var(--teal-500), var(--teal-300)); }
.dashboard-today-item:nth-child(3)::before { background: linear-gradient(90deg, var(--amber-500), var(--amber-300)); }
.dashboard-today-name {
  color: var(--n-600);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dashboard-today-name svg { color: var(--brand-500); }
.dashboard-today-name h3 { font-size: 13.5px; }
.dashboard-today-count strong { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: var(--n-900); white-space: nowrap; }
.dashboard-today-count span { color: var(--n-500); }
.dashboard-today-count:hover { color: var(--brand-700); text-decoration: none; }
.dashboard-today-flags button { color: var(--n-600); }
.dashboard-today-flags button:hover { color: var(--brand-700); text-decoration: none; }
.dashboard-today-flags .has-overdue { color: var(--bad-text); font-weight: 600; }
.dashboard-today-flags .has-unknown { color: var(--amber-700); font-weight: 600; }

/* 二级：快捷入口 */
.dashboard-shortcuts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--n-200);
  box-shadow: var(--sd-1);
  overflow: hidden;
  margin-bottom: 22px;
}
.dashboard-shortcut {
  min-height: 84px;
  padding: 14px 17px;
  background: var(--surface-solid);
  color: var(--n-700);
  transition: background-color var(--feedback) var(--ease-out),
              color var(--feedback) var(--ease-out);
}
.dashboard-shortcut:hover {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--brand-50) 100%);
  color: var(--brand-700);
  transform: none;
}
.dashboard-shortcut > svg { color: var(--brand-500); }
.dashboard-shortcut-arrow { color: var(--n-400); }
.dashboard-shortcut:hover .dashboard-shortcut-arrow { color: var(--brand-500); }

/* 三级：数据面板网格 */
.dashboard-stat-list,
.dashboard-capacity-grid,
.dashboard-analysis-grid,
.dashboard-state-panels,
.dashboard-upcoming,
.dashboard-warehouses,
.dashboard-tasks {
  display: grid;
  gap: 14px;
}
.dashboard-stat-list { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dashboard-analysis-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dashboard-capacity-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.dashboard-state-panels { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.dashboard-stat,
.dashboard-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
}
.dashboard-stat { padding: 14px 16px; }
.dashboard-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
}
.dashboard-stat:nth-child(4n+2)::before { background: linear-gradient(90deg, var(--teal-500), var(--teal-300)); }
.dashboard-stat:nth-child(4n+3)::before { background: linear-gradient(90deg, var(--amber-500), var(--amber-300)); }
.dashboard-stat:nth-child(4n+4)::before { background: linear-gradient(90deg, var(--series-4), #b3a6ea); }

.dashboard-panel { box-shadow: var(--sd-1); }
.dashboard-panel:hover { box-shadow: var(--sd-2); }
.dashboard-panel-subtitle { color: var(--n-500); }

/* 活动热力日历 */
.dashboard-heat-grid { gap: 4px; }
.dashboard-heat-cell {
  border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px rgb(var(--shadow-ink-rgb) / 4%);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.dashboard-heat-cell:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--brand-300);
  z-index: 2;
}
.dashboard-heat-summary, .dashboard-heat-legend, .dashboard-negative-legend { color: var(--n-600); font-size: 12px; }
.dashboard-legend-note, .dashboard-metric-note, .dashboard-table-note { color: var(--n-500); font-size: 12px; }

/* 构成条 */
.dashboard-composition { display: flex; flex-direction: column; gap: 8px; }
.dashboard-composition-total { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.dashboard-composition-bar {
  display: flex;
  height: 10px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--n-100);
  box-shadow: inset 0 1px 2px rgb(var(--shadow-ink-rgb) / 6%);
}

/* 重要数值与脚注 */
.md-number-value { font-size: 30px; font-weight: 700; letter-spacing: -0.028em; color: var(--n-900); white-space: nowrap; }
.grand-total { white-space: nowrap; }
.md-source-label, .md-table-note, .wd-footnote, .meta-more { color: var(--n-500); font-size: 12px; }

/* —— 中和 overview 页原有的「水波瓷蓝」主题，统一全站设计语言 —— */
.shell:has(.modular-overview) {
  --bg: #f4f6fa;
  --surface: var(--surface-solid);
  --surface-muted: var(--surface-3);
  --line: var(--n-200);
  --ink: var(--n-900);
  --muted: var(--n-600);
  --blue: var(--brand-500);
  --blue-hover: var(--brand-600);
  --blue-soft: var(--brand-50);
}
/* 直接覆盖 dashboard-builder.css 对 .workspace 的瓷蓝背景（其特异性更高，须在此同特异性覆盖） */
.shell:has(.modular-overview) .workspace {
  background:
    radial-gradient(1100px 380px at 8% -8%, var(--surface-solid) 0%, rgb(255 255 255 / 0%) 62%),
    linear-gradient(180deg, var(--surface-3) 0%, var(--surface-3) 340px, var(--surface-3) 100%);
  isolation: isolate;
}
.shell:has(.modular-overview) .workspace::before,
.shell:has(.modular-overview) .workspace::after { display: none !important; }
.shell:has(.modular-overview) .sidebar {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%);
  border-right-color: var(--n-200);
}
.shell:has(.modular-overview) .nav-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: var(--sd-1);
}

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sd-1);
  margin-bottom: 14px;
}
.md-grid { gap: 14px; }
.md-widget {
  padding: 16px 18px;
  border: 1px solid var(--n-200);
  border-bottom: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1), var(--sd-inset-top);
  transition: box-shadow var(--feedback) var(--ease-out), border-color var(--feedback) var(--ease-out);
}
.md-widget:hover { box-shadow: var(--sd-2), var(--sd-inset-top); border-color: var(--n-300); }
.md-widget.is-selected {
  border-color: var(--brand-400);
  box-shadow: var(--sd-2), 0 0 0 3px rgb(77 103 155 / 14%);
}
.md-widget.is-drop { outline: 2px dashed var(--brand-400); outline-offset: 3px; background: var(--brand-50); }
.md-widget.is-resizing { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.md-widget-head { margin-bottom: 10px; }
.md-widget-head h2 { font-size: 14.5px; font-weight: 650; color: var(--n-900); }
.md-widget-main { scrollbar-color: var(--n-300) transparent; }
.md-widget-controls, .md-widget > hr { border-color: var(--n-200); }
.md-add-panel {
  border: 2px dashed var(--n-300);
  border-radius: var(--r-lg);
  background: rgb(247 249 253 / 70%);
  color: var(--n-500);
  transition: border-color var(--feedback) var(--ease-out), background-color var(--feedback) var(--ease-out), color var(--feedback) var(--ease-out);
}
.md-add-panel:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700); }
.md-editor { border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--sd-3); background: var(--surface-solid); }

/* 图表：统一序列色与网格线 */
.md-chart text { fill: var(--n-600); font-size: 11.5px; }
.md-chart .md-chart-value { fill: var(--n-800); font-weight: 600; }
.md-chart .md-chart-grid { stroke: var(--n-100); stroke-width: 1; }
.md-chart .md-chart-zero { stroke: var(--n-300); }
.md-chart .md-line-segment { stroke: var(--series-1); stroke-width: 2.4; }
.md-chart .md-ring-hole { fill: var(--surface-solid); }
.md-chart .md-ring-total { fill: var(--n-900); font-weight: 700; }
.md-chart .md-negative { fill: var(--bad-text); }
.md-chart-legend { color: var(--n-600); margin-top: 8px; }
.md-chart-legend li { gap: 6px; }
.md-chart-legend .md-color-0,
.md-chart-legend .md-color-1,
.md-chart-legend .md-color-2,
.md-chart-legend .md-color-3,
.md-chart-legend .md-color-4,
.md-chart-legend .md-color-5 { border-radius: 3px; }

.md-series-0, .md-color-0 { --md-series-0: var(--series-1); }
.md-color-0 { background: var(--series-1) !important; fill: var(--series-1) !important; }
.md-color-1 { background: var(--series-2) !important; fill: var(--series-2) !important; }
.md-color-2 { background: var(--series-3) !important; fill: var(--series-3) !important; }
.md-color-3 { background: var(--series-4) !important; fill: var(--series-4) !important; }
.md-color-4 { background: var(--series-5) !important; fill: var(--series-5) !important; }
.md-color-5 { background: var(--series-6) !important; fill: var(--series-6) !important; }

.dashboard-metric-tabs { margin-bottom: 12px; }
.dashboard-activity-body { color: var(--n-700); font-size: 13px; }
.dashboard-day-detail { border: 1px solid var(--n-200); border-radius: var(--r-lg); background: var(--surface-solid); box-shadow: var(--sd-1); }
.dashboard-day-head { border-bottom: 1px solid var(--n-200); padding: 12px 14px; }
.dashboard-readiness { display: grid; gap: 10px; }

/* 员工工作台 / 准备办理 */
.employee-workdesk, .preparation-workdesk { display: grid; gap: 14px; }
.wd-heading { font-size: 15px; font-weight: 650; }
.wd-asof { color: var(--n-500); font-size: 12px; }
.wd-periods, .prep-w-filters, .wd-blockers { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-groups { gap: 14px; }
.wd-money { color: var(--amber-700); font-weight: 650; }
.wd-number, .md-number-value { color: var(--n-900); }

/* ==========================================================================
   13 业务页统一风格（报价 / 订单 / 库存 / 财务 / 客户 / 资产）
   ========================================================================== */
/* 报价步骤条 */
.quote-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin-bottom: 14px;
  background: rgb(255 255 255 / 90%);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-1);
}
.quote-steps > * {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: var(--r-md);
  padding: 7px 12px;
  color: var(--n-600);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  transition: background-color var(--feedback) var(--ease-out), color var(--feedback) var(--ease-out), box-shadow var(--feedback) var(--ease-out);
}
.quote-steps > *:hover { background: var(--n-50); color: var(--brand-700); }
.quote-steps > .active,
.quote-steps > [aria-current="step"],
.quote-steps > [data-active="true"] {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: var(--surface-solid);
  box-shadow: var(--sd-brand), inset 0 1px 0 rgb(255 255 255 / 22%);
}

.quote-context-bar,
.quote-basics,
.quote-meta,
.billing-context,
.header-next {
  border-radius: var(--r-md);
}
.quote-workbench { display: grid; gap: 14px; }
.quote-catalog,
.selection-extras,
.quote-lines,
.quote-basket {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
}
.catalog-toolbar,
.line-toolbar,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.catalog-toolbar { margin-bottom: 12px; }
.catalog-count, .catalog-pager, .operations-filter label { color: var(--n-600); font-size: 12.5px; }

/* 商品卡 */
.product-grid { gap: 12px; }
.product-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
  overflow: hidden;
  transition: box-shadow var(--feedback) var(--ease-out), border-color var(--feedback) var(--ease-out);
}
.product-card:hover { box-shadow: var(--sd-2); border-color: var(--n-300); }
.product-image {
  background: linear-gradient(160deg, var(--surface-3) 0%, #eef2f9 100%);
  border-bottom: 1px solid var(--n-100);
}
.image-missing {
  background: repeating-linear-gradient(135deg, #f4f6fb 0 8px, #eceff7 8px 16px);
  color: var(--n-500);
}
.product-name { font-weight: 650; color: var(--n-900); }
.product-zh { color: var(--n-500); font-size: 12px; }
.product-price { color: var(--amber-700); font-weight: 700; }
.total-detail, .discount-input, .deposit-reference { color: var(--n-600); font-size: 12.5px; }

/* 报价底部结算条 */
.quote-bottom,
.quote-action-bar {
  border-top: 1px solid var(--n-200);
  background: linear-gradient(180deg, var(--surface-2) 0%, #f6f8fc 100%);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.quote-totals { color: var(--n-700); font-size: 13px; }
.grand-total {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--n-900);
}
.quote-basket {
  position: relative;
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-3);
}
.basket-body { padding: 12px 14px; }
.basket-foot {
  border-top: 1px solid var(--n-200);
  background: var(--surface-2);
  padding: 12px 14px;
}
.quote-issues { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }

/* 需求 / 备货工作台 */
.dw-field, .dp-field { border-radius: var(--r-md); }
.dw-heading, .dp-section-head { font-size: 15px; font-weight: 650; }
.dw-counts, .dp-scope { color: var(--n-600); font-size: 12.5px; }
.dw-intake {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
}
.dw-drop {
  border: 2px dashed var(--n-300);
  border-radius: var(--r-lg);
  background: rgb(247 249 253 / 70%);
  color: var(--n-500);
}
.dw-drop.is-over, .dw-drop:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700); }
.dp-lock-grid { gap: 12px; }

/* 财务 / 客户 / 资产 */
.finance-accounts { display: grid; gap: 12px; }
.finance-accounts > * {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
  padding: 14px 16px;
}
.stock-query, .asset-scan-form, .scan-result { display: grid; gap: 10px; }
.operations-scan-note { color: var(--n-500); font-size: 12.5px; }
.check-label { color: var(--n-700); font-size: 13px; }

/* ==========================================================================
   14 排班模块
   ========================================================================== */
.rep-shell { background: var(--bg); }
.rep-nav {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%);
  border-right: 1px solid var(--n-200);
}
.rep-nav-user { color: var(--n-700); }
.rep-pool-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--n-500); }
.rep-person, .rep-persons { gap: 8px; }
.rep-button {
  border: 1px solid var(--n-300);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface-solid), var(--surface-3));
  color: var(--n-800);
  font-weight: 600;
  box-shadow: var(--sd-1);
}
.rep-button:hover { background: var(--surface-solid); border-color: var(--n-400); color: var(--brand-700); }
.rep-button:active { box-shadow: inset 0 2px 4px rgb(var(--shadow-ink-rgb) / 8%); }
.rep-monthbar { margin-bottom: 14px; }
.rep-main { padding: 18px 22px; }
.rep-grid {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--sd-1);
  overflow: hidden;
}
.rep-weekbar { background: linear-gradient(180deg, var(--surface-2), #f4f7fc); border-bottom: 1px solid var(--n-200); }
.rep-project-row, .rep-seat-row, .rep-leave-row { border-bottom: 1px solid var(--n-100); }
.rep-project-row:nth-child(even), .rep-seat-row:nth-child(even) { background: rgb(250 251 254 / 60%); }
.rep-project-row:hover, .rep-seat-row:hover { background: var(--brand-50); }
.rep-add-cell {
  border: 1px dashed var(--n-300);
  border-radius: var(--r-sm);
  color: var(--n-400);
  background: transparent;
  transition: border-color var(--feedback) var(--ease-out), background-color var(--feedback) var(--ease-out), color var(--feedback) var(--ease-out);
}
.rep-add-cell:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-600); }
.rep-grid .today { background: var(--brand-50) !important; box-shadow: inset 0 0 0 1px rgb(77 103 155 / 18%); }
.rep-recycle-bar { border-top: 1px solid var(--n-200); background: var(--surface-2); }
.rep-calendar-footer { color: var(--n-500); font-size: 12px; }
.rep-muted { color: var(--n-500); }

/* ==========================================================================
   15 登录页 —— 全页深色主视觉（表单与背景融合，无独立白块）
   ========================================================================== */
.login-screen {
  position: relative;
  isolation: isolate;
  /* 光晕装饰层居中后会在窄屏横向溢出，裁剪掉，避免整页出现横向滚动 */
  overflow-x: hidden;
  grid-template-columns: minmax(0, 1fr) clamp(440px, 34vw, 500px);
  background:
    /* 细噪点，消除大面积渐变的条带 */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    /* 点阵网格肌理 */
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 6%) 1px, transparent 0) 0 0 / 30px 30px,
    /* 极光光晕：品牌蓝 / 松石青 / 琥珀 */
    radial-gradient(46% 42% at 22% 18%, rgb(96 130 214 / 44%) 0%, rgb(96 130 214 / 0%) 60%),
    radial-gradient(40% 40% at 84% 24%, rgb(18 128 111 / 30%) 0%, rgb(18 128 111 / 0%) 60%),
    radial-gradient(56% 50% at 72% 98%, rgb(184 128 42 / 16%) 0%, rgb(184 128 42 / 0%) 60%),
    /* 主渐变基底 */
    linear-gradient(150deg, #17223a 0%, #1e2c4d 44%, #2a3d68 100%);
}
.login-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  left: 50%;
  top: -260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(126 154 232 / 26%) 0%, transparent 66%);
  filter: blur(10px);
  pointer-events: none;
}
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 88% 30%, rgb(0 0 0 / 26%) 0%, transparent 58%),
    linear-gradient(180deg, rgb(255 255 255 / 3%) 0%, transparent 22%);
  pointer-events: none;
}
.login-screen > * { position: relative; z-index: 1; }
/* 支持 clip 的浏览器改用 clip：不产生滚动容器，纵向仍由文档自然滚动 */
@supports (overflow: clip) {
  .login-screen { overflow-x: clip; overflow-y: visible; }
}

/* —— 左侧品牌文案 —— */
.login-intro {
  background: transparent;
  color: #fff;
  /* 左内边距加大：品牌文案整块向画面中间靠拢，与右侧登录板形成一组，
     右内边距收窄则让两者之间的空白不被拉大。 */
  padding: 72px clamp(28px, 3.5vw, 48px) 72px clamp(72px, 13vw, 188px);
}
.login-intro .brand { color: #fff; margin-bottom: 30px; }
.login-intro .brand-mark {
  background: rgb(255 255 255 / 16%);
  border: 1px solid rgb(255 255 255 / 28%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 32%), 0 8px 20px rgb(0 0 0 / 22%);
}
.login-intro h1 { color: #fff; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.28; }
.login-intro p { color: rgb(255 255 255 / 70%); font-size: 14px; line-height: 1.85; margin-top: 18px; max-width: 520px; }
/* 三步说明：胶囊 chips */
.login-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.login-steps span {
  font-size: 12px;
  color: rgb(255 255 255 / 82%);
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 15%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* —— 右侧表单：与背景融合，无卡片/白底 —— */
.login-side {
  padding: 40px clamp(20px, 2.4vw, 34px);
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  /* 表单靠这一列的左侧摆放：右侧留白更宽，整块登录板因此向画面中间靠拢，
     与左侧主视觉形成一组，而不是各贴一边、中间空一大片。 */
  justify-content: flex-start;
}
.login-form {
  width: 100%;
  max-width: 300px;   /* 只缩短输入框长度：336 → 300，其余尺寸保持上一版 */
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  /* 安全居中：内容比容器高时 margin-block:auto 收敛为 0，表单从顶部开始排，
     绝不会被 flex 居中对称顶出视口上沿（复选框/标签被裁的根因就是它） */
  margin-block: auto;
}
.login-form h2 { color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 22px; }

/* 标签与输入框：玻璃质感，两框等宽等高 */
.login-form .field { margin-bottom: 16px; }
.login-form .field > span { color: rgb(255 255 255 / 74%); font-weight: 600; }
.login-form input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 18%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%);
}
.login-form .field-input-wrap > input { padding-right: 42px; }
.login-form input::placeholder { color: rgb(255 255 255 / 40%); }
.login-form input:hover { border-color: rgb(255 255 255 / 30%); }
.login-form input:focus {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(126 154 232 / 90%);
  box-shadow: 0 0 0 3px rgb(126 154 232 / 26%);
  outline: 0;
}
.login-form .field-reveal { color: rgb(255 255 255 / 58%); }
.login-form .field-reveal:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.login-form .form-error { color: #ffb3b3; }

/* 主按钮：品牌渐变 + 浮起（与「客户商城」松石青明显区分） */
.login-form .button.primary {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 650;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #5a78c4 0%, #3f5da0 100%);
  box-shadow: 0 12px 26px rgb(40 66 128 / 46%), inset 0 1px 0 rgb(255 255 255 / 22%);
}
.login-form .button.primary:hover:not(:disabled) { filter: brightness(1.06); }
.login-form .button.primary:active:not(:disabled) { transform: translateY(1px); }

/* 一键登录：Ghost 次级按钮（深色玻璃基线，浅色由 theme.css token 接管） */
.login-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  margin-top: 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 7%);
  color: rgb(255 255 255 / 72%);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--feedback) var(--ease-out),
    background-color var(--feedback) var(--ease-out),
    border-color var(--feedback) var(--ease-out);
}
.login-quick:hover:not(:disabled) {
  color: #fff;
  border-color: rgb(255 255 255 / 30%);
  background: rgb(255 255 255 / 12%);
}
.login-quick:disabled { opacity: 0.6; cursor: default; }
.login-quick-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgb(255 255 255 / 58%);
}

/* 次级操作链接（浅色） */
.login-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; }
.login-form .login-link {
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 72%);
  font-size: 12.5px;
  padding: 0;
  cursor: pointer;
  transition: color var(--feedback) var(--ease-out);
}
.login-form .login-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.login-signup { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: rgb(255 255 255 / 58%); }

/* 底部：状态 + 客户商城按钮 */
.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 11.5px;
  color: rgb(255 255 255 / 55%);
}
.login-env { display: inline-flex; align-items: center; gap: 7px; }
.login-env::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 3px rgb(184 128 42 / 16%);
}
/* 客户商城：松石青按钮，与登录（靛蓝）明显区分 */
.shop-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: #eafaf5;
  background: rgb(18 128 111 / 26%);
  border: 1px solid rgb(45 190 160 / 60%);
  white-space: nowrap;
  transition: background-color var(--feedback) var(--ease-out), border-color var(--feedback) var(--ease-out), color var(--feedback) var(--ease-out);
}
.shop-button:hover { background: rgb(18 128 111 / 42%); border-color: rgb(45 190 160 / 85%); color: #fff; text-decoration: none; }

/* 中等屏 */
@media (max-width: 1024px) {
  .login-screen { grid-template-columns: minmax(0, 1fr) clamp(420px, 44vw, 440px); }
  /* 中屏同样保持"向中间靠拢"：左内边距放大、右内边距收窄 */
  .login-intro { padding: 56px clamp(24px, 3.5vw, 40px) 56px clamp(48px, 10vw, 104px); }
  .login-intro h1 { font-size: 28px; }
}
/* 平板 / 手机：单列堆叠 */
@media (max-width: 820px) {
  .login-screen { display: block; }
  .login-intro { padding: 40px 24px 26px; }
  .login-intro p, .login-steps { display: none; }
  .login-intro h1 { font-size: 25px; }
  .login-side { padding: 24px 20px 44px; }
  .login-form { max-width: 300px; margin: 0 auto; }
  .login-side .login-form { margin-block: 0; } /* 单列布局不居中时不需要安全边距 */
}

/* ==========================================================================
   16 响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .dashboard-today-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .operations-page,
  .quote-workspace,
  .stock-workspace,
  .finance-workspace,
  .orders-workspace,
  .overview-dashboard,
  .quote-workbench { padding: 16px 14px 32px; }
  .topbar { padding: 8px 14px; }
  .dashboard-today-list { grid-template-columns: 1fr; }
  .dashboard-shortcuts { grid-template-columns: 1fr 1fr; }
  .rep-main { padding: 14px; }
}
@media (max-width: 640px) {
  .page-head h1 { font-size: 20px; }
  .dashboard-today-count strong { font-size: 23px; }
  .md-number-value { font-size: 23px; }
  .panel-head { padding: 12px 14px; }
  .panel-body { padding: 14px; }
  .button { min-height: 38px; }
  thead th, tbody td { padding: 10px 12px; }
  .quote-bottom-actions { display: grid; gap: 8px; }
  .quote-bottom-actions .button { width: 100%; }
  .dashboard-shortcuts { grid-template-columns: 1fr; }
  .head-actions { width: 100%; }
}

/* ==========================================================================
   17 无障碍与降级
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .dashboard-heat-cell:hover { transform: none; }
}
@media (prefers-contrast: more) {
  :root { --line: #9aa5b8; --line-strong: #7c8799; --muted: #47536b; }
}

/* ==========================================================================
   18 补充细节：模态框 · 提示条 · 表单弹窗（沿用上述 token，统一设计语言）
   以下为「尚未覆盖」的系统组件，仅补全样式，不改动既有设计决策
   ========================================================================== */
/* —— 模态框（基于原生 <dialog>） —— */
.dialog {
  border: 0;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  border-radius: var(--r-xl);
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--sd-3);
  overflow: hidden;
}
.dialog.wide { width: min(960px, calc(100vw - 32px)); }
.dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--n-200);
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%);
}
.dialog-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.012em; }
.dialog-body { padding: 18px 20px 20px; overflow: auto; max-height: calc(100dvh - 132px); }
.close-dialog {
  border: 0;
  background: transparent;
  color: var(--n-600);
  font-size: 22px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  transition: background-color var(--feedback) var(--ease-out), color var(--feedback) var(--ease-out);
}
.close-dialog:hover { background: var(--n-50); color: var(--brand-700); }

/* —— 弹窗内表单 —— */
.record-form { display: block; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.field.span-2 { grid-column: 1 / -1; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.button.secondary {
  background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-3) 100%);
  border-color: var(--n-300);
  color: var(--n-800);
  box-shadow: var(--sd-1), var(--sd-inset-top);
}
.button.secondary:hover:not(:disabled) {
  border-color: var(--n-400);
  color: var(--brand-700);
  box-shadow: var(--sd-2), var(--sd-inset-top);
}
.button.cancel { color: var(--n-700); }
.password-feedback { display: block; color: var(--warn-text); font-size: 12px; margin-top: 4px; }

/* ==========================================================================
   19 本轮优化补充：设置页精简 · 全站排版基线 · 扫码登录占位
   ========================================================================== */
/* —— 权限与系统设置：去冗杂、统一层级（sub-task 3） —— */
#settings-content { padding-top: 2px; }
#settings-content .detail-section { margin-top: 20px; }
#settings-content .detail-section > h3 {
  font-size: 14px; font-weight: 650; color: var(--n-800);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--n-200);
}
#settings-content .detail-section + .detail-section { margin-top: 22px; }
#settings-content .table-scroll,
#settings-content .table-wrap { margin-top: 0; }
#settings-content .panel-body { padding-top: 4px; padding-bottom: 4px; }

/* —— 全站排版与栅格基线（sub-task 4） —— */
.page-head h1 { letter-spacing: -0.02em; }
.page-head p { margin-top: 4px; line-height: 1.55; color: var(--n-500); }
.panel + .panel,
section.panel + section.panel { margin-top: 18px; }
.detail-section { color: var(--n-700); }
.detail-section > h3 { font-size: 14px; font-weight: 650; color: var(--n-800); }
.empty { color: var(--n-500); }

/* —— 扫码登录占位（需服务端接入企业微信/微信开放平台，sub-task 2） —— */
.scan-login { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 6px 2px 2px; }
.scan-frame {
  position: relative;
  width: 168px; height: 168px; border-radius: var(--r-lg);
  border: 1px solid var(--n-200); background: var(--surface-solid);
  display: grid; place-items: center; color: var(--n-800);
  box-shadow: 0 10px 26px rgb(35 74 134 / 10%);
}
.scan-qr { width: 132px; height: 132px; fill: currentColor; opacity: 0.82; }
.scan-mark {
  position: absolute; inset: 0; margin: auto;
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-solid); border: 1px solid var(--n-200);
  color: var(--brand-600); font-size: 16px; font-weight: 700;
  box-shadow: 0 2px 8px rgb(35 74 134 / 12%);
}
.scan-tip { font-size: 12.5px; font-weight: 600; color: var(--n-500); }
.scan-login .file-note { text-align: left; max-width: 380px; }

/* —— 全局提示条（toast） —— */
#toast.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--n-200);
  background: var(--surface-solid);
  color: var(--n-800);
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: var(--sd-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--feedback) var(--ease-out), transform var(--feedback) var(--ease-out);
}
#toast.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.toast.success { border-color: var(--ok-border); background: var(--surface-solid); }
#toast.toast.success::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-text); box-shadow: 0 0 0 3px var(--ok-bg); }
#toast.toast.error { border-color: var(--bad-border); color: var(--bad-text); }
#toast.toast.error::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bad-text); box-shadow: 0 0 0 3px var(--bad-bg); }
#toast.toast.info { border-color: var(--info-border); }
#toast.toast.info::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--info-text); box-shadow: 0 0 0 3px var(--info-bg); }

/* —— 初始加载与空态装饰 —— */
.initial-loading { color: var(--n-500); }
.empty svg { opacity: .8; }

/* ==========================================================================
   20 「记住密码」风险说明弹窗
   —— 用 --n-* / --surface 等语义令牌，浅色与深色主题下都自动跟随
   ========================================================================== */
.remember-risk { display: grid; gap: 12px; max-width: 520px; }
.remember-risk p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.remember-risk strong { color: var(--ink); font-weight: 650; }
.remember-risk h4 {
  margin-top: 2px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--brand-600); text-transform: none;
}
.remember-risk ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.remember-risk li { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.remember-risk li strong { color: var(--ink); }
.remember-risk-foot {
  margin-top: 2px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--surface-muted); border: 1px solid var(--line);
  color: var(--muted) !important; font-size: 12.5px;
}
