/* 库存控制台样式系统 · 对齐「数据中心」TailAdmin 设计语言
 *
 * 这个文件由 app.css 的五层历史覆盖压平而来（.table 曾被定义 20 次、
 * .sidebar 6 次、:root 5 次），现在每个选择器只有一条规则。
 * 改样式请直接改对应规则，不要在文件末尾追加覆盖层——那正是上一版
 * 让 .result-metric-strip 丢掉 display:grid、执行详情页塌掉的原因。
 */
/* ==========================================================================
 * 设计 token · Apple
 *
 * Values are Apple's own: the #f5f5f7 ground and #1d1d1f ink apple.com uses,
 * the #0071e3 blue of its buttons, SF Pro's -0.022em heading tracking and
 * 1.47 body leading.  Depth comes from a hairline and a tint rather than a
 * shadow, and controls are pills, which is what makes the surface read as
 * Apple's rather than as a generic light theme.
 * ======================================================================== */
:root {
  /* ---- 主色 ---- */
  --brand: #0071e3;
  --brand-600: #0077ed;
  --brand-700: #006edb;
  --brand-300: #8ac2ff;
  --brand-100: #d2e7ff;
  --brand-50: #f0f7ff;
  --link: #06c;
  /* ---- 中性 ---- */
  --paper: #f5f5f7;
  --card: #ffffff;
  --line: #d2d2d7;
  --line-soft: #ebebed;
  --line-strong: #c7c7cc;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #86868b;
  /* ---- 侧栏：macOS 边栏的浅色半透明，靠模糊而不是深色块分隔 ---- */
  --ink: #fbfbfd;
  --ink-2: #f0f0f2;
  --ink-3: #e8e8ed;
  --sidebar-text: #1d1d1f;
  --sidebar-muted: #6e6e73;
  /* ---- 语义色（Apple system colors） ---- */
  --ok: #1d9d4e;
  --ok-soft: #e8f8ed;
  --warn: #f56300;
  --warn-soft: #fff4e5;
  --warn-ink: #9a4c00;
  --danger: #d70015;
  --danger-soft: #ffeff0;
  --danger-ink: #b3000f;
  --brass: #f56300;
  --brass-ink: #9a4c00;
  /* ---- 圆角：卡片大圆角，控件全圆 ---- */
  --radius: 1.125rem;
  --radius-sm: .75rem;
  --radius-lg: 1.375rem;
  --radius-pill: 61.25rem;
  /* ---- 阴影：几乎不用；分隔靠 hairline 与底色 ---- */
  --shadow-xs: none;
  --shadow-sm: 0 1px .125rem rgba(0,0,0,.04);
  --shadow-md: 0 .25rem 1rem rgba(0,0,0,.06);
  --shadow-lg: 0 .625rem 2.5rem rgba(0,0,0,.08);
  --shadow-xl: 0 1.25rem 3.75rem rgba(0,0,0,.10);
  /* ---- 动效：Apple 的标准缓动，按压回弹 ---- */
  --ease: cubic-bezier(.25,.1,.25,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --sidebar-width: 15.5rem;
  /* ---- 旧变量名保留为别名 ---- */
  --bg: var(--paper);
  --surface: var(--card);
  --surface-solid: var(--card);
  --surface-soft: var(--line-soft);
  --blue: var(--brand);
  --blue-hover: var(--brand-600);
  --blue-soft: var(--brand-50);
  --success: var(--ok);
  --warning: var(--warn-ink);
  --focus: rgba(0,113,227,.4);
  --shadow: var(--shadow-xs);
  --shadow-hover: var(--shadow-md);
  --v3-blue: var(--brand);
  --v3-blue-strong: var(--brand-700);
  --v3-navy: var(--ink);
  --v3-surface: var(--card);
  --v3-subtle: var(--line-soft);
  --v3-line: var(--line);
  --v3-text: var(--text);
  --v3-muted: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
/* Reserve the scrollbar's width whether or not the page scrolls, so a header's
   buttons sit at the same offset on a short page as on a long one instead of
   shifting 15px between them. */
/* Every length below is in rem, so this one value scales the whole console.
   Up to a 1600px-wide window it is the browser default and nothing changes;
   past that it grows with the window - about 108% at 1920px, 125% at 2560px,
   capped at 150% - so a large monitor shows the same layout larger instead
   of small text in a narrow column with wide empty margins either side. */
html { min-width: 320px; background: var(--bg); font-size: clamp(16px, calc(9.333px + .4167vw), 24px); scrollbar-gutter: stable; }
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: 1rem; padding: .625rem .875rem; border-radius: .625rem; background: var(--text); color: #fff; white-space: nowrap; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.brand span:last-child { display: grid; gap: .125rem; }
.navigation a { padding: .6875rem .875rem; border-radius: .75rem; color: #4a4a4f; font-size: .95rem; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.navigation a:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.navigation a[aria-current="page"] { background: var(--surface-solid); box-shadow: 0 1px 5px rgba(0,0,0,.05); color: var(--text); font-weight: 600; }
.nav-group-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: .625rem .875rem; border: 0; border-radius: .75rem; background: transparent; color: #4a4a4f; cursor: pointer; font: inherit; font-size: .95rem; text-align: left; }
.nav-group-toggle:hover { background: rgba(0,0,0,.04); color: var(--text); }
.nav-group.is-open .nav-group-links { display: grid; }
.page-header .muted { margin-bottom: 0; }
.small { font-size: .88rem; line-height: 1.55; }
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); background: var(--card); }

.form-hint { margin: -.375rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { margin-top: auto; font-size: 2.15rem; letter-spacing: -.02em; }
.metric-card small { line-height: 1.4; }
.status-good { color: var(--success); font-size: 1.4rem !important; }
.empty-state { padding: clamp(1.875rem, 5vw, 3.625rem); }
.empty-state p:not(.eyebrow) { max-width: 38.75rem; color: var(--muted); line-height: 1.65; }

.auth-layout { display: grid; min-height: 100vh; place-items: center; padding: clamp(1.125rem, 4vw, 3.375rem); background: #f5f5f7; }
.auth-main { width: min(100%, 73.75rem); }
.auth-main.career-login-page { width: 100%; max-width: none; }
.career-login-visual::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 1.625rem 1.625rem; content: ""; mask-image: linear-gradient(to bottom, rgba(0,0,0,.3), transparent 72%); pointer-events: none; }
.career-login-visual::after { position: absolute; width: min(68vw, 43.75rem); height: min(68vw, 43.75rem); right: -28%; bottom: -45%; border-radius: 50%; background: rgba(255,255,255,.18); box-shadow: 0 0 0 80px rgba(255,255,255,.06), 0 0 0 160px rgba(255,255,255,.035); content: ""; filter: blur(2px); pointer-events: none; }
.career-login-brand, .career-login-characters, .career-login-legal { position: relative; z-index: 1; }
.inventory-character { position: absolute; bottom: 0; display: block; padding: 0; transform-origin: bottom center; transition: transform 700ms ease-in-out, height 700ms ease-in-out; will-change: transform, height; }
.inventory-character-purple { z-index: 1; left: 12.727%; width: 32.727%; height: 25rem; border-radius: .625rem .625rem 0 0; background: #6c3ff5; }
.inventory-character-charcoal { z-index: 2; left: 43.636%; width: 21.818%; height: 19.375rem; border-radius: .5rem .5rem 0 0; background: #2d2d2d; }
.inventory-character-coral { z-index: 3; left: 0; width: 43.636%; height: 12.5rem; border-radius: 7.5rem 7.5rem 0 0; background: #ff9b6b; }
.inventory-character-yellow { z-index: 4; left: 56.364%; width: 25.454%; height: 14.375rem; border-radius: 4.375rem 4.375rem 0 0; background: #e8d754; }
.inventory-character-eyes { position: absolute; display: flex; transition: left 700ms ease-in-out, top 700ms ease-in-out; }
.inventory-character-purple .inventory-character-eyes { left: 2.8125rem; top: 2.5rem; gap: 2rem; }
.inventory-character-charcoal .inventory-character-eyes { left: 1.625rem; top: 2rem; gap: 1.5rem; }
.inventory-character-coral .inventory-character-eyes { left: 5.125rem; top: 5.625rem; gap: 2rem; transition-duration: 200ms; transition-timing-function: ease-out; }
.inventory-character-yellow .inventory-character-eyes { left: 3.25rem; top: 2.5rem; gap: 1.5rem; transition-duration: 200ms; transition-timing-function: ease-out; }
.inventory-eye { display: grid; width: 1.125rem; height: 1.125rem; place-items: center; overflow: hidden; border-radius: 50%; background: #fff; transition: height 150ms ease; }
.inventory-eye i { display: block; width: .4375rem; height: .4375rem; border-radius: 50%; background: #2d2d2d; transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px)); transition: transform 100ms ease-out; }
.inventory-character-charcoal .inventory-eye { width: 1rem; height: 1rem; }
.inventory-character-charcoal .inventory-eye i { width: .375rem; height: .375rem; }
.inventory-pupil { display: block; width: .75rem; height: .75rem; }
.inventory-pupil i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #2d2d2d; transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px)); transition: transform 100ms ease-out; }
.inventory-character.is-blinking .inventory-eye { height: .125rem; }
.inventory-character-mouth { position: absolute; left: 2.5rem; top: 5.5rem; display: block; width: 5rem; height: .25rem; border-radius: 62.4375rem; background: #2d2d2d; transition: left 200ms ease-out, top 200ms ease-out; }
.career-login-mobile-brand { display: none; }
.career-password-wrap { position: relative; display: block; }
.career-password-toggle:hover { color: #fff; }
.career-password-toggle[aria-pressed="true"] { color: #fff; }
.career-login-submit > span { display: block; transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease; }
.career-login-submit:hover > span:first-child { opacity: 0; transform: translateX(3rem); }
.career-login-submit:hover .career-login-submit-hover { opacity: 1; transform: translateX(0); }
.career-login-submit:disabled { cursor: wait; opacity: .65; }
.career-login-submit:focus-visible { outline: 3px solid rgba(113,99,247,.75); outline-offset: 3px; }
.form-stack label small { color: var(--muted); font-weight: 400; }
input:hover { border-color: rgba(29,29,31,.3); }
input:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 4px var(--focus); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0,113,227,.2); }
fieldset { display: grid; gap: .625rem; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .625rem; font-weight: 600; }
.radio-row input { width: 1.125rem; min-height: 1.125rem; margin-right: .75rem; }
.radio-row span { display: grid; gap: .125rem; }
a:focus-visible { outline: 4px solid rgba(0,113,227,.35); outline-offset: 2px; border-radius: .25rem; }
.settings-card:last-child { grid-column: 1 / -1; }

.permission-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 0 .9375rem .9375rem; }
.permission-matrix label { display: grid; gap: .4375rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
.permission-matrix .button { align-self: end; }

.status-disabled, .status-removed { background: #f0f0f2; color: #6b6b70; }
.settings-disclosure summary { cursor: pointer; font-weight: 700; }

.task-summary-grid .settings-card:last-child { grid-column: auto; }
.text-link { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
.mobile-account-actions { display: none; }
.error-card p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.project-toolbar .project-filter-field { min-width: 0; }
.project-toolbar input, .project-toolbar select { min-height: 2.625rem; }
.project-filter-result { margin: 0; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.project-summary-card:hover { border-color: rgba(0,113,227,.22); box-shadow: 0 18px 46px rgba(0,113,227,.08); transform: translateY(-1px); }
.project-summary-card > div { display: grid; min-width: 0; gap: .375rem; }
.project-summary-card small { overflow: hidden; color: var(--muted); font-size: .78rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

/* Sections carry a margin-bottom from before these containers used grid gap,
   which now adds to it - 24-30px of air between sections where 14px was
   intended.  The gap owns the spacing inside these layouts; the same
   sections keep their margin on pages (business_sync, project_webhook) that
   place them directly in the content flow with no gap to inherit. */
body.app-layout .v2-project-layout > * { margin-bottom: 0; }

.action-row { display: flex; flex-wrap: wrap; gap: .75rem; padding: 1.25rem; border-top: 1px solid var(--line); }
.action-row { padding: 0; border: 0; }
.table-filter select { width: min(10.625rem, 100%); }
.table-filter input { flex: 1 1 13.75rem; min-width: 0; }
.clean-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.clean-list li:last-child { border-bottom: 0; }
.clean-list a:not(.button) { display: flex; width: 100%; justify-content: space-between; gap: 1.125rem; text-decoration: none; }

pre { overflow-x: auto; margin: 0; padding: .9375rem; border-radius: .75rem; background: #f5f5f7; white-space: pre-wrap; word-break: break-word; }

.dedup-toolbar .dedup-filter-field { min-width: 0; }
.dedup-toolbar input, .dedup-toolbar select { min-height: 2.625rem; }
.dedup-filter-result { margin: 0; white-space: nowrap; }
.dedup-new-panel[hidden], .dedup-rule-detail[hidden] { display: none !important; }
.dedup-rule-section > .section-heading { margin: .25rem 0 0; }
.dedup-rule-list { display: grid; gap: .875rem; }
.dedup-rule-card.is-expanded { border-color: rgba(0,113,227,.32); box-shadow: 0 18px 46px rgba(0,113,227,.09); }
.dedup-rule-summary > div { display: grid; min-width: 0; gap: .3125rem; }
.dedup-rule-identity small, .dedup-rule-summary small { overflow: hidden; color: var(--muted); font-size: .76rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.dedup-cell-label { color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: 0; }
.dedup-rule-detail-toggle span { display: inline-block; margin-left: .3125rem; transition: transform 160ms ease; }
.dedup-rule-card.is-expanded .dedup-rule-detail-toggle span { transform: rotate(180deg); }
.dedup-detail-pane h3, .dedup-rule-edit h3 { margin: 0 0 .75rem; font-size: .98rem; }
.dedup-detail-pane .definition-list div { padding: .5625rem 0; font-size: .84rem; }
.dedup-rule-edit { gap: .75rem; }
.dedup-rule-edit label { font-size: .8rem; }
.dedup-rule-edit input, .dedup-rule-edit select { min-height: 2.5rem; }
.dedup-rule-actions { padding: 0 1.375rem 1.25rem; }
.dedup-safety-details summary { padding: 1.25rem 0; cursor: pointer; font-size: .92rem; font-weight: 650; }
.dedup-safety-details .clean-list { padding-bottom: .875rem; }
.dedup-safety-details .clean-list li { padding: .625rem 0; }
.wide-project-list { grid-template-columns: 1fr; }
.wide-project-list .card { min-height: 8.125rem; }
.v2-project-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1.25rem; }
.v2-project-layout > * { grid-column: 1 / -1; }
.v2-project-layout > .v2-detail-section { min-width: 0; margin: 0; }
.v2-project-layout > .v2-detail-section:first-child, .v2-project-layout > .v2-detail-section:last-child { grid-column: 1 / -1; }

.text-link { color: var(--blue); font-size: .8rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

.console-navigation a { display: flex; min-height: 2.375rem; align-items: center; gap: .625rem; padding: .5rem .625rem; border: 1px solid transparent; border-radius: .5625rem; color: var(--sidebar-text); font-size: .82rem; font-weight: 400; letter-spacing: 0; }
.console-navigation a:hover { background: rgba(0,0,0,.05); color: var(--text); }
.console-navigation a[aria-current="page"] { background: rgba(0,113,227,.12); color: var(--brand); font-weight: 600; box-shadow: none; border-radius: .5625rem; border-color: transparent; }
.nav-icon { width: 1.25rem; flex: 0 0 1.25rem; font-size: 1.02rem; text-align: center; }
.sidebar-collapse { display: flex; width: 100%; min-height: 2.375rem; align-items: center; gap: .625rem; margin-top: auto; padding: .5rem .625rem; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; font-size: .7rem; text-align: left; }
.sidebar-collapse:hover { color: #fff; }
.sidebar-collapse i { width: 1.25rem; font-size: 1rem; text-align: center; }
.sidebar-collapsed .brand span:last-child, .sidebar-collapsed .console-navigation a span, .sidebar-collapsed .sidebar-collapse span, .sidebar-collapsed .sidebar-footer { display: none; }
.sidebar-collapsed .brand { justify-content: center; margin-right: 0; margin-left: 0; }
.sidebar-collapsed .console-navigation a, .sidebar-collapsed .sidebar-collapse { justify-content: center; padding-right: .5rem; padding-left: .5rem; }
.utility-bar { position: sticky; z-index: 30; top: 0; display: flex; min-height: 3.625rem; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 0 -1.25rem 1.125rem; padding: 0 1.25rem; border-bottom: 1px solid var(--v3-line); background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.utility-context { overflow: hidden; color: #344054; font-size: .75rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.utility-links { display: flex; align-items: center; gap: .4375rem; }
.utility-links a { display: inline-flex; min-height: 2rem; align-items: center; gap: .375rem; padding: .375rem .5625rem; border-radius: .375rem; color: #475467; font-size: .68rem; font-weight: 650; text-decoration: none; }
.utility-links a:hover { background: #f1f4f9; color: #1d2939; }
.utility-links i { font-size: .9rem; }
.card, .panel, .section-card, .settings-card { background: var(--v3-surface); border-radius: var(--radius); box-shadow: var(--shadow-xs); border-color: var(--line); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(47,103,232,.22); outline-offset: 1px; }
tbody tr:hover { background: #f7f9fc; }
.status-pill, .status-badge { border-radius: .3125rem; box-shadow: none; font-size: .61rem; }
.metric-strip { border-radius: .4375rem; box-shadow: none; }
html, body { background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; background: var(--bg); line-height: 1.5; }
h1 { margin-bottom: .5rem; font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.12; letter-spacing: 0; }
h2 { margin-bottom: .5rem; letter-spacing: 0; font-size: 1.22rem; line-height: 1.3; }
h3 { color: var(--text); }
p { line-height: 1.65; }
code { overflow-wrap: anywhere; color: #344054; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; }
.app-layout { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.mobile-topbar, .sidebar-backdrop { display: none; }
.navigation { display: grid; gap: .4375rem; }
.navigation > a, .nav-group-toggle { min-height: 2.5rem; padding: .5625rem .75rem; border-radius: .5625rem; color: var(--sidebar-text); font-size: .86rem; font-weight: 400; }
.navigation > a:hover, .nav-group-toggle:hover { background: rgba(0,0,0,.05); color: var(--text); }
.navigation > a[aria-current="page"] { background: rgba(0,113,227,.12); color: var(--brand); font-weight: 600; box-shadow: none; border-radius: .5625rem; border-color: transparent; }
.nav-group { display: grid; gap: .3125rem; }
.nav-group-links { display: none; gap: .125rem; padding: .125rem 0 .125rem .75rem; margin-left: .875rem; border-left: 1px solid var(--line); }
.nav-group-links a { min-height: 2.375rem; padding: .5625rem .75rem; color: #98a2b3; font-size: .84rem; }
.nav-group-links a:hover { background: rgba(0,0,0,.05); color: var(--text); }
.nav-group-links a[aria-current="page"] { background: rgba(0,113,227,.1); color: var(--brand); font-weight: 500; box-shadow: none; }
.nav-caret { transition: color 160ms ease; display: inline-block; color: var(--muted-2); font-size: .7rem; font-weight: 400; }
.sidebar-footer { margin-top: .25rem; padding: .875rem .5rem 0; border-top: 1px solid var(--line-soft); }
.sidebar-footer .button-quiet { min-height: 2.125rem; font-size: .78rem; width: 100%; color: var(--muted); }
.sidebar-footer .button-quiet:hover { background: rgba(0,0,0,.05); color: var(--text); }
.workspace { min-width: 0; position: relative; max-width: none; margin: 0; color: var(--v3-text); width: min(100%, 96.25rem); padding: 2.375rem clamp(1.5rem, 3.4vw, 3.375rem) 4.5rem; }
.page-header > div:first-child { min-width: 0; }
.page-header .action-row { margin-left: auto; }
.muted { color: var(--muted); }
.card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel { border: 1px solid var(--line); background: var(--surface); margin-bottom: 1rem; padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.card:hover, .panel:hover { border-color: #d8e0ec; }
.section-heading { margin-bottom: 1.125rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin: 1.75rem 0 .875rem; }
.section-heading h2 { margin-bottom: .25rem; }
.section-heading p { margin-bottom: 0; }
.section-card, .settings-card { overflow: hidden; }
.section-card { margin-top: 1.25rem; padding: 1.5rem; }

input { width: 100%; min-height: 2.875rem; border: 1px solid rgba(29,29,31,.17); border-radius: .75rem; background: #fff; color: var(--text); outline: none; transition: border-color 140ms ease, box-shadow 140ms ease; padding: .5625rem .75rem; }
input::placeholder { color: #98a2b3; }
input:hover, select:hover { border-color: #98a2b3; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 4px var(--focus); }
input:disabled, select:disabled { cursor: not-allowed; background: #f2f4f7; color: #98a2b3; }
.form-card { max-width: 47.5rem; padding: 1.75rem; }

.radio-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; padding: .8125rem; border: 1px solid var(--line); min-height: 3.625rem; border-color: var(--line); border-radius: .75rem; background: var(--surface-soft); }
.radio-row:has(input:checked) { border-color: var(--brand-300); background: var(--blue-soft); }
.radio-row { cursor: pointer; }
.radio-row:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.radio-row-note { flex: none; margin-left: auto; padding: .125rem .5rem; border-radius: var(--radius-pill); background: var(--line-soft); color: var(--muted); font-size: .75rem; font-style: normal; white-space: nowrap; }
.check-row { display: flex !important; align-items: flex-start; gap: .75rem; cursor: pointer; }
.check-row input { flex: none; width: 1.125rem; min-height: 1.125rem; margin-top: .125rem; }
.check-row span { display: grid; gap: .125rem; }
.check-row small { color: var(--muted); font-size: .75rem; font-weight: 400; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .625rem; }
/* Order the row the way Apple orders a toolbar: navigation first, then the
   ordinary actions, then the primary one, with anything destructive pushed
   out to its own end so it is never the neighbour of a benign button. */
/* Order applies to the row's own children, so a button wrapped in a form or
   a <details> has to be ordered by its wrapper, not by itself. */
.action-row > * { order: 1; }
.action-row > .button-quiet { order: 0; }
.action-row > .button-primary, .action-row > form:has(.button-primary) { order: 2; }
.action-row > .button-danger, .action-row > form:has(.button-danger) { order: 3; margin-left: .875rem; }
.action-row form { margin: 0; }
.text-link, .copy-id { color: var(--blue); font-weight: 650; text-decoration: none; }
.text-link:hover, .copy-id:hover { text-decoration: underline; }
.alert-error { border-color: #fecdca; background: #fff4f2; color: var(--danger); }
.alert-warning { border-color: #fedf89; background: #fffaeb; color: #93370d; }
.status-pill { display: inline-flex; width: fit-content; align-items: center; min-height: 1.5rem; padding: .1875rem .625rem; border-radius: var(--radius-pill); background: rgba(0,0,0,.06); color: var(--muted); font-size: .74rem; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.status-normal { background: #ecfdf3; color: var(--success); }
.status-draft { background: var(--blue-soft); color: var(--brand-700); }
.status-needs_attention { background: #fff6ed; color: var(--warning); }
.status-disabled { background: #f2f4f7; color: #667085; }
.project-toolbar, .dedup-toolbar { padding: .875rem; }

.project-toolbar label { display: grid; gap: .375rem; color: #344054; font-size: .82rem; font-weight: 650; }

.project-summary-card { display: grid; grid-template-columns: minmax(14.375rem, 1.6fr) minmax(7.25rem, .72fr) minmax(8.125rem, .82fr) minmax(7.375rem, .7fr) auto; align-items: center; gap: 1.25rem; min-width: 0; overflow: hidden; position: relative; min-height: 7.375rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .875rem; background: #fff; box-shadow: 0 6px 18px rgba(16,24,40,.05); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.project-summary-card:hover, .project-summary-card:focus-visible { border-color: var(--brand-300); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.project-summary-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dedup-cell-label { color: #98a2b3; font-size: .7rem; font-weight: 700; letter-spacing: 0; }

.v2-project-layout { gap: .875rem; }
.v2-detail-section { padding: 0; overflow: hidden; }
.settings-disclosure summary, .dedup-safety-details summary { position: relative; padding: 1.125rem 1.25rem; cursor: pointer; font-weight: 700; list-style-position: inside; }
.settings-disclosure[open] summary { border-bottom: 1px solid var(--line); }

.definition-list { display: grid; gap: 0; margin: 0; }
/* Label and value stay a readable distance apart however wide the panel is:
   a flexible gap pushed them to opposite edges of an 800px column, which is
   further than the eye tracks between the two halves of one fact. */
.definition-list div { display: grid; grid-template-columns: minmax(6rem, 12.5rem) minmax(0, 1fr); gap: 1.25rem; min-height: 2.75rem; align-items: center; padding: .625rem 0; border-bottom: 1px solid var(--line-soft); }
.definition-list div:last-child { border-bottom: 0; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; text-align: left; color: var(--text); font-weight: 500; }

.clean-list { margin: 0; padding: 0; list-style: none; }
.clean-list li { display: flex; align-items: center; justify-content: space-between; gap: .875rem; padding: .6875rem 0; border-bottom: 1px solid var(--line); }
.dedup-target-grid, .dedup-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem; }
.dedup-safety-details { padding: 0 clamp(1.25rem, 3vw, 1.875rem); margin-top: 1.125rem; box-shadow: none; }
.copy-id { margin-left: .5rem; padding: .25rem .5rem; border-radius: .5rem; color: var(--blue); font: inherit; border: 0; background: transparent; cursor: pointer; font-size: .76rem; }

.table-scroll { overflow-x: auto; width: 100%; overflow: auto; }
table { font-size: .69rem; width: 100%; border-collapse: collapse; }
th, td { border-bottom-color: var(--v3-line); padding: .875rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #667085; font-size: .72rem; font-weight: 750; letter-spacing: 0; }
td { color: #344054; font-size: .84rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdff; }
td strong, td small { display: block; }
td small { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.45; }

.table-filter { display: flex; flex-wrap: wrap; gap: .625rem; margin: 0 0 1.125rem; border: 1px solid var(--line); border-radius: .875rem; padding: 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.detail-pagination { margin-top: 1rem; display: flex; justify-content: flex-end; gap: .625rem; padding: .875rem 1rem; }

.settings-card { display: grid; align-content: start; gap: 1.25rem; padding: 1.375rem; }
.settings-card > div:first-child { padding-bottom: .875rem; border-bottom: 1px solid var(--line); }

.account-create-form { display: grid; gap: 1.125rem; margin-top: 1rem; padding: 0 1rem 1rem; }

.metric-card { display: grid; gap: .5rem; min-height: 8.75rem; padding: 1.25rem; }
.task-summary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(18.75rem, .9fr); gap: .75rem; }
.task-summary-grid > * { border-color: var(--line); background: #f8fafc; }

.error-card { max-width: 40rem; margin: 8vh auto 0; padding: 2.125rem; text-align: center; }
.workspace.dashboard-page { max-width: none; overflow-x: hidden; width: min(100%, 96.25rem); margin: 0 auto; padding: 2rem clamp(1.5rem, 3.4vw, 3.375rem) 4.5rem; overflow: visible; }

.auth-layout.career-login-page { display: block; padding: 0; background: #f3f6fb; }
.career-login-shell { display: grid; min-height: 100vh; overflow: hidden; grid-template-columns: minmax(0, 1.08fr) minmax(27.5rem, .72fr); }
.career-login-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; overflow: hidden; justify-content: flex-start; padding: clamp(2.125rem, 5vw, 4.25rem); background: #101828; color: #fff; }
.career-login-visual::before, .career-login-visual::after { display: none; }
.career-login-brand { display: flex; align-items: center; gap: .5625rem; letter-spacing: 0; color: #fff; font-size: 1rem; }
.career-login-brand-mark { display: grid; place-items: center; color: #fff; font-family: Arial, sans-serif; font-weight: 800; line-height: 1; width: 2.375rem; height: 2.375rem; border-radius: .6875rem; background: var(--brand); box-shadow: 0 8px 20px rgba(37,99,235,.26); font-size: 1rem; transform: none; }
.career-login-intro { position: relative; z-index: 1; width: min(100%, 42.5rem); margin: auto 0; }
.career-login-intro .eyebrow { color: var(--brand-300); }
.career-login-intro h2 { max-width: 40rem; margin: 0 0 1.25rem; color: #fff; font-size: clamp(2.15rem, 4vw, 3.65rem); line-height: 1.12; letter-spacing: 0; }
.career-login-intro > p:not(.eyebrow) { max-width: 37.5rem; margin-bottom: 2.375rem; color: #b8c2d3; font-size: .98rem; }
.career-login-intro dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.career-login-intro dl div { min-height: 7.25rem; padding: 1.0625rem; border: 1px solid rgba(255,255,255,.12); border-radius: .8125rem; background: rgba(255,255,255,.045); }
.career-login-intro dt { color: #fff; font-size: 1rem; font-weight: 750; }
.career-login-intro dd { margin: .625rem 0 0; color: #98a2b3; font-size: .78rem; line-height: 1.55; }
.career-login-characters { position: relative; width: 34.375rem; max-width: 100%; height: 27.5rem; align-self: center; margin: auto 0 clamp(1.375rem, 6vh, 4rem); display: none !important; }
.career-login-legal { display: flex; gap: 1.75rem; font-size: .72rem; color: #98a2b3; }
.career-login-form-panel { display: grid; min-width: 0; min-height: 100vh; place-items: center; padding: 2.5rem; background: #f3f6fb; color: var(--text); }
.career-login-form { width: min(100%, 25.625rem); padding: 2.375rem; border: 1px solid var(--line); border-radius: 1.125rem; background: #fff; box-shadow: 0 24px 64px rgba(16,24,40,.12); }
.career-login-heading { margin-bottom: 1.75rem; text-align: left; }
.career-login-heading h1 { margin-bottom: .5rem; letter-spacing: 0; color: var(--text); font-size: 2rem; }
.career-login-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.career-login-fields { display: grid; gap: 1.125rem; }
.career-login-fields label { display: grid; gap: .5rem; font-weight: 600; color: #344054; font-size: .84rem; }
.career-login-fields input { min-height: 2.75rem; padding: .625rem .8125rem; border-color: var(--line-strong); border-radius: .625rem; background: #fff; color: var(--text); font-size: .88rem; }
.career-login-fields input::placeholder { color: #98a2b3; }
.career-login-fields input:hover { border-color: #98a2b3; }
.career-login-fields input:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 4px var(--focus); }
.career-password-wrap input { padding-right: 3.875rem; }
.career-password-toggle { position: absolute; top: 50%; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; transform: translateY(-50%); right: .625rem; width: auto; height: 1.875rem; padding: 0 .4375rem; border-radius: .4375rem; color: #475467; font-size: .74rem; font-weight: 650; }
.career-password-toggle:hover, .career-password-toggle[aria-pressed="true"] { background: #eef4ff; color: var(--brand-700); }
.career-password-toggle:focus-visible { outline: 2px solid #7163f7; outline-offset: 2px; outline-color: var(--blue); }
.career-login-submit { position: relative; margin-top: .25rem; overflow: hidden; border: 1px solid #28282b; color: #f9f9f9; cursor: pointer; font-weight: 650; transition: border-color 200ms ease, color 250ms ease, background-color 250ms ease; min-height: 2.75rem; border-color: var(--blue); border-radius: .625rem; background: var(--blue); font-size: .88rem; }
.career-login-submit:hover { border-color: var(--blue-hover); }
.career-login-submit .career-login-submit-hover { position: absolute; inset: 0; display: grid; place-items: center; gap: .5rem; color: #fafafa; opacity: 0; transform: translateX(-3rem); background: var(--blue-hover); }
.career-login-help { margin: 1.5625rem 0 0; text-align: center; color: var(--muted); font-size: .76rem; }
.career-login-alert { margin: 0 0 1.25rem; padding: .625rem .75rem; border: 1px solid rgba(255,112,112,.36); border-radius: .625rem; font-size: .78rem; line-height: 1.45; border-color: #fecdca; background: #fff4f2; color: var(--danger); }
.breadcrumbs a { color: #475467; text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs span[aria-current="page"] { overflow: hidden; color: #344054; text-overflow: ellipsis; white-space: nowrap; }
.entity-page-header { margin-bottom: 1.375rem; }
.entity-page-header h1 { max-width: 56.25rem; }
.title-with-status { display: flex; align-items: center; gap: .75rem; }
.title-with-status h1 { margin: 0; }
.alert { margin-bottom: 1.25rem; border: 1px solid rgba(0,113,227,.18); line-height: 1.45; padding: .8125rem .9375rem; border-color: var(--brand-100); background: var(--blue-soft); color: var(--brand-700); display: flex; align-items: flex-start; gap: .625rem; border-radius: .75rem; }
.alert > span { flex: 1; }
.alert-success { border-color: #abefc6; background: #ecfdf3; color: #067647; }
.alert-info { border-color: #b2ddff; background: #eff8ff; color: var(--brand-700); }
.list-overview { display: flex; min-height: 5.375rem; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: .875rem; padding: 1.125rem 1.375rem; border: 1px solid var(--line); border-radius: .875rem; background: linear-gradient(100deg, #101828 0, #18233a 100%); color: #fff; box-shadow: var(--shadow); }
.list-overview > div { display: flex; align-items: baseline; gap: .5625rem; white-space: nowrap; }
.list-overview strong { font-size: 2rem; letter-spacing: -.02em; }
.list-overview span { color: #d0d5dd; font-size: .82rem; }
.list-overview p { max-width: 41.25rem; margin: 0; color: #b8c2d3; font-size: .8rem; line-height: 1.65; text-align: right; }
.list-toolbar { margin-bottom: 1rem; box-shadow: none; }
.list-toolbar label { gap: .375rem; }
.list-toolbar label > span { color: #475467; font-size: .72rem; font-weight: 700; }
.entity-list { display: grid; gap: .75rem; }
.entity-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.375rem; align-items: center; padding: 1.375rem; border: 1px solid var(--line); border-radius: .9375rem; background: #fff; box-shadow: var(--shadow); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.entity-card[data-card-href] { cursor: pointer; }
.entity-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.entity-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.entity-card-main { min-width: 0; }
.entity-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.entity-card-title-row h2 { margin: .25rem 0 0; color: var(--text); font-size: 1.16rem; letter-spacing: 0; }
.entity-kicker { color: var(--blue); font-size: .68rem; font-weight: 750; letter-spacing: 0; text-transform: uppercase; }
.entity-facts { display: grid; grid-template-columns: repeat(4, minmax(6.875rem, 1fr)); gap: .5rem; margin-top: 1.125rem; }
.entity-facts > span { display: grid; gap: .25rem; padding-right: .875rem; border-right: 1px solid var(--line); }
.entity-facts > span:last-child { border-right: 0; }
.entity-facts small { color: var(--muted); font-size: .7rem; }
.entity-facts strong { color: #344054; font-size: .84rem; }
.entity-card-actions { position: relative; display: flex; align-items: center; gap: .5rem; }
.entity-card-actions > form { margin: 0; }
.inline-rename-action[open] > summary { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus); }

.entity-latest-run strong { color: var(--brand-700); }
.entity-latest-run em { overflow: hidden; color: var(--muted); font-size: .68rem; font-style: normal; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

.business-record-table td:nth-child(2) { min-width: 14.375rem; }
.business-record-table td strong, .business-record-table td small { display: block; }
.business-record-table td small { margin-top: .25rem; color: var(--muted); }
.record-result { display: inline-flex; padding: .3125rem .5rem; border-radius: 62.4375rem; background: #f2f4f7; color: #475467; font-size: .7rem; font-weight: 750; }
.record-result-updated, .record-result-deleted { background: #ecfdf3; color: #067647; }
.record-result-skipped, .record-result-write_unknown { background: #fffaeb; color: #b54708; }
.record-result-failed { background: #fef3f2; color: #b42318; }
.dedup-history-section { margin-top: 1.125rem; padding: 1.375rem; }
.dedup-run-list { display: grid; margin-top: .875rem; border-top: 1px solid var(--line); }
.dedup-run-row:hover { background: #f8fafc; }
.dedup-run-row > span:not(.run-feed-status) { display: grid; gap: .25rem; }
.dedup-run-row small { color: var(--muted); font-size: .68rem; }
.dedup-run-row strong { color: #344054; font-size: .8rem; }

.dedup-run-main strong { font-size: .86rem; }
.dedup-run-link { color: var(--blue); font-size: .74rem; font-weight: 750; white-space: nowrap; }

.compact-form { display: grid; gap: .625rem; }
.compact-form label { display: grid; gap: .375rem; color: #344054; font-size: .76rem; font-weight: 700; }

.status-removed { background: #f2f4f7; color: #475467; }
.status-succeeded, .status-done, .status-normal, .status-enabled, .status-active { background: #ecfdf3; color: #067647; }
.status-succeeded_with_warnings, .status-partial_write, .status-extracting { background: #fffaeb; color: #b54708; }
.status-failed, .status-timed_out, .status-concurrent_change { background: #fef3f2; color: #b42318; }
.status-running, .status-ocr_running { background: #eff8ff; color: var(--brand-700); }
.status-queued, .status-pending { background: #f4f3ff; color: #5925dc; }
.status-cancelled, .status-disabled { background: #f2f4f7; color: #475467; }
.empty-state-mark { display: block; margin-bottom: .75rem; color: #98a2b3; font-size: 2.2rem; font-weight: 800; }
.project-command-grid span { color: var(--muted); font-size: .72rem; }
.project-command-grid strong { color: var(--text); font-size: 1.16rem; }
.project-command-grid small { color: #667085; font-size: .7rem; }
.content-card-header p:not(.eyebrow) { max-width: 42.5rem; margin: .4375rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.content-card-header > a:not(.button), .content-card-header .text-button { color: var(--blue); font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.progress-badge { display: grid; min-width: 2.875rem; height: 1.875rem; place-items: center; border-radius: 62.4375rem; background: var(--blue-soft); color: var(--brand-700); font-size: .75rem; font-weight: 800; }
.workflow-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.workflow-steps li:not(:last-child)::after { position: absolute; top: 3.25rem; bottom: -.625rem; left: .9375rem; width: .125rem; background: #eaecf0; content: ""; }
.workflow-steps li > span:first-child { display: grid; z-index: 1; width: 1.875rem; height: 1.875rem; place-items: center; border: 1px solid #d0d5dd; border-radius: 50%; background: #fff; color: #667085; font-size: .72rem; font-weight: 800; }
.workflow-steps li.is-done > span:first-child { border-color: #12b76a; background: #ecfdf3; color: #067647; }
.workflow-steps li.is-current > span:first-child { border-color: var(--blue); background: var(--blue); color: #fff; }
.workflow-steps div { min-width: 0; }
.workflow-steps strong { display: block; color: #344054; font-size: .84rem; }
.workflow-steps p { margin: .25rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.workflow-steps a:not(.button), .workflow-steps .text-button, .step-state { color: var(--blue); font-size: .76rem; font-weight: 700; text-decoration: none; }
.text-button { padding: 0; border: 0; background: none; cursor: pointer; }
.compact-definition-list div { min-height: 2.5rem; padding: .5rem 0; }
.inline-empty { display: grid; justify-items: start; gap: .4375rem; padding: 1.125rem; border: 1px dashed #d0d5dd; border-radius: .75rem; background: #f9fafb; }
.inline-empty strong { color: #344054; font-size: .88rem; }
.inline-empty p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.run-feed { display: grid; }
.run-feed-item:first-child { border-top: 0; }
.run-feed-item:hover { background: #f8fafc; }
.run-feed-status { width: .5rem; height: .5rem; border-radius: 50%; background: #98a2b3; }
.run-feed-status.status-succeeded, .run-feed-status.status-done { background: #12b76a; }
.run-feed-status.status-succeeded_with_warnings, .run-feed-status.status-partial_write { background: #f79009; }
.run-feed-status.status-running, .run-feed-status.status-ocr_running { background: #2e90fa; }
.run-feed-status.status-failed, .run-feed-status.status-timed_out { background: #f04438; }
.run-feed-status.status-queued, .run-feed-status.status-pending { background: #7f56d9; }
.run-feed-main { display: grid; min-width: 0; gap: .1875rem; }
.run-feed-main strong { overflow: hidden; color: #344054; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.run-feed-main small, .run-feed-item time { color: var(--muted); font-size: .7rem; }
.run-feed-arrow { color: var(--blue); font-size: .74rem; font-weight: 700; }
.settings-disclosure { border: 1px solid var(--line); border-radius: .75rem; background: #f8fafc; padding: 0; overflow: visible; }
.settings-disclosure > summary { list-style: none; }
.settings-disclosure > summary::-webkit-details-marker { display: none; }
.settings-disclosure > summary span { display: grid; gap: .25rem; }
.settings-disclosure > summary small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.disclosure-body { padding: 1.125rem 1.25rem 1.25rem; }

.danger-zone, .removed-project-state { display: flex; align-items: center; justify-content: space-between; gap: 1.75rem; margin-top: .875rem; padding: 1.375rem; }
.danger-zone h2, .removed-project-state h2 { margin: .1875rem 0 .4375rem; color: var(--text); font-size: 1.05rem; }
.danger-zone p:not(.eyebrow), .removed-project-state p { max-width: 42.5rem; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.removed-project-state { border-color: #d0d5dd; background: #f9fafb; }
.content-lead { margin: 0 0 1.125rem; color: #475467; font-size: .82rem; line-height: 1.65; }

.retention-note { margin: 1.5rem 0 0; color: var(--muted); font-size: .72rem; text-align: center; }

.metric-strip { display: grid; gap: .75rem; }
.metric-strip article { display: grid; gap: .3125rem; padding: 1.125rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-soft); }
.metric-strip article > span { color: var(--muted); font-size: .72rem; font-weight: 650; }
.result-metric-strip article { display: flex; flex-direction: column; justify-content: center; gap: .375rem; min-height: 0; padding: .875rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-xs); }
.result-metric-strip article strong { color: var(--text); font-size: 1.4rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.result-metric-strip article small { color: var(--muted); font-size: .72rem; font-weight: 500; }

.change-chip { display: inline-flex; align-items: center; gap: .3125rem; margin: .125rem .375rem .125rem 0; padding: .3125rem .5rem; border-radius: .4375rem; background: #f2f4f7; font-size: .74rem; }
.detail-empty-state strong { color: #344054; font-size: 1rem; }
.detail-empty-state p { max-width: 42.5rem; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }

.technical-run-details summary { padding: .875rem 1rem; cursor: pointer; font-size: .78rem; font-weight: 700; }
.technical-run-details > div { padding: 0 1rem 1rem; color: var(--muted); font-size: .74rem; }
.one-time-secret { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17.5rem, .8fr); gap: 1.5rem; align-items: center; margin-bottom: .875rem; padding: 1.375rem; border: 1px solid #fedf89; border-radius: .875rem; background: #fffaeb; }
.one-time-secret h2 { margin: .125rem 0 .375rem; color: var(--text); font-size: 1.05rem; }
.one-time-secret p { margin: 0; color: #93370d; font-size: .78rem; }
.one-time-secret > div:last-child { display: grid; gap: .625rem; }
.one-time-secret code { overflow: auto; padding: .75rem; border-radius: .5rem; background: #fff; }
.schedule-card, .automation-card { margin-bottom: .875rem; }
.schedule-form-inline { display: grid; grid-template-columns: minmax(9.375rem, .8fr) minmax(9.375rem, .7fr) minmax(9.375rem, .7fr) auto; gap: .625rem; align-items: end; }
.schedule-form-inline label { display: grid; gap: .375rem; color: #475467; font-size: .72rem; font-weight: 700; }

.numbered-instructions { display: grid; gap: 1.125rem; margin: 0; padding: 0; list-style: none; }
.numbered-instructions li { display: grid; grid-template-columns: 1.875rem 1fr; gap: .75rem; }
.numbered-instructions li > span { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--brand-700); font-size: .72rem; font-weight: 800; }
.numbered-instructions strong { color: #344054; font-size: .82rem; }
.numbered-instructions p { margin: .25rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.technical-config-panel { margin-top: .875rem; padding: 0; overflow: hidden; }
.technical-config-panel > summary { padding: 1rem 1.25rem; border-bottom: 1px solid transparent; cursor: pointer; color: #344054; font-size: .84rem; font-weight: 750; }
.technical-config-panel[open] > summary { border-bottom-color: var(--line); }
.technical-config-panel > div { padding: 1.125rem 1.25rem; }
.connection-test-card > div:first-child { display: flex; gap: 1rem; align-items: flex-start; }
.connection-test-card h2 { margin: .125rem 0 .375rem; color: var(--text); font-size: 1.15rem; }
.connection-test-card p:not(.eyebrow) { max-width: 40.625rem; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.enable-check-grid, .onboarding-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18.75rem, .65fr); gap: .875rem; }
.check-list { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.check-list li span { color: var(--muted); font-size: .76rem; }
.check-list li strong { color: #344054; font-size: .8rem; }
.onboarding-aside h2 { margin: .1875rem 0 1.25rem; color: #fff; font-size: 1.1rem; }
.onboarding-aside ol { display: grid; gap: 1rem; margin: 0 0 1.375rem; padding: 0; list-style: none; counter-reset: onboarding; }
.onboarding-aside li { display: grid; grid-template-columns: 1fr; gap: .1875rem; padding-left: 1rem; border-left: 2px solid var(--brand); }
.onboarding-aside li strong { font-size: .82rem; }
.onboarding-aside li span, .onboarding-aside > p:last-child { color: #b8c2d3; font-size: .72rem; line-height: 1.5; }

.workspace::before { position: fixed; z-index: -1; inset: 0 0 auto var(--sidebar-width); height: 18.75rem; background: radial-gradient(circle at 22% 0, rgba(37,99,235,.08), transparent 42%), radial-gradient(circle at 92% 4%, rgba(14,165,233,.07), transparent 34%); content: ""; pointer-events: none; display: none; }
.workspace, .workspace.dashboard-page { width: min(100%, 103.75rem); margin: 0 auto; padding: 1.875rem 2.125rem 4rem; }
.sidebar { display: flex; min-height: 0; flex-direction: column; overflow-y: auto; position: sticky; top: 0; height: 100vh; border: 0; z-index: 30; border-right: 0; color: #fff; backdrop-filter: none; box-shadow: none; width: var(--sidebar-width); padding: 1.125rem .75rem; background: var(--ink); }
.brand { display: flex; align-items: center; text-decoration: none; min-height: 2.75rem; gap: .625rem; color: #fff; margin: 0 .5rem 1.5rem; }
.brand-mark { display: grid; place-items: center; flex: 0 0 2.125rem; width: 2.125rem; height: 2.125rem; border: 0; border-radius: .5625rem; background: var(--brand); color: #fff; font-weight: 600; font-size: 1.15rem; }
.brand strong { font-size: .88rem; }
.brand small { letter-spacing: 0; color: #98a2b3; font-size: .66rem; }
.console-navigation { gap: .1875rem; }

.console-navigation > a { display: grid; grid-template-columns: 1.625rem minmax(0, 1fr); min-height: 2.375rem; align-items: center; gap: .4375rem; padding: .5rem .625rem; border-radius: .4375rem; color: #aab6c8; font-size: .8rem; }
.console-navigation > a:hover { background: #172337; color: #f8fafc; }
.console-navigation > a[aria-current="page"] { background: rgba(0,113,227,.12); color: var(--brand); font-weight: 600; box-shadow: none; border-radius: .5625rem; border-color: transparent; }

/* Tells the reader the page is refreshing itself, so a number changing under
   them reads as the task progressing rather than as a glitch. */
.run-live-note { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; padding: .5rem .875rem; border: 1px solid var(--brand-100); border-radius: var(--radius-pill); background: var(--brand-50); color: var(--link); font-size: .78rem; width: fit-content; }
.run-live-dot { width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--brand); animation: runLivePulse 1.6s ease-in-out infinite; }
@keyframes runLivePulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .run-live-dot { animation: none; } }

.breadcrumbs { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.125rem; color: var(--muted); margin-bottom: .875rem; font-size: .72rem; }
/* One rule per selector.  The tighter 14px spacing here came from the last redesign but never applied: its rule sat above this one in the file, so the looser 20px/18px kept winning. */
.page-header { display: flex; justify-content: space-between; gap: 1.75rem; align-items: flex-start; border-bottom: 1px solid var(--line); margin-bottom: .875rem; padding-bottom: .875rem; }
.page-header h1 { margin: .1875rem 0 .375rem; font-size: clamp(1.5rem, 2vw, 1.9rem); letter-spacing: 0; font-weight: 600; }
.page-header p:not(.eyebrow) { max-width: 47.5rem; margin-bottom: 0; color: var(--muted); font-size: .82rem; line-height: 1.47; }
.eyebrow { font-weight: 600; color: var(--blue); margin-bottom: .25rem; font-size: .75rem; letter-spacing: 0; }
/* ==========================================================================
 * 按钮
 *
 * 两种尺寸（常规 36px、小号 30px）、五种层级（次要、主要、文字、危险、
 * 危险实心）。尺寸只由这里的三个变量决定，容器最多改宽度——之前有二十
 * 多处按容器覆盖高度、内边距和字号（28–40px、10.7–13.1px 七种字号），
 * body.app-layout .button 的优先级还把 .button-small 整个压掉了，同一屏
 * 上的按钮因此大的大、小的小。
 *
 * 用法：页头、表单、对话框用常规；表格行、提示条、卡片标题栏用小号。
 * 一个区域最多一个主要按钮，放在最后；危险操作不和主要按钮挨着。
 * ======================================================================== */
.button { --button-height: 2.25rem; --button-padding: 1rem; --button-font: .8125rem; display: inline-flex; flex: 0 0 auto; width: auto; min-width: 0; min-height: var(--button-height); align-items: center; justify-content: center; gap: .375rem; margin: 0; padding: 0 var(--button-padding); border: 0; border-radius: var(--radius-pill); background: rgba(0,0,0,.06); box-shadow: none; color: var(--text); cursor: pointer; font: inherit; font-size: var(--button-font); font-weight: 500; letter-spacing: 0; line-height: 1.2; text-decoration: none; white-space: nowrap; user-select: none; -webkit-user-select: none; transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease), opacity .2s var(--ease); }
.button:hover { background: rgba(0,0,0,.1); color: var(--text); transform: none; }
.button:active { transform: scale(.97); }
.button:focus-visible { outline: 3px solid rgba(0,113,227,.35); outline-offset: 2px; }
.button[disabled], .button[aria-disabled="true"] { cursor: default; opacity: .4; transform: none; }
.button > i { font-size: 1.08em; line-height: 1; }
.button-small { --button-height: 1.875rem; --button-padding: .75rem; --button-font: .75rem; }
.button-icon { width: var(--button-height); padding: 0; }
.button-wide { width: 100%; }
.button-primary, .button-primary:hover { color: #fff; }
.button-primary { background: var(--brand); }
.button-primary:hover { background: #0077ed; }
.button-quiet { background: transparent; color: var(--link); }
.button-quiet:hover { background: rgba(0,113,227,.08); color: var(--link); }
.button-danger { background: rgba(215,0,21,.08); color: var(--danger); }
.button-danger:hover { background: rgba(215,0,21,.15); color: var(--danger); }
.button-destructive, .button-destructive:hover { color: #fff; }
.button-destructive { background: var(--danger); }
.button-destructive:hover { background: #c20013; }
/* Apple form controls: rounded, hairline, and a blue ring on focus rather
   than a colour change on the border alone. */
input, select, textarea { min-height: 2.375rem; padding: .5625rem .8125rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--text); font-size: .84rem; letter-spacing: 0; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
select { min-height: 2.375rem; padding: .5rem 2.125rem .5rem .8125rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: #fff; color: var(--text); font-size: .84rem; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236e6e73' d='M6 8.4 2.1 4.5l.9-.9L6 6.6l3-3 .9.9z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: .75rem; }

.console-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .5625rem; background: #fff; box-shadow: var(--shadow); }
.console-panel-header { display: flex; min-height: 4.1875rem; align-items: center; justify-content: space-between; gap: 1.125rem; padding: .8125rem .9375rem; border-bottom: 1px solid var(--line); }
.console-panel-header h2 { margin: 1px 0 .125rem; font-size: .94rem; }
.console-panel-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.console-panel-header > a:not(.button), .console-panel-header > span { color: var(--blue); font-size: .68rem; font-weight: 750; text-decoration: none; white-space: nowrap; }

.console-chart-grid { stroke: #e9eef5; stroke-width: 1; }
.console-chart-label { fill: #7c889c; font-size: 20px; }
.console-chart-series { fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.console-chart-series.success, .console-chart-point.success { stroke: #12b76a; }
.console-chart-series.failure, .console-chart-point.failure { stroke: #f04438; }
.console-chart-series.active, .console-chart-point.active { stroke: #f79009; }
.console-chart-point { fill: #fff; stroke: var(--brand); stroke-width: 3; }
.console-empty { display: grid; min-height: 7.5rem; place-content: center; gap: .25rem; color: var(--muted); font-size: .72rem; text-align: center; }
.console-table-wrap { width: 100%; overflow-x: auto; }
.console-table { min-width: 45rem; }

.console-table th { padding: .5625rem .75rem; background: #f8fafc; color: #667085; font-size: .62rem; letter-spacing: 0; }
.console-table td { height: 3.5rem; padding: .5625rem .75rem; color: #344054; font-size: .71rem; }
.console-table tbody tr:hover td { background: var(--brand-50); }
.console-table td > small { margin-top: .125rem; font-size: .61rem; }
.table-primary-link, .table-action-link { color: var(--text); font-weight: 750; text-decoration: none; }
.table-primary-link:hover, .table-action-link { color: var(--blue); }
.table-action-link:hover { text-decoration: underline; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

/* ==========================================================================
 * 数据驾驶舱
 *
 * The page this replaces spent 269px - 30% of a 900px screen - on a title
 * block and a filter bar before the first number, and pushed the health and
 * recent-run tables entirely below the fold.  Everything here is sized so the
 * whole cockpit lands on one screen: a 52px bar, one KPI row, then a 2x2 panel
 * grid weighted 4:2 on top and 3:3 below.
 * ======================================================================== */
.cockpit { display: grid; gap: .75rem; }

.cockpit-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cockpit-identity { display: flex; align-items: baseline; gap: .75rem; min-width: 0; }
.cockpit-identity h1 { margin: 0; font-size: 1.4rem; font-weight: 600; letter-spacing: 0; }
.cockpit-updated { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.cockpit-bar-actions { display: flex; align-items: center; gap: .625rem; }
.cockpit-scope-note { color: var(--muted-2); font-size: .7rem; white-space: nowrap; }
.cockpit-scope { display: flex; align-items: center; gap: .5rem; margin: 0; }
.cockpit-scope select { min-height: 2rem; padding: .3125rem 1.75rem .3125rem .625rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--card); color: var(--text); font-size: .72rem; }

.cockpit-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
/* No coloured rail down the side: Apple carries the state in the number and
   its caption, and keeps the card itself plain. */
.cockpit-kpi { display: flex; flex-direction: column; justify-content: center; gap: .1875rem; padding: 1rem 1.125rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); box-shadow: none; color: inherit; text-decoration: none; transition: background-color .2s var(--ease), transform .12s var(--ease); }
.cockpit-kpi:hover { background: #fafafc; }
.cockpit-kpi:active { transform: scale(.99); }
.cockpit-kpi-label { color: var(--muted); font-size: .76rem; font-weight: 400; }
.cockpit-kpi strong { color: var(--text); font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.cockpit-kpi small { color: var(--muted-2); font-size: .66rem; }
.cockpit-kpi.is-warning strong { color: var(--warn-ink); }
.cockpit-kpi.is-danger strong { color: var(--danger); }
.cockpit-kpi.is-success strong { color: var(--ok); }

.cockpit-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.cockpit-panel { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); box-shadow: none; }
.cockpit-panel-trend { grid-column: span 4; }
.cockpit-panel-alerts { grid-column: span 2; }
.cockpit-panel-health { grid-column: span 3; }
.cockpit-panel-recent { grid-column: span 3; }

.cockpit-panel-head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); }
.cockpit-panel-head h2 { margin: 0; flex: 0 0 auto; font-size: .88rem; font-weight: 600; letter-spacing: 0; }
.cockpit-panel-note { color: var(--muted-2); font-size: .66rem; }
.cockpit-panel-more { margin-left: auto; color: var(--link); font-size: .76rem; font-weight: 400; text-decoration: none; white-space: nowrap; }
.cockpit-panel-more:hover { text-decoration: underline; }
.cockpit-legend { display: flex; flex-wrap: wrap; gap: .625rem; }
.cockpit-legend span { display: inline-flex; align-items: center; gap: .3125rem; color: var(--muted); font-size: .65rem; }
.cockpit-legend span::before { width: .5rem; height: .125rem; border-radius: .125rem; background: var(--brand); content: ""; }
.cockpit-legend .success::before { background: var(--ok); }
.cockpit-legend .failure::before { background: var(--danger); }
.cockpit-legend .active::before { background: var(--warn); }

.cockpit-chart { min-height: 0; flex: 1; padding: .625rem .875rem .75rem; }
.cockpit-chart svg { display: block; width: 100%; height: 14.5rem; overflow: visible; }

.cockpit-alert-list { display: grid; align-content: start; overflow-y: auto; padding: .375rem .75rem .625rem; }
.cockpit-alert { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .625rem; align-items: start; padding: .6875rem .25rem; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.cockpit-alert:last-child { border-bottom: 0; }
.cockpit-alert:hover { background: #fafafc; }
.cockpit-alert-level { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: .375rem; background: var(--danger-soft); color: var(--danger-ink); font-size: .6rem; font-weight: 800; }
.cockpit-alert.warning .cockpit-alert-level { background: var(--warn-soft); color: var(--warn-ink); }
.cockpit-alert-body { display: grid; gap: .1875rem; min-width: 0; }
.cockpit-alert-body strong { font-size: .73rem; font-weight: 650; line-height: 1.35; }
.cockpit-alert-body small { color: var(--muted); font-size: .65rem; line-height: 1.4; }

.cockpit-table-wrap { min-height: 0; flex: 1; overflow: auto; }
.cockpit-table { width: 100%; border-collapse: collapse; }
.cockpit-table th { position: sticky; top: 0; z-index: 1; padding: .5625rem 1rem; border-bottom: 1px solid var(--line-soft); background: #fbfbfd; color: var(--muted); font-size: .72rem; font-weight: 400; letter-spacing: 0; text-align: left; }
.cockpit-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: .8rem; }
.cockpit-table tbody tr:last-child td { border-bottom: 0; }
.cockpit-table tbody tr:hover td { background: #fafafc; }
.cockpit-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cockpit-table a:not(.button) { color: var(--text); font-weight: 500; text-decoration: none; }
.cockpit-table a:not(.button):hover { color: var(--link); text-decoration: none; }
.cockpit-table small { margin-left: .375rem; color: var(--muted); font-size: .64rem; font-variant-numeric: tabular-nums; }
.cockpit-health { display: inline-block; width: 3.375rem; height: .3125rem; overflow: hidden; border-radius: .1875rem; background: var(--line); vertical-align: middle; }
.cockpit-health i { display: block; height: 100%; border-radius: .1875rem; background: var(--ok); }
.cockpit-health.is-low i { background: var(--warn); }
.project-toolbar { display: grid; align-items: center; padding: .875rem; gap: .75rem; margin-bottom: 1rem; grid-template-columns: minmax(17.5rem, 1fr) minmax(11.25rem, .45fr) auto; }

.project-control-table { min-width: 70rem; }
.project-control-table td:first-child { min-width: 13.125rem; }
.project-control-table td:nth-child(4) { min-width: 13.125rem; }

.inline-rename-action { position: relative; }
.inline-rename-action > summary { list-style: none; }
.inline-rename-action > summary::-webkit-details-marker { display: none; }
.inline-rename-panel { position: absolute; z-index: 20; top: calc(100% + .4375rem); right: 0; width: 18.75rem; padding: .8125rem; border: 1px solid var(--line); border-radius: .5625rem; background: #fff; box-shadow: 0 14px 35px rgba(16,24,40,.16); }
.inline-rename-panel small { font-weight: 400; }
.dedup-page-header { margin-bottom: .875rem; }
.dedup-new-panel { margin-bottom: 1.375rem; margin-top: .875rem; margin: 0 0 .875rem; padding: 1.125rem; border-radius: .5625rem; box-shadow: var(--shadow); }
.dedup-creation-steps, .onboarding-stepbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 1rem; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .5rem; background: #f8fafc; list-style: none; }
.dedup-creation-steps li, .onboarding-stepbar li { position: relative; display: grid; grid-template-columns: 1.5625rem minmax(0, 1fr); gap: .125rem .5rem; align-content: center; min-height: 3.75rem; padding: .5625rem .75rem; border-right: 1px solid var(--line); }
.dedup-creation-steps li:last-child, .onboarding-stepbar li:last-child { border-right: 0; }
.dedup-creation-steps li > span, .onboarding-stepbar li > span { display: grid; grid-row: 1 / span 2; width: 1.4375rem; height: 1.4375rem; place-items: center; align-self: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #667085; font-size: .61rem; font-weight: 800; }
.dedup-creation-steps strong, .onboarding-stepbar strong { color: #344054; font-size: .69rem; }
.dedup-creation-steps small, .onboarding-stepbar small { color: var(--muted); font-size: .57rem; }
.dedup-creation-steps .is-current, .onboarding-stepbar .is-current { background: var(--brand-50); }
.dedup-creation-steps .is-current > span, .onboarding-stepbar .is-current > span { border-color: var(--blue); background: var(--blue); color: #fff; }
.onboarding-stepbar .is-done > span { border-color: #12b76a; background: #ecfdf3; color: #067647; }
.dedup-new-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; max-width: none; }
.dedup-new-form > label:first-of-type, .dedup-new-form > .dedup-target-grid, .dedup-new-form > fieldset, .dedup-new-form > .form-hint, .dedup-new-form > .action-row { grid-column: 1 / -1; }
.dedup-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dedup-rule-fields legend { padding: 0 .375rem; color: #344054; font-size: .72rem; }
.dedup-rule-section { display: grid; gap: .875rem; margin-top: 1.125rem; }
.dedup-rule-card { overflow: hidden; border: 1px solid var(--line); border-color: var(--line); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xs); }
/* Six data cells plus the actions.  The previous track list reserved a
   seventh 210px column for actions that never sat in it - they span the full
   row below - and sized four of the others in fixed pixels, so the row
   demanded 1087px inside a 977px card and pushed "编辑与明细" 125px past the
   right edge, out of reach on any 1280px screen.  Every track can shrink now. */
.dedup-rule-summary { display: grid; align-items: center; grid-template-columns: minmax(8.75rem, 1.35fr) minmax(6rem, .95fr) minmax(4.5rem, .6fr) minmax(6rem, .9fr) minmax(6.5rem, 1fr) minmax(6.5rem, 1fr); gap: .75rem; padding: .8125rem .875rem; }
.dedup-rule-summary strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .73rem; }
.dedup-rule-identity strong { font-size: .82rem; }
.dedup-rule-summary small, .dedup-cell-label { font-size: .61rem; }
.dedup-summary-actions { grid-column: 1 / -1; padding-top: .875rem; border-top: 1px solid var(--line); display: flex !important; grid-template-columns: none; align-items: center; justify-content: flex-end; gap: .375rem; }
.dedup-summary-actions form { margin: 0; }
.dedup-rule-detail { border-top: 1px solid var(--line); border-color: var(--line); background: #f8fafc; }
.dedup-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .625rem; padding: .75rem .875rem; }
.dedup-detail-pane, .dedup-rule-edit { min-width: 0; border: 1px solid rgba(29,29,31,.09); border-color: var(--line); background: #fff; padding: .8125rem; border-radius: .5rem; }
.dedup-history-section, .dedup-safety-details { margin-top: .875rem; border-radius: .5625rem; }
/* Seven tracks demanding 766px minimum, with no breakpoint of their own, were
   what made this page scroll sideways from 1024px down - 466px past the edge
   on a phone.  Tighter mins here, and the two blocks below drop the columns
   that matter least as room runs out. */
.dedup-run-row { display: grid; grid-template-columns: .625rem minmax(8rem, 1.3fr) repeat(4, minmax(4.75rem, .74fr)) auto; gap: .75rem; align-items: center; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 3.625rem; padding: .5625rem .75rem; }

.run-kind-badge { padding: .3125rem .5rem; background: #eef4ff; color: var(--brand-700); font-weight: 750; border-radius: .3125rem; font-size: .62rem; }
.run-kind-badge.is-dedup { background: #ecfdf3; color: #067647; }

/* auto-fit with a max stops six tiles from each growing to 259px to hold one
   short number; they fill left to right and the row ends where it ends. */
.result-metric-strip { margin-bottom: .75rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9.375rem, 13.125rem)); justify-content: start; }
.metric-strip article, .project-command-grid article { min-height: 5.5rem; padding: .8125rem .875rem; border-radius: .5625rem; box-shadow: var(--shadow); }
.metric-strip article > strong { color: var(--text); letter-spacing: -.02em; font-size: 1.35rem; }
.project-command-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-bottom: .625rem; }
.project-command-grid article { display: grid; align-content: space-between; padding: 1.125rem; border: 1px solid var(--line); border-radius: .875rem; background: #fff; box-shadow: var(--shadow); min-height: 5.5rem; }
.project-workspace-grid, .project-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; margin-bottom: .625rem; }
.content-card { padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.content-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; margin-bottom: .75rem; }
.content-card-header h2 { margin: .125rem 0 0; color: var(--text); font-size: .91rem; }
.workflow-steps li { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .625rem 0; min-height: 3.875rem; }
.run-history-section { margin-bottom: .625rem; }
.run-feed-item { display: grid; grid-template-columns: .625rem minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 3.4375rem; padding: .5rem .25rem; }
.business-detail-section { margin-bottom: .625rem; }
.guided-table-filter { display: grid; grid-template-columns: 11.25rem minmax(15rem, 1fr) auto auto; gap: .5625rem; align-items: end; }
.guided-table-filter label { display: grid; gap: .25rem; color: #344054; font-size: .67rem; font-weight: 700; }
.guided-table-filter label small { color: var(--muted); font-size: .59rem; font-weight: 400; }
.business-record-table th, .business-record-table td { padding: .625rem .75rem; }
.detail-empty-state { display: grid; justify-items: center; gap: .5rem; place-content: center; padding: 1.875rem; border: 1px dashed #d0d5dd; background: #f9fafb; text-align: center; min-height: 9.375rem; border-radius: .5rem; }
.technical-run-details { margin-top: .875rem; border: 1px solid var(--line); background: #f8fafc; color: #475467; border-radius: .5rem; }
.danger-zone { border-color: #fecdca; background: #fffafa; border-radius: .5625rem; box-shadow: none; }
.onboarding-layout, .enable-check-grid { gap: .625rem; }
.onboarding-aside { padding: 1.375rem; color: #fff; border-radius: .5625rem; background: var(--ink); }
.form-stack { display: grid; gap: .8125rem; }
.form-stack label { display: grid; gap: .4375rem; color: var(--text); font-size: .8rem; font-weight: 500; letter-spacing: 0; }
/* The gap spaces these rows; a heading's default bottom margin would add to it. */
.form-stack > h3 { margin: 0; }

.connection-test-card { display: flex; align-items: center; justify-content: space-between; gap: 1.75rem; min-height: 8.75rem; padding: 1.125rem; border-radius: var(--radius); }
.dedup-toolbar { padding: .875rem; display: grid; gap: .625rem; align-items: center; margin-bottom: .75rem; border-radius: .5625rem; box-shadow: var(--shadow); grid-template-columns: minmax(17.5rem, 1fr) 11.25rem auto auto; }
.dedup-setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17.1875rem; gap: .875rem; align-items: start; }
.dedup-setup-main { display: grid; gap: .625rem; min-width: 0; }
.dedup-form-step { display: grid; gap: .75rem; min-width: 0; padding: .9375rem; border: 1px solid var(--line); border-radius: .5rem; background: #fff; }
.dedup-form-step-heading { display: grid; grid-template-columns: 1.9375rem minmax(0, 1fr); gap: .625rem; align-items: start; }
.dedup-form-step-heading > span { display: grid; width: 1.8125rem; height: 1.8125rem; place-items: center; border-radius: .375rem; background: var(--brand-50); color: var(--brand-700); font-size: .64rem; font-weight: 800; }
.dedup-form-step-heading h3 { margin: 0; color: #1d2939; font-size: .83rem; }
.dedup-form-step-heading p { margin: .1875rem 0 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.dedup-form-step label { gap: .3125rem; }
.dedup-form-step label > small { font-size: .62rem; line-height: 1.45; }
.dedup-rule-fields { border: 1px solid var(--line); border-radius: .5rem; padding: .9375rem; background: #fff; }
.dedup-plan-grid { grid-template-columns: minmax(11.875rem, 1.25fr) repeat(2, minmax(9.375rem, .8fr)); gap: .625rem; }
.dedup-step-actions { display: flex; align-items: center; gap: .75rem; }
.dedup-step-actions .form-hint { margin: 0; font-size: .64rem; }
.dedup-submit-panel { position: sticky; top: 1.125rem; display: grid; gap: .9375rem; padding: 1.0625rem; border: 1px solid var(--brand-100); border-radius: .5625rem; background: #f7faff; }
.dedup-submit-panel h3 { margin: 0 0 .375rem; font-size: .94rem; }
.dedup-submit-panel p:not(.eyebrow) { margin: 0; color: #667085; font-size: .68rem; line-height: 1.55; }
.dedup-submit-panel > small { color: #667085; font-size: .61rem; line-height: 1.5; }
.dedup-submit-checklist { display: grid; margin: 0; }
.dedup-submit-checklist div { display: flex; justify-content: space-between; gap: .875rem; padding: .5625rem 0; border-bottom: 1px solid #dbe7f8; font-size: .67rem; }
.dedup-submit-checklist dt { color: #667085; }
.dedup-submit-checklist dd { margin: 0; color: #1d2939; font-weight: 750; text-align: right; }
.dedup-submit-actions { display: grid; gap: .5rem; }
.dedup-submit-actions .button { width: 100%; }
.dedup-creation-steps .is-complete { background: #f0fdf4; }
.dedup-creation-steps .is-complete > span { border-color: #12b76a; background: #12b76a; color: #fff; }

.settings-account-create { margin-top: .625rem; scroll-margin-top: 3.875rem; border: 1px solid var(--line); border-radius: .5rem; background: #f8fafc; }
.settings-account-create > summary { padding: .75rem .875rem; color: #344054; cursor: pointer; font-size: .72rem; font-weight: 800; }
.settings-account-create[open] > summary { border-bottom: 1px solid var(--line); }
.settings-account-create .account-create-form { margin: 0; padding: .875rem; }

.business-sync-import-panel, .business-sync-room-panel, .business-sync-status { margin-bottom: .875rem; }
.business-sync-import-form { display: grid; grid-template-columns: minmax(11.875rem, .8fr) auto minmax(11.875rem, .8fr) auto; gap: .75rem; align-items: end; }
.business-sync-import-form label { display: grid; gap: .3125rem; color: #344054; font-size: .72rem; font-weight: 750; }
.business-sync-import-form label small { min-height: 1.4em; color: var(--muted); font-size: .64rem; font-weight: 400; line-height: 1.4; }
.business-sync-date-arrow { align-self: center; padding-top: 1.0625rem; color: var(--muted); font-size: .72rem; }
.business-sync-import-hint { margin: .9375rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .68rem; line-height: 1.65; }
.business-sync-room-form { display: grid; grid-template-columns: minmax(15rem, 1fr) auto; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.business-sync-room-form label { display: grid; gap: .3125rem; color: #344054; font-size: .72rem; font-weight: 750; }
.business-sync-room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr)); gap: .5rem; }
.business-sync-room-item { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .5rem; padding: .5625rem .625rem; border: 1px solid var(--line); border-radius: .5625rem; background: #f8fafc; }
.business-sync-room-item strong { overflow: hidden; color: #344054; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.business-sync-room-item form { margin: 0; }
.business-sync-room-item button { padding: .125rem 0; border: 0; background: transparent; color: #b42318; cursor: pointer; font-size: .65rem; }
.business-sync-room-item button:hover { color: #7a271a; text-decoration: underline; }
.business-sync-room-panel > .form-hint { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .68rem; line-height: 1.65; }
.business-sync-schedule-card { gap: .4375rem; align-content: start !important; }
.business-sync-schedule-card > span { display: block; }
.business-sync-schedule-card form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4375rem; margin: 0; }
.business-sync-schedule-card input[type="time"] { width: 100%; min-height: 2.25rem; padding: .4375rem .5625rem; border-color: #b7c5dc; background: var(--brand-50); color: var(--text); font-size: .9rem; font-weight: 800; }
.business-sync-schedule-card > small { display: block; line-height: 1.45; }
.business-sync-card-error, .table-cell-error { color: var(--danger) !important; }
.business-sync-log-panel { margin-bottom: .875rem; }
.business-sync-log-table-wrap { border-top: 1px solid var(--line); }
.business-sync-log-table { min-width: 75rem; table-layout: fixed; }
.business-sync-log-table th, .business-sync-log-table td { vertical-align: middle; line-height: 1.45; }
.business-sync-log-table th:nth-child(1) { width: 10.625rem; }
.business-sync-log-table th:nth-child(2) { width: 5.5rem; }
.business-sync-log-table th:nth-child(3) { width: 9.375rem; }
.business-sync-log-table th:nth-child(4) { width: 9.375rem; }
.business-sync-log-table th:nth-child(5), .business-sync-log-table th:nth-child(6), .business-sync-log-table th:nth-child(7) { width: 4.25rem; }
.business-sync-log-table th:nth-child(8) { width: 7.5rem; }
.business-sync-log-table th:nth-child(9) { width: 4.875rem; }
.business-sync-log-table th:nth-child(10) { width: 5.625rem; }
.business-sync-log-table .numeric-cell { text-align: right; font-variant-numeric: tabular-nums; }
.business-sync-log-table .metric-created { color: #067647; }
.business-sync-log-table .table-cell-note, .business-sync-log-table .table-cell-error { display: block; margin-top: .25rem; line-height: 1.35; overflow-wrap: anywhere; }
.business-sync-log-table .business-sync-log-run-start td { border-top: 2px solid #cfd9ea; }
.business-sync-log-row-link { cursor: pointer; transition: background-color .15s ease; }
.business-sync-log-row-link:hover, .business-sync-log-row-link:focus { outline: none; background: #f4f8ff; }
.business-sync-log-row-link:focus-visible { box-shadow: inset 0 0 0 2px var(--brand-300); }
.business-sync-detail-link { color: var(--brand-700); font-weight: 750; text-decoration: none; white-space: nowrap; }
.business-sync-detail-link:hover { text-decoration: underline; }
.business-sync-detail-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: .875rem; overflow: hidden; border: 1px solid var(--line); border-radius: .5625rem; background: #fff; box-shadow: var(--shadow); }
.business-sync-detail-summary > div { display: grid; min-width: 0; gap: .25rem; padding: .8125rem .9375rem; border-right: 1px solid var(--line); }
.business-sync-detail-summary > div:last-child { border-right: 0; }
.business-sync-detail-summary span { color: var(--muted); font-size: .64rem; font-weight: 700; }
.business-sync-detail-summary strong { overflow: hidden; color: #1d2939; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.business-sync-detail-panel { margin-bottom: .875rem; }
.business-sync-detail-table-wrap { max-height: 68vh; border-top: 1px solid var(--line); }
.business-sync-detail-table { width: max-content; min-width: 100%; }
.business-sync-detail-table th { position: sticky; z-index: 2; top: 0; min-width: 7.875rem; background: #f8fafc; white-space: nowrap; }
.business-sync-detail-table td { max-width: 16.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-sync-detail-table th, .business-sync-detail-table td { padding: .625rem .75rem; }
.business-sync-detail-table .business-sync-detail-index { position: sticky; z-index: 3; left: 0; min-width: 3.875rem; width: 3.875rem; background: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.business-sync-detail-table thead .business-sync-detail-index { z-index: 5; background: #f8fafc; }
.business-sync-detail-table .business-sync-detail-action { min-width: 5.375rem; }
.business-sync-detail-table .business-sync-detail-key { min-width: 11.875rem; max-width: 18.75rem; }
.business-sync-detail-table code { color: #344054; font-size: .64rem; }
.business-sync-action-create { background: #ecfdf3; color: #067647; }
.business-sync-action-update { background: #eff8ff; color: var(--brand-700); }
.business-sync-detail-pagination { display: flex; align-items: center; justify-content: space-between; gap: .875rem; padding: .75rem .875rem; border-top: 1px solid var(--line); }
.business-sync-detail-pagination > span { color: var(--muted); font-size: .68rem; }
.business-sync-detail-pagination > div { display: flex; gap: .4375rem; }
.business-sync-status.is-loading { display: grid; min-height: 6.875rem; align-content: center; gap: .3125rem; }
.business-sync-status.is-loading p { margin: 0; color: var(--muted); font-size: .76rem; }
.business-sync-progress-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; }
.business-sync-progress-line progress { width: 100%; height: .75rem; overflow: hidden; border: 0; border-radius: 62.4375rem; accent-color: var(--blue); }
.business-sync-progress-line strong { color: var(--blue); font-size: .82rem; }
.business-sync-progress-meta { display: flex; justify-content: space-between; gap: 1rem; margin: .4375rem 0 .9375rem; color: var(--muted); font-size: .68rem; }
.business-sync-result-strip { margin: .5rem 0 0; }

body.sidebar-collapsed { --sidebar-width: 4.625rem; }
/* macOS sidebar: translucent light rather than a dark block, separated from
   the content by a hairline and the blur behind it. */
body.app-layout .sidebar { position: sticky; z-index: 40; top: 0; width: auto; height: 100vh; padding: 1.125rem .75rem .875rem; border: 0; border-right: 1px solid var(--line-soft); background: rgba(251,251,253,.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--sidebar-text); transform: none; }
body.app-layout .brand { min-height: 2.75rem; gap: .625rem; margin: 0 .375rem 1.25rem; color: var(--text); }
body.app-layout .brand-mark { display: grid; place-items: center; flex: 0 0 2.125rem; width: 2.125rem; height: 2.125rem; border: 0; border-radius: .5625rem; background: var(--brand); color: #fff; font-weight: 600; font-size: 1.15rem; }
body.app-layout .brand strong { font-size: .92rem; font-weight: 600; letter-spacing: 0; }
body.app-layout .brand small { color: var(--muted); font-size: .66rem; letter-spacing: 0; }
body.app-layout .console-navigation { gap: .1875rem; }
body.app-layout .console-navigation a:hover { background: rgba(0,0,0,.05); color: var(--text); }
/* The selected row is a tinted capsule, the way Finder and Mail mark one. */
body.app-layout .console-navigation a[aria-current="page"] { background: rgba(0,113,227,.12); color: var(--brand); font-weight: 600; box-shadow: none; border-radius: .625rem; border-color: transparent; }
body.app-layout .nav-icon { width: 1.25rem; flex: 0 0 1.25rem; font-size: 1.02rem; text-align: center; }
body.app-layout .sidebar-collapse { display: flex; width: 100%; min-height: 2.375rem; align-items: center; gap: .625rem; margin-top: auto; padding: .5rem .625rem; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; font-size: .72rem; }
body.app-layout .sidebar-footer { display: block; margin-top: .25rem; padding: .25rem 0 0; }
body.app-layout .sidebar-footer .button-quiet { display: flex; width: 100%; justify-content: center; gap: .4375rem; min-height: 2.125rem; color: var(--muted); font-size: .78rem; }
.sidebar-collapsed .brand span:last-child, .sidebar-collapsed .console-navigation a span, .sidebar-collapsed .sidebar-collapse span, .sidebar-collapsed .sidebar-footer span { display: none; }
.sidebar-collapsed .brand, .sidebar-collapsed .console-navigation a, .sidebar-collapsed .sidebar-collapse { justify-content: center; margin-right: 0; margin-left: 0; padding-right: .5rem; padding-left: .5rem; }
/* Cap the reading column and centre it.  This rule is the specific one, and
   it used to drop the cap the base rule sets, so on a wide monitor a page ran
   the full width: six summary tiles stretched to 259px each to hold one small
   number, and a definition list spread its label and value 800px apart. */
/* <main> spans everything right of the sidebar, so the top bar does too; the
   reading column inside it is what gets capped and centred.  With the cap on
   <main> itself a wide window showed the bar as a strip floating mid-screen
   with grey margins on both sides. */
body.app-layout .workspace { --gutter: clamp(1.25rem, 2.4vw, 2.5rem); width: 100%; max-width: none; margin: 0; padding: 0 0 2.625rem; color: var(--text); }
body.app-layout .workspace-content { width: min(100%, 97.5rem); margin-inline: auto; padding-inline: var(--gutter); }
body.app-layout .workspace::before { display: none; }
body.app-layout .utility-bar { position: sticky; z-index: 30; top: 0; display: flex; min-height: 3.5rem; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 0 0 1.125rem; padding: 0 var(--gutter); border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
body.app-layout .utility-context { overflow: hidden; color: #344054; font-size: .75rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
body.app-layout .utility-links { display: flex; align-items: center; gap: .4375rem; }
body.app-layout .utility-links a { display: inline-flex; min-height: 2rem; align-items: center; gap: .375rem; padding: .375rem .5625rem; border-radius: .375rem; color: #475467; font-size: .68rem; font-weight: 650; text-decoration: none; }
body.app-layout .card, body.app-layout .panel, body.app-layout .section-card, body.app-layout .settings-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xs); border-color: var(--line); }
body.app-layout input, body.app-layout select, body.app-layout textarea { min-height: 2.25rem; border-color: #d5dce7; border-radius: .375rem; background: #fff; font-size: .72rem; }
body.app-layout table { font-size: .69rem; }
body.app-layout th { color: #667085; font-size: .61rem; }
body.app-layout th, body.app-layout td { padding: .5625rem .625rem; border-bottom-color: var(--v3-line); }
/* The middle column takes what is left; its old 560px floor put the row's
   minimum at 1084px, wider than the 992px workspace on a 1280px screen, so the
   validation rail hung 91px off the edge.  A stray out-of-order media block
   used to mask this. */
.rule-studio-layout { display: grid; grid-template-columns: 11.875rem minmax(0, 1fr) 19.375rem; gap: .75rem; align-items: start; }
.rule-step-rail, .rule-validation-rail, .rule-editor-section { border: 1px solid var(--v3-line); border-radius: .4375rem; background: #fff; }
.rule-step-rail { position: sticky; top: 4.625rem; padding: .8125rem .75rem; }
.rule-rail-title { margin: 0 0 .75rem; color: #344054; font-size: .7rem; font-weight: 800; }
.rule-step-rail ol { display: grid; margin: 0; padding: 0; list-style: none; }
.rule-step-rail li { position: relative; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .5625rem; min-height: 4.25rem; }
.rule-step-rail li:not(:last-child)::after { position: absolute; top: 1.875rem; bottom: .125rem; left: .8125rem; width: 1px; background: var(--v3-line); content: ""; }
.rule-step-rail li > span { position: relative; z-index: 1; display: grid; width: 1.6875rem; height: 1.6875rem; place-items: center; border: 1px solid #d5dce7; border-radius: 50%; background: #fff; color: #98a2b3; font-size: .64rem; font-weight: 800; }
.rule-step-rail li.is-current > span { border-color: var(--v3-blue); background: var(--v3-blue); color: #fff; }
.rule-step-rail li.is-done > span { border-color: #abefc6; background: #ecfdf3; color: #067647; }
.rule-step-rail li div { display: grid; align-content: start; gap: .1875rem; padding-top: .25rem; }
.rule-step-rail strong { color: #344054; font-size: .69rem; }
.rule-step-rail small { color: #98a2b3; font-size: .61rem; }
.rule-step-rail .is-current strong { color: var(--v3-blue); }
.rule-editor-column { display: grid; min-width: 0; gap: .75rem; margin: 0; }
.rule-editor-section { overflow: hidden; }
.rule-editor-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.125rem; padding: .6875rem .8125rem; border-bottom: 1px solid var(--v3-line); }
.rule-editor-section > header h2 { margin: 0 0 .1875rem; font-size: .86rem; }
.rule-editor-section > header p { margin: 0; color: var(--v3-muted); font-size: .64rem; }
.rule-editor-section > header > span { color: var(--v3-blue); font-size: .62rem; font-weight: 750; }

.compatibility-state { display: inline-flex; align-items: center; gap: .3125rem; color: #475467; font-size: .63rem; font-weight: 700; }

.compatibility-state.is-valid { color: #067647; }
.compatibility-state.is-invalid { color: #b42318; }
.compatibility-state.is-create { color: #b54708; }
.compatibility-state.is-neutral { color: #667085; }

.validation-metadata { display: grid; gap: 0; margin: 0; }
.validation-metadata div { display: flex; justify-content: space-between; gap: .75rem; padding: .375rem 0; border-bottom: 1px solid var(--v3-line); font-size: .62rem; }
.validation-metadata div:last-child { border-bottom: 0; }
.validation-metadata dt { color: #667085; }
.validation-metadata dd { margin: 0; color: #344054; font-weight: 750; text-align: right; }

.rule-validation-rail { position: sticky; top: 4.625rem; display: grid; overflow: hidden; }
.rule-validation-rail section { padding: .875rem; border-bottom: 1px solid var(--v3-line); }
.rule-validation-rail section:last-child { border-bottom: 0; }
.rule-validation-rail section > header { display: flex; align-items: center; justify-content: space-between; gap: .625rem; }
.rule-validation-rail h2 { margin: 0 0 .5rem; color: #344054; font-size: .72rem; }
.rule-validation-rail p { margin: 0; color: #667085; font-size: .61rem; line-height: 1.5; }
.validation-summary { color: #067647; font-size: .6rem; font-weight: 750; }
.validation-checks { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.validation-checks li { display: grid; grid-template-columns: 1.125rem minmax(0,1fr) auto; align-items: center; gap: .375rem; min-height: 2.1875rem; border-bottom: 1px solid var(--v3-line); }
.validation-checks li:last-child { border-bottom: 0; }
.validation-checks i { color: #12b76a; font-size: .82rem; }
.validation-checks .ti-info-circle { color: #f79009; }
.validation-checks span, .validation-checks b { font-size: .6rem; }
.validation-checks span { color: #475467; }
.validation-checks b { color: #667085; font-weight: 650; }
.impact-summary { background: #f5f8ff; }
.impact-summary strong { display: block; margin-bottom: .3125rem; color: var(--v3-blue); font-size: .78rem; }
.table-pagination { display: flex; min-height: 3.25rem; align-items: center; justify-content: flex-end; gap: .5rem; padding: .5625rem .75rem; border-top: 1px solid var(--v3-line); }
.table-pagination label { display: flex; align-items: center; gap: .375rem; color: #667085; font-size: .62rem; }
.table-pagination select { width: 4.5rem; min-height: 2rem; }
.table-pagination > span { margin: 0 .25rem; color: #667085; font-size: .64rem; }
.table-pagination button[disabled] { opacity: .45; cursor: not-allowed; }
body.app-layout { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); transition: grid-template-columns 180ms ease; font-size: .875rem; background: var(--paper); }
body.app-layout p, body.app-layout label, body.app-layout li, body.app-layout dd, body.app-layout dt { font-size: .8125rem; }
body.app-layout small, body.app-layout .muted, body.app-layout .form-hint { font-size: .75rem; line-height: 1.5; }
body.app-layout .console-navigation a, body.app-layout .console-navigation .nav-group-toggle { display: flex; min-height: 2.375rem; align-items: center; gap: .625rem; padding: .5rem .625rem; border: 1px solid transparent; border-radius: .5625rem; color: var(--sidebar-text); font-weight: 400; font-size: .84rem; letter-spacing: 0; }
/* A group header is a button, not a link, so it needs the same treatment the
   rule above gives its sibling top-level links, plus room for the caret. */
body.app-layout .console-navigation .nav-group-toggle { width: 100%; justify-content: space-between; background: transparent; cursor: pointer; text-align: left; }
body.app-layout .console-navigation .nav-group-toggle > span:first-child { display: flex; align-items: center; gap: .625rem; min-width: 0; }
body.app-layout .console-navigation .nav-group-links a { min-height: 2rem; padding: .375rem .625rem; color: var(--muted); font-size: .8rem; font-weight: 400; }
body.app-layout .console-navigation .nav-group-links a:hover { color: var(--text); }
/* Declared after the sub-item colour above, which otherwise ties on
   specificity and paints the selected child grey. */
body.app-layout .console-navigation .nav-group-links a[aria-current="page"],
body.app-layout .console-navigation a[aria-current="page"] span { color: var(--brand); }

body.app-layout input, body.app-layout select, body.app-layout textarea { font-size: .8125rem; }
body.app-layout .console-table td { font-size: .8125rem; }
body.app-layout .console-table th { font-size: .75rem; }
body.app-layout .console-table td > small { font-size: .75rem; }
body.app-layout .status-pill, body.app-layout .run-kind-badge { font-size: .75rem; }
.rule-editor-section > header p, .rule-step-rail small, .rule-validation-rail p, .validation-checks span, .validation-checks b, .compatibility-state { font-size: .75rem; }
.rule-step-rail strong, .rule-validation-rail h2 { font-size: .8125rem; }
.execution-center-layout { display: grid; grid-template-columns: 13.125rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.execution-filter-rail { position: sticky; top: 4.625rem; display: grid; overflow: hidden; border: 1px solid var(--v3-line); border-radius: .4375rem; background: #fff; }
.execution-filter-rail > form { display: grid; gap: .75rem; padding: .9375rem; }
.execution-filter-rail header { padding-bottom: .625rem; border-bottom: 1px solid var(--v3-line); }
.execution-filter-rail h2 { margin: .125rem 0 0; font-size: .9rem; }
.execution-filter-rail label { display: grid; gap: .3125rem; color: #475467; font-weight: 700; }
.execution-filter-rail .button { width: 100%; }
.execution-id-search { padding: .75rem .9375rem; border-top: 1px solid var(--v3-line); }
.execution-id-search summary { color: #475467; cursor: pointer; font-size: .75rem; font-weight: 750; }
.execution-id-search form { display: grid; gap: .5rem; margin-top: .625rem; }
.execution-timeline-panel { min-width: 0; margin: 0; }
.unified-execution-table { min-width: 70rem; }
.unified-execution-table td:nth-child(2) { min-width: 11.875rem; }
.unified-execution-table td:nth-child(5) { min-width: 16.875rem; }
.unified-execution-table td > strong { display: block; color: #344054; }
.run-kind-badge.is-inventory { background: var(--brand-50); color: var(--brand-700); }
.run-kind-badge.is-standalone_fifo { background: #f4f3ff; color: #5925dc; }
.run-kind-badge.is-deduplication { background: #ecfdf3; color: #067647; }
.run-kind-badge.is-document { background: #fff6ed; color: #b54708; }
.status-succeeded_with_warnings, .status-concurrent_change, .status-partial_failed { background: #fffaeb; color: #b54708; }
.status-interrupted { background: #f2f4f7; color: #475467; }
.detail-empty-state > .ti { color: #98a2b3; font-size: 1.5rem; }
.failure-presentation { display: grid; gap: .875rem; margin-bottom: .75rem; padding: 1.125rem 1.25rem; border: 1px solid rgba(215,0,21,.18); border-radius: var(--radius); background: var(--danger-soft); }
.failure-presentation.is-partial { border-color: rgba(245,99,0,.2); background: var(--warn-soft); }
.failure-presentation > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.125rem; }
.failure-presentation h2 { margin: .125rem 0 0; color: #7a271a; font-size: 1rem; }
.failure-presentation.is-partial h2 { color: #7a2e0e; }
.failure-presentation dl { display: grid; margin: 0; border-top: 1px solid rgba(180,35,24,.14); }
.failure-presentation dl div { display: grid; grid-template-columns: 6.875rem minmax(0, 1fr); gap: 1rem; padding: .5625rem 0; border-bottom: 1px solid rgba(180,35,24,.12); }
.failure-presentation dt { color: #667085; font-weight: 650; }
.failure-presentation dd { margin: 0; color: #344054; font-weight: 650; }
.failure-presentation .button { justify-self: start; }
.onboarding-studio-layout .rule-editor-column { gap: .75rem; }
.guide-step-body { padding: .9375rem; }
.guide-callout { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem; border: 1px solid var(--brand-100); border-radius: .4375rem; background: #f5f8ff; }
.guide-callout > i { color: var(--v3-blue); font-size: 1.3rem; }
.guide-callout strong { color: #344054; }
.guide-callout p { margin: .25rem 0 0; color: #667085; }
.guide-parameter-list { display: grid; margin: 0; }
.guide-parameter-list div { display: grid; grid-template-columns: 9.375rem minmax(0, 1fr); gap: 1rem; padding: .6875rem .9375rem; border-bottom: 1px solid var(--v3-line); }
.guide-parameter-list div:last-child { border-bottom: 0; }
.guide-parameter-list dt { color: #667085; font-weight: 700; }
.guide-parameter-list dd { margin: 0; color: #344054; }
.guide-check-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.guide-check-steps li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .625rem; padding: .6875rem 0; border-bottom: 1px solid var(--v3-line); }
.guide-check-steps li:last-child { border-bottom: 0; }
.guide-check-steps i { color: var(--v3-blue); font-size: 1.1rem; }
.guide-check-steps span { display: grid; gap: .125rem; }
.guide-check-steps small { color: #667085; }
.preview-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--v3-line); }
.preview-metric-grid article { display: grid; gap: .25rem; padding: .75rem .9375rem; border-right: 1px solid var(--v3-line); }
.preview-metric-grid article:last-child { border-right: 0; }
.preview-metric-grid span { color: #667085; font-size: .75rem; }
.preview-metric-grid strong { color: #344054; font-size: 1.15rem; }
.preview-result-table { min-width: 42.5rem; }

/* ==========================================================================
 * 通用页面组件
 *
 * 先进先出、累计出库和系统设置共用同一套页头、摘要条、分段标签、列表、
 * 设置分组、菜单和对话框。以前每个页面各有一套（.fifo-summary-strip、
 * .project-command-grid、.console-kpi-strip、.settings-overview-strip
 * 四种摘要条，三种列表行），同样的信息在不同页面长得不一样，按钮也就
 * 各放各的位置。
 * ======================================================================== */

/* ---- 页头：标题在左，操作在右；返回靠面包屑，不再占一个按钮 ---- */
.page-heading { display: grid; min-width: 0; gap: .125rem; }
.page-heading h1 { margin: 0; }
.page-subtitle { max-width: 47.5rem; margin: .25rem 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.page-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin-left: auto; }
.page-actions form { margin: 0; }

/* ---- 提示条：需要处理的事放在最上面，并把处理按钮放在旁边 ---- */
.callout-stack { display: grid; gap: .625rem; }
.callout-stack:has(.callout) { margin-bottom: .875rem; }
.callout { display: flex; align-items: center; gap: .875rem; padding: .75rem .875rem .75rem 1rem; border: 1px solid var(--brand-100); border-radius: .875rem; background: var(--brand-50); }
.callout > i { flex: 0 0 auto; color: var(--brand); font-size: 1.25rem; }
.callout-body { display: grid; flex: 1 1 auto; gap: .125rem; min-width: 0; }
.callout-body strong { color: var(--text); font-size: .8125rem; font-weight: 600; }
.callout-body span { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.callout > form, .callout > .button { flex: 0 0 auto; margin: 0; }
.callout.is-warning { border-color: #fde2c2; background: var(--warn-soft); }
.callout.is-warning > i { color: var(--warn); }
.callout.is-danger { border-color: #ffd0d4; background: var(--danger-soft); }
.callout.is-danger > i { color: var(--danger); }
.callout.is-neutral { border-color: var(--line-soft); background: #fbfbfd; }
.callout.is-neutral > i { color: var(--muted); }

/* ---- 摘要条：一行四格，格子之间用 1px 缝隙当分隔线，换行也不会断线 ---- */
.stat-strip, .settings-overview-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; margin-bottom: .875rem; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
/* Separators are drawn by each cell to its right and below; the strip clips
   the ones on its outer edge.  A gap over a grey background drew them too,
   but painted the unfilled end of a wrapped row grey as well. */
.stat { display: grid; align-content: center; gap: .1875rem; min-width: 0; min-height: 5rem; padding: .875rem 1.125rem; background: #fff; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); color: inherit; text-decoration: none; }
a.stat:hover { background: #fafafc; }
.stat-label { display: flex; align-items: center; gap: .4375rem; color: var(--muted); font-size: .75rem; }
.stat-label::before { flex: 0 0 auto; width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--muted-2); content: ""; }
.stat.is-success .stat-label::before { background: var(--ok); }
.stat.is-warning .stat-label::before { background: var(--warn); }
.stat.is-danger .stat-label::before { background: var(--danger); }
.stat.is-info .stat-label::before { background: var(--brand); }
.stat strong { overflow: hidden; color: var(--text); font-size: 1.06rem; font-weight: 600; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.stat small { overflow: hidden; color: var(--muted-2); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 分段控件：macOS 的分段选择器，用于标签页和状态筛选 ---- */
.tab-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .875rem; }
.segmented { display: inline-flex; max-width: 100%; flex: 0 1 auto; gap: .125rem; padding: .125rem; overflow-x: auto; border-radius: .5625rem; background: rgba(118,118,128,.12); scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > a, .segmented > button { display: inline-flex; flex: 0 0 auto; min-height: 1.75rem; align-items: center; gap: .375rem; padding: 0 .875rem; border: 0; border-radius: .4375rem; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: .8125rem; font-weight: 500; letter-spacing: 0; text-decoration: none; white-space: nowrap; transition: background-color .18s var(--ease), box-shadow .18s var(--ease); }
.segmented > a:hover, .segmented > button:hover { background: rgba(0,0,0,.05); }
.segmented > [aria-selected="true"], .segmented > [aria-current="page"], .segmented > [aria-pressed="true"], .segmented > [aria-selected="true"]:hover, .segmented > [aria-current="page"]:hover, .segmented > [aria-pressed="true"]:hover { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
.segmented .count { min-width: 1.125rem; padding: 0 .3125rem; border-radius: .5625rem; background: rgba(0,0,0,.06); color: var(--muted); font-size: .6875rem; font-variant-numeric: tabular-nums; font-weight: 500; line-height: 1.125rem; text-align: center; }
.segmented .count.is-alert { background: var(--danger); color: #fff; }
.tab-panel:focus-visible { outline: 0; }

/* ---- 内容块：白底圆角容器，标题栏右侧最多放一个小按钮或链接 ---- */
.block { min-width: 0; margin: 0 0 .875rem; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
.block-header { display: flex; min-height: 3.5rem; align-items: center; justify-content: space-between; gap: .875rem; padding: .75rem 1.125rem; border-bottom: 1px solid var(--line-soft); }
.block-header > div { display: grid; min-width: 0; gap: .125rem; }
.block-header h2 { margin: 0; color: var(--text); font-size: .9375rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.block-header p { max-width: 45rem; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.block-header > form, .block-header > .button, .block-header > .status-pill { flex: 0 0 auto; margin: 0; }
.block-body { padding: 1rem 1.125rem; }
.block-link { flex: 0 0 auto; color: var(--link); font-size: .8125rem; text-decoration: none; white-space: nowrap; }
.block-link:hover { text-decoration: underline; }
.block-meta { flex: 0 0 auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.block-footnote { margin: 0; padding: .625rem 1.125rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .75rem; }
.block-footnote strong { color: var(--danger); }
.block-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(18.75rem, 1fr); gap: .875rem; align-items: start; }
.block-grid > .block { margin-bottom: 0; }
.empty-block { display: grid; justify-items: center; gap: .375rem; padding: 2.625rem 1.25rem; text-align: center; }
.empty-block > i { color: var(--muted-2); font-size: 1.8rem; }
.empty-block strong { color: var(--text); font-size: .9375rem; font-weight: 600; }
.empty-block p { max-width: 28.75rem; margin: 0 0 .5rem; color: var(--muted); font-size: .8125rem; }

/* ---- 列表工具栏：搜索、状态分段和数量在一行，控件同为 32px 高 ---- */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem .75rem; margin: 0; padding: .75rem 1.125rem; border-bottom: 1px solid var(--line-soft); }
.search-field { position: relative; display: block; flex: 0 1 17.5rem; min-width: 12.5rem; margin: 0; }
.search-field > i { position: absolute; top: 50%; left: .625rem; color: var(--muted-2); font-size: .95rem; pointer-events: none; transform: translateY(-50%); }
body.app-layout .search-field input { min-height: 2rem; padding: .3125rem .625rem .3125rem 1.875rem; border-color: transparent; border-radius: .5rem; background: rgba(118,118,128,.12); }
body.app-layout .search-field input:focus { border-color: var(--brand); background: #fff; }
.list-count { margin-left: auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }

/* ---- 数据表：行高一致，整行可点，操作列靠右并且只用小号按钮 ---- */
/* position: relative makes the wrapper the containing block of the visually
   hidden (absolutely positioned) labels inside the table; otherwise they
   escape its scrolling and widen the whole page on a narrow screen. */
.data-table-wrap { position: relative; width: 100%; overflow-x: auto; }
.side-tab-layout > * { min-width: 0; }
table.data-table { width: 100%; min-width: 47.5rem; border-collapse: collapse; font-size: .8125rem; }
table.data-table th { padding: .5625rem 1.125rem; border-bottom: 1px solid var(--line-soft); background: #fbfbfd; color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: 0; text-align: left; text-transform: none; white-space: nowrap; }
table.data-table td { height: 3.875rem; padding: .625rem 1.125rem; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: .8125rem; vertical-align: middle; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table tbody tr:hover td { background: #fafafc; }
table.data-table tbody tr[data-row-href] { cursor: pointer; }
table.data-table td > strong, table.data-table td > .row-title { display: block; font-weight: 500; }
table.data-table td > small { display: block; margin-top: .125rem; color: var(--muted); font-size: .75rem; line-height: 1.4; }
table.data-table .col-actions { width: 1%; text-align: right; white-space: nowrap; }
.row-title { color: var(--text); font-weight: 500; text-decoration: none; }
.row-title:hover { color: var(--link); }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: .375rem; }
.row-actions form { margin: 0; }
.text-warning { color: var(--warn-ink) !important; }
.run-state { display: inline-flex; align-items: center; gap: .4375rem; font-weight: 500; }
.run-dot { flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted-2); }
.run-dot.status-succeeded, .run-dot.status-done { background: var(--ok); }
.run-dot.status-succeeded_with_warnings, .run-dot.status-partial_write { background: var(--warn); }
.run-dot.status-failed, .run-dot.status-timed_out { background: var(--danger); }
.run-dot.status-running, .run-dot.status-queued { background: var(--brand); }

/* ---- 任务列表：概览和执行记录共用，每行一个链接 ---- */
.run-list { display: grid; }
.run-row { display: grid; grid-template-columns: .5rem minmax(0, 1.6fr) minmax(5.625rem, .7fr) minmax(6rem, auto) 1rem; align-items: center; gap: .875rem; min-height: 3.75rem; padding: .5625rem 1.125rem; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.run-row:last-child { border-bottom: 0; }
.run-row:hover { background: #fafafc; }
.run-row-main, .run-row-metric { display: grid; min-width: 0; gap: .125rem; }
.run-row strong { overflow: hidden; color: var(--text); font-size: .8125rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.run-row small { overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.run-row .status-pill { justify-self: start; }
.run-row-chevron { color: var(--muted-2); font-size: 1rem; }
.run-list-empty { display: grid; gap: .25rem; padding: 1.625rem 1.125rem; color: var(--muted); font-size: .8125rem; text-align: center; }
.run-list-empty strong { color: var(--text); font-weight: 500; }

/* ---- 流程步骤：一行三步，只说明，不放按钮 ---- */
.flow-steps { display: grid; gap: 0; margin: 0; padding: .375rem 1.125rem .75rem; list-style: none; }
.flow-steps li { display: grid; grid-template-columns: 1.625rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-height: 3.625rem; border-bottom: 1px solid var(--line-soft); }
.flow-steps li:last-child { border-bottom: 0; }
.flow-steps li > span { display: grid; width: 1.625rem; height: 1.625rem; place-items: center; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: .75rem; font-weight: 600; }
.flow-steps li.is-done > span { background: var(--ok-soft); color: var(--ok); }
.flow-steps li.is-current > span { background: var(--brand); color: #fff; }
.flow-steps li > div { display: grid; min-width: 0; gap: .125rem; }
.flow-steps strong { color: var(--text); font-size: .8125rem; font-weight: 500; }
.flow-steps small { color: var(--muted); font-size: .75rem; line-height: 1.45; }

/* ---- 表结构地图：录入表和系统表分两组 ---- */
.table-map { display: grid; gap: 1.125rem; }
.table-map-group h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .625rem; color: var(--muted); font-size: .75rem; font-weight: 500; }
.table-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.375rem, 1fr)); gap: .625rem; }
.table-map-grid article { display: grid; align-content: start; gap: .25rem; min-height: 5.25rem; padding: .75rem .875rem; border: 1px solid var(--line-soft); border-radius: .75rem; background: #fbfbfd; }
.table-map-grid strong { color: var(--text); font-size: .8125rem; font-weight: 600; }
.table-map-grid small { color: var(--muted); font-size: .75rem; line-height: 1.5; }

/* ---- 设置分组：左文右控件的整行，和 macOS 系统设置一样 ---- */
.settings-stack { display: grid; gap: 1.375rem; max-width: 53.75rem; }
.settings-section { display: grid; gap: .5rem; min-width: 0; margin: 0; }
.settings-section-title { margin: 0 0 0 .25rem; color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: 0; }
.settings-group { display: block; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: .875rem; background: #fff; }
.settings-row { display: flex; min-height: 3.625rem; align-items: center; justify-content: space-between; gap: 1.125rem; padding: .6875rem 1.125rem; }
.settings-row + .settings-row { border-top: 1px solid var(--line-soft); }
.settings-row-text { display: grid; flex: 1 1 auto; gap: .125rem; min-width: 0; }
.settings-row-text strong { color: var(--text); font-size: .8125rem; font-weight: 500; }
.settings-row-text small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.settings-row-control { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.settings-row-control form { margin: 0; }
body.app-layout .settings-row-control input:not([type="checkbox"]), body.app-layout .settings-row-control select { width: 15rem; min-height: 2rem; }
.settings-row.is-actions { justify-content: flex-end; min-height: 3.5rem; background: #fbfbfd; }
.settings-row.is-actions > small { margin-right: auto; color: var(--muted); font-size: .75rem; }
.settings-row.is-highlight { background: var(--brand-50); }
.settings-row.is-stacked { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: .625rem; }
.settings-row-control.inline-form { flex-wrap: nowrap; }
.settings-row-control.inline-form input { width: min(16rem, 100%); min-height: 1.875rem; padding-block: .25rem; font-size: .8125rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .5rem; }
.choice-grid .radio-row { align-items: flex-start; }
.settings-row.is-stacked > label { display: grid; gap: .375rem; color: var(--text); font-size: .8125rem; font-weight: 500; }
.settings-row.is-stacked > label small { color: var(--muted); font-weight: 400; }
.danger-text { color: var(--danger) !important; }

/* Apple 的开关：复选框的语义，开关的外观 */
body.app-layout input[type="checkbox"].switch { position: relative; flex: 0 0 auto; width: 2.75rem; min-width: 2.75rem; height: 1.625rem; min-height: 1.625rem; margin: 0; padding: 0; border: 0; border-radius: .8125rem; background: #e9e9eb; box-shadow: none; cursor: pointer; transition: background-color .2s var(--ease); appearance: none; -webkit-appearance: none; }
body.app-layout input[type="checkbox"].switch::after { position: absolute; top: .125rem; left: .125rem; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.04); content: ""; transition: transform .2s var(--ease); }
body.app-layout input[type="checkbox"].switch:checked { background: #34c759; }
body.app-layout input[type="checkbox"].switch:checked::after { transform: translateX(1.125rem); }
body.app-layout input[type="checkbox"].switch:focus-visible { outline: 3px solid rgba(0,113,227,.35); outline-offset: 2px; }
body.app-layout input[type="checkbox"].switch:disabled { cursor: default; opacity: .5; }

/* ---- 更多菜单：弹出层由 app.js 定位，所以放在会滚动的表格里也不会被裁掉 ---- */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: rgba(0,0,0,.12); }
.menu-popover { position: fixed; z-index: 80; display: grid; min-width: 10.5rem; padding: .3125rem; border-radius: .6875rem; background: rgba(252,252,253,.97); box-shadow: 0 10px 34px rgba(0,0,0,.16), 0 0 0 .5px rgba(0,0,0,.1); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.menu-popover form { margin: 0; }
.menu-item { display: flex; width: 100%; min-height: 2rem; align-items: center; gap: .5625rem; padding: 0 .625rem; border: 0; border-radius: .375rem; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: .8125rem; text-align: left; text-decoration: none; white-space: nowrap; }
.menu-item > i { width: 1rem; color: var(--muted); font-size: 1rem; text-align: center; }
.menu-item:hover, .menu-item:focus-visible { background: var(--brand); color: #fff; outline: 0; }
.menu-item:hover > i, .menu-item:focus-visible > i { color: #fff; }
.menu-item.is-danger, .menu-item.is-danger > i { color: var(--danger); }
.menu-item.is-danger:hover, .menu-item.is-danger:focus-visible, .menu-item.is-danger:hover > i, .menu-item.is-danger:focus-visible > i { background: var(--danger); color: #fff; }
.menu-separator { height: 1px; margin: .25rem .375rem; background: var(--line-soft); }
.js .menu[open]:not(.is-placed) .menu-popover { visibility: hidden; }

/* ---- 对话框：确认框和表单弹窗同一套外观，按钮在右下，取消在确认左边 ---- */
.dialog { width: min(calc(100vw - 2rem), 28.75rem); max-width: none; max-height: calc(100dvh - 2.5rem); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 1rem; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.24), 0 0 0 .5px rgba(0,0,0,.08); color: var(--text); }
.dialog-wide { width: min(calc(100vw - 2rem), 42.5rem); }
.dialog::backdrop { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialogIn .22s var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(.625rem) scale(.98); } }
.dialog-form { display: grid; margin: 0; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.375rem .25rem; }
.dialog-header > div { display: grid; gap: .25rem; min-width: 0; }
.dialog-header h2 { margin: 0; color: var(--text); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.dialog-header p { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.dialog-close { display: grid; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; place-items: center; margin: -.125rem -.375rem 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); color: var(--muted); cursor: pointer; }
.dialog-close:hover { background: rgba(0,0,0,.1); color: var(--text); }
.dialog-body { display: grid; gap: .875rem; padding: .875rem 1.375rem .375rem; }
.dialog-body > label, .dialog-body fieldset > label { display: grid; gap: .375rem; color: var(--text); font-size: .8125rem; font-weight: 500; }
.dialog-body label small { color: var(--muted); font-size: .75rem; font-weight: 400; }
.dialog-body fieldset { display: grid; gap: .625rem; margin: 0; padding: 0; border: 0; }
.dialog-body legend { margin-bottom: .5rem; color: var(--text); font-size: .8125rem; font-weight: 500; }
.dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.dialog-body .permission-matrix { padding: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .625rem; padding: 1rem 1.375rem 1.25rem; }
.dialog-actions .button { min-width: 5.75rem; }
.dialog-actions.form-actions { padding: .5rem 0 0; }
.dialog-alert .dialog-header { padding-top: 1.375rem; }
.dialog-alert .dialog-header > i { flex: 0 0 auto; color: var(--brand); font-size: 1.6rem; }
.dialog-alert.is-danger .dialog-header > i { color: var(--danger); }

/* ---- 表单底栏：长表单的保存按钮贴在视口底部，不用滚到底去找 ---- */
.form-footer { position: sticky; z-index: 20; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .625rem; margin: 0 0 .875rem; padding: .75rem 1.125rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.form-footer > small { margin-right: auto; color: var(--muted); font-size: .75rem; }

/* ---- 侧边标签：表很多时（字段映射十张表、系统设置六个分区）改用竖排 ---- */
.side-tab-layout { display: grid; grid-template-columns: 14.375rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.side-tabs, .settings-section-nav { position: sticky; top: 4.5rem; display: grid; gap: .125rem; padding: .5rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; }
.side-tabs-label { margin: .5rem .625rem .25rem; color: var(--muted-2); font-size: .6875rem; font-weight: 500; }
.side-tabs-label:first-child { margin-top: .125rem; }
.side-tabs > a, .settings-section-nav > a { display: flex; min-height: 2.125rem; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .625rem; border-radius: .5rem; color: var(--text); font-size: .8125rem; text-decoration: none; }
.side-tabs > a:hover, .settings-section-nav > a:hover { background: rgba(0,0,0,.04); }
.side-tabs > a[aria-selected="true"], .settings-section-nav > a[aria-selected="true"] { background: rgba(0,113,227,.1); color: var(--brand); font-weight: 600; }
.side-tabs > a > span, .settings-section-nav > a > span { display: inline-flex; align-items: center; gap: .5625rem; min-width: 0; }
.settings-section-nav > a i { color: var(--muted); font-size: 1rem; }
.settings-section-nav > a[aria-selected="true"] i { color: var(--brand); }
.side-tabs .count { min-width: 1.25rem; padding: 0 .375rem; border-radius: .625rem; background: rgba(0,0,0,.06); color: var(--muted); font-size: .6875rem; font-weight: 500; line-height: 1.125rem; text-align: center; }
.side-tabs .count.is-alert { background: var(--danger); color: #fff; }
.side-tabs .count.is-ok { background: transparent; color: var(--ok); }

/* ---- 字段映射行：改了下拉才出现保存按钮，避免一屏几十个「保存」 ---- */
.rebind-form { display: flex; align-items: center; justify-content: flex-end; gap: .375rem; margin: 0; }
body.app-layout .rebind-form select { width: 10.625rem; min-height: 1.875rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .75rem; }
table.data-table.mapping-fields { min-width: 37.5rem; }
table.data-table.mapping-fields th, table.data-table.mapping-fields td { padding-right: .875rem; padding-left: .875rem; }
table.data-table.mapping-fields .column-name { margin-right: .375rem; }
[data-rebind-form].is-pristine .button { visibility: hidden; }
.type-tag + .type-tag { margin-left: .25rem; }
.required-mark { margin-left: .125rem; color: var(--danger); font-style: normal; }
table.data-table.mapping-table select { width: 100%; min-width: 11.25rem; max-width: 16.25rem; min-height: 2rem; }

/* ---- 规则说明：排序和计算策略左右两栏 ---- */
.rule-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem; }
.rule-heading { margin: 0 0 .625rem; color: var(--text); font-size: .8125rem; font-weight: 600; }
.rule-order { display: grid; gap: .5rem; margin: 0 0 .625rem; padding: 0; list-style: none; }
.rule-order li { display: grid; grid-template-columns: 1.5rem 4rem minmax(0, 1fr) auto; align-items: center; gap: .625rem; min-height: 2.375rem; padding: 0 .75rem; border-radius: .625rem; background: #fbfbfd; }
.rule-order b { display: grid; width: 1.375rem; height: 1.375rem; place-items: center; border-radius: .375rem; background: var(--brand); color: #fff; font-size: .6875rem; }
.rule-order span, .rule-order em { color: var(--muted); font-size: .75rem; font-style: normal; }
.rule-order strong { color: var(--text); font-size: .8125rem; font-weight: 500; }

/* ---- 设置页账号列表：一行一个账号，模块权限折叠在下面 ---- */
.settings-row.is-actions .is-leading { margin-right: auto; }
label.settings-row { cursor: pointer; }
.settings-note { margin: .125rem 0 0 .25rem; color: var(--muted); font-size: .75rem; }
.account-list { display: grid; }
.account-item { border-top: 1px solid var(--line-soft); }
.account-item:first-child { border-top: 0; }
.account-row { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(16.25rem, auto) 5rem auto; align-items: center; gap: 1rem; min-height: 4rem; padding: .625rem 1.125rem; }
.account-identity { display: grid; gap: .125rem; min-width: 0; }
.account-identity strong { font-size: .8125rem; font-weight: 500; }
.account-identity small { color: var(--muted); font-size: .75rem; }
.account-role-form { display: flex; align-items: center; gap: .375rem; margin: 0; }
body.app-layout .account-role-form select { width: 9.375rem; min-height: 1.875rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .75rem; }
.account-permissions { margin: 0 1.125rem .75rem; border-radius: .625rem; background: #fbfbfd; }
.account-permissions > summary { display: flex; min-height: 2.25rem; align-items: center; justify-content: space-between; gap: .625rem; padding: 0 .75rem; color: var(--link); cursor: pointer; font-size: .8125rem; list-style: none; }
.account-permissions > summary::-webkit-details-marker { display: none; }
.account-permissions > summary i { transition: transform .2s var(--ease); }
.account-permissions[open] > summary i { transform: rotate(180deg); }
.account-permissions .permission-matrix { padding: .25rem .75rem .75rem; }
.permission-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; }
.account-permissions-fixed { margin: -.25rem 1.125rem .75rem; color: var(--muted); font-size: .75rem; }
.run-row.is-static:hover { background: transparent; }

/* ---- 执行明细：一句话结果、明细表工具栏 ---- */
table.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data-table tbody tr.is-flagged td { background: #fffaf2; }
table.data-table tbody tr.is-flagged:hover td { background: #fff4e5; }
.record-filter-empty td { height: auto; padding: 1.5rem 1.125rem; color: var(--muted); text-align: center; }
.block-body .form-hint { margin: .625rem 0 0; }
.result-summary { margin: -.25rem 0 .875rem .25rem; color: var(--muted); font-size: .8125rem; }
.archive-state-inline { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; font-size: .8125rem; }
.archive-state-inline strong { font-weight: 500; }
.detail-filter { display: flex; align-items: center; gap: .5rem; margin: 0 0 0 auto; }
body.app-layout .detail-filter select { width: 7.5rem; min-height: 1.875rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .75rem; }
body.app-layout .detail-filter input { width: 12rem; min-height: 1.875rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .75rem; }
.block-footnote-top { border-top: 0; border-bottom: 1px solid var(--line-soft); }
.block-footnote-actions { display: flex; justify-content: flex-end; }
.block-body > p { margin: 0 0 .375rem; }
.block-body > p:last-child { margin-bottom: 0; }
.type-tag { display: inline-flex; align-items: center; min-height: 1.25rem; padding: 0 .4375rem; border-radius: .375rem; background: rgba(0,0,0,.05); color: var(--muted); font-size: .6875rem; white-space: nowrap; }

/* Between the 880px compaction and the full six-column row, the tracks need to
   be tighter than the default but are not yet ready to collapse.  Scoped as a
   range because this file's media blocks run widest-last: a plain
   `max-width: 1180px` rule placed here would also win on a 375px phone and
   undo the mobile layout. */
@media (min-width: 881px) and (max-width: 1180px) {
  .dedup-rule-summary { grid-template-columns: minmax(7.5rem, 1.3fr) minmax(5.25rem, .9fr) minmax(4rem, .55fr) minmax(5.25rem, .85fr) minmax(5.75rem, 1fr) minmax(5.75rem, 1fr); }
}

/* ==========================================================================
 * 响应式断点
 *
 * Every @media block lives here, below the base rules it overrides, and they
 * run widest to narrowest.  A max-width cascade depends on both: put a wider
 * block after a narrower one and it wins on the small screen the narrow rule
 * was written for.  Add new breakpoints in width order, never at the end.
 * ======================================================================== */

@media (max-width: 1220px) {
  .mapping-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .mapping-layout .side-tabs { position: static; display: flex; gap: .25rem; padding: .25rem; overflow-x: auto; scrollbar-width: none; }
  .mapping-layout .side-tabs-label { display: none; }
  .mapping-layout .side-tabs > a { flex: 0 0 auto; }
  .rule-studio-layout { grid-template-columns: 10.625rem minmax(0,1fr); }
  .rule-validation-rail { position: static; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0,1fr)); }
  .rule-validation-rail section { border-right: 1px solid var(--v3-line); border-bottom: 0; }
}

@media (max-width: 1180px) {
  .cockpit-panel-trend, .cockpit-panel-alerts, .cockpit-panel-health, .cockpit-panel-recent { grid-column: span 6; }
  .cockpit-chart svg { height: 12.5rem; }
}

@media (max-width: 1180px) {
  /* The `.dedup-rule-summary { min-width: 73.75rem }` that used to sit here
     forced the row back to full width exactly when the 880px and 620px rules
     were compacting it, and .dedup-rule-card clips rather than scrolls, so the
     row was cut off - taking 编辑与明细 with it, out of reach under 1180px.
     Its replacement is the range-scoped block below. */
  .dedup-setup-layout { grid-template-columns: 1fr; }
  .dedup-submit-panel { position: static; }
  .dedup-submit-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The project lists need about 760px for five columns.  With the sidebar
   open that is gone below a 1100px window, and the actions column - the
   one people came for - was the part scrolled out of view.  Each project
   becomes a card instead: name and actions on top, the facts beneath. */
@media (max-width: 1100px) {
  table.data-table.is-stacked { min-width: 0; }
  table.data-table.is-stacked thead { display: none; }
  table.data-table.is-stacked tbody { display: block; }
  table.data-table.is-stacked tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: start; gap: .625rem 1rem; padding: .875rem 1.125rem; border-bottom: 1px solid var(--line-soft); }
  table.data-table.is-stacked tbody tr:last-child { border-bottom: 0; }
  table.data-table.is-stacked td { display: block; min-width: 0; height: auto; padding: 0; border: 0; }
  table.data-table.is-stacked td:first-child { grid-column: 1 / 4; grid-row: 1; }
  table.data-table.is-stacked td.col-actions { grid-column: 4; grid-row: 1; width: auto; }
  table.data-table.is-stacked tbody tr:hover td { background: transparent; }
  table.data-table.is-stacked tbody tr[data-row-href]:hover { background: #fafafc; }
}

@media (max-width: 1060px) {
  .block-grid { grid-template-columns: minmax(0, 1fr); }
  .entity-card { grid-template-columns: 1fr; }
  .entity-card-actions { justify-content: flex-end; }
  .project-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-form-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enable-check-grid, .onboarding-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  .execution-center-layout { grid-template-columns: 1fr; }
  .execution-filter-rail { position: static; }
  .execution-filter-rail > form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .execution-filter-rail header, .execution-filter-rail .button, .execution-filter-rail > form > a { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .career-login-shell { grid-template-columns: minmax(0, .9fr) minmax(25rem, 1fr); }
  .career-login-intro dl { grid-template-columns: 1fr; }
  .career-login-intro dl div { min-height: 0; }
  .rule-studio-layout { grid-template-columns: minmax(0, 1fr); }
  .rule-step-rail, .rule-editor-column, .rule-validation-rail { min-width: 0; max-width: 100%; }
  .rule-step-rail { position: static; }
  .rule-step-rail ol { width: 100%; max-width: 100%; grid-template-columns: repeat(5, minmax(7.5rem,1fr)); overflow-x: auto; }
  .rule-step-rail li { min-height: 3.625rem; }
  .rule-validation-rail { grid-column: auto; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 880px) {
  .page-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
  .side-tab-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .side-tabs, .settings-section-nav { position: static; display: flex; gap: .25rem; padding: .25rem; overflow-x: auto; scrollbar-width: none; }
  .side-tabs-label { display: none; }
  .side-tabs > a, .settings-section-nav > a { flex: 0 0 auto; }
  .rule-grid { grid-template-columns: minmax(0, 1fr); gap: 1.125rem; }
  .navigation a { overflow: hidden; padding: .625rem .25rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
  .nav-group-toggle { padding: .625rem .25rem; justify-content: center; font-size: .72rem; }
  .nav-caret { margin-left: .1875rem; }
  .nav-group:not(.is-open) .nav-group-links { display: none; }
  .mobile-account-actions { display: block; padding-top: 1.125rem; border-top: 1px solid var(--line); }
  .mobile-account-actions .button { width: 100%; }
  .workspace.dashboard-page { padding: 0; }
  .page-header { align-items: flex-start; margin-bottom: 1.875rem; }
  .cockpit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dedup-toolbar { grid-template-columns: auto minmax(0, 1fr) minmax(8rem, 10rem); }
  .dedup-filter-result { grid-column: 2 / -1; }
  .dedup-rule-summary { grid-template-columns: minmax(13.125rem, 1.4fr) repeat(3, minmax(6.875rem, 1fr)) auto; }
  .dedup-rule-summary > div:nth-child(6) { display: none; }
  /* Drop 扫描记录 and 重复分组 first: the run's status and what it deleted are
     what the row is scanned for, and both stay. */
  .dedup-run-row { grid-template-columns: .625rem minmax(7.5rem, 1.4fr) minmax(5.25rem, .8fr) minmax(5.25rem, .8fr) auto; }
  .dedup-run-row > span:nth-child(4), .dedup-run-row > span:nth-child(5) { display: none; }
  .dedup-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dedup-rule-edit { grid-column: 1 / -1; }
  .v2-project-layout { grid-template-columns: 1fr; }
  .v2-project-layout > .v2-detail-section { grid-column: auto; }
  .v2-project-layout > .v2-detail-section:last-child { grid-column: auto; }
  .project-summary-card { grid-template-columns: minmax(13.125rem, 1.5fr) repeat(2, minmax(6.875rem, 1fr)) auto; gap: .875rem; }
  .project-summary-card > div:nth-child(4) { display: none; }
  .workspace { padding: 0 .875rem 1.875rem; }
  .utility-bar { margin-right: -.875rem; margin-left: -.875rem; padding: 0 .875rem; }
  .utility-context { display: none; }
  .utility-links { width: 100%; justify-content: flex-end; }
  .sidebar-collapse { display: none; }
  .app-layout { padding-bottom: 4.625rem; display: block; padding: 0; }
  .mobile-topbar { position: sticky; z-index: 45; top: 0; display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: .875rem; padding: .625rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); box-shadow: 0 6px 20px rgba(16,24,40,.06); backdrop-filter: blur(16px); }
  .mobile-brand { display: flex; min-width: 0; align-items: center; gap: .625rem; color: var(--text); text-decoration: none; }
  .mobile-brand .brand-mark { display: grid; place-items: center; flex: 0 0 2.125rem; width: 2.125rem; height: 2.125rem; border: 0; border-radius: .5625rem; background: var(--brand); color: #fff; font-weight: 600; font-size: 1.15rem; }
  .mobile-brand > span:last-child { display: grid; min-width: 0; }
  .mobile-brand small { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-menu-toggle { min-height: 2.375rem; padding: .4375rem .8125rem; border: 1px solid var(--line-strong); border-radius: .625rem; background: #fff; color: #344054; font-weight: 650; }
  .sidebar { top: auto; right: 0; bottom: 0; left: 0; min-height: 0; overflow: visible; border-top: 1px solid var(--line); border-right: 0; background: rgba(250,250,252,.94); position: fixed; z-index: 60; inset: 0 auto 0 0; display: flex; width: min(86vw, 18.75rem); height: 100dvh; padding: 1.375rem 1rem; overflow-y: auto; border: 0; transform: translateX(-105%); transition: transform 200ms ease; }
  .brand, .sidebar-footer { display: flex; }
  .navigation { gap: .1875rem; display: grid; grid-template-columns: 1fr; }
  .navigation a, .nav-group-toggle { justify-content: space-between; padding: .625rem .75rem; text-align: left; font-size: .88rem; }
  .nav-group-links { display: none; grid-template-columns: 1fr; padding-left: .75rem; }
  .nav-group.is-open .nav-group-links { display: grid; }
  .sidebar-backdrop { position: fixed; z-index: 55; inset: 0; display: block; border: 0; background: rgba(15,23,42,.46); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .mobile-menu-open { overflow: hidden; }
  body.app-layout.mobile-menu-open .sidebar { transform: translateX(0); }
  body.app-layout.mobile-menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .workspace::before { left: 0; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header .action-row { width: 100%; margin-left: 0; justify-content: flex-start; }
  .settings-card, .settings-card:last-child { grid-column: auto; }
  .project-summary-card, .dedup-rule-summary { overflow-x: auto; }
  .workspace, .workspace.dashboard-page { width: 100%; padding: 1.5rem 1.125rem 3.25rem; }
  .project-toolbar { grid-template-columns: 1fr; }
  .dedup-toolbar, .dedup-plan-grid, .dedup-target-grid { grid-template-columns: 1fr; }
  .dedup-new-form { grid-template-columns: 1fr; }
  .guided-table-filter { grid-template-columns: 1fr; }
  .dedup-toolbar, .dedup-plan-grid, .dedup-target-grid, .dedup-submit-actions { grid-template-columns: 1fr; }
  .dedup-step-actions { align-items: stretch; flex-direction: column; }
  .dedup-step-actions .button { width: 100%; }
  .business-sync-import-form { grid-template-columns: 1fr; }
  .business-sync-room-form { grid-template-columns: 1fr; }
  .business-sync-schedule-card form { grid-template-columns: 1fr auto; }
  .business-sync-date-arrow { display: none; }
  .business-sync-import-form .button, .business-sync-room-form .button { width: 100%; }
  .business-sync-progress-meta { display: grid; gap: .1875rem; }
  .business-sync-detail-summary { grid-template-columns: 1fr 1fr; }
  .business-sync-detail-summary > div { border-top: 1px solid var(--line); }
  .business-sync-detail-summary > div:nth-child(-n+2) { border-top: 0; }
  .business-sync-detail-summary > div:nth-child(2n) { border-right: 0; }
  body.app-layout, body.sidebar-collapsed { display: block; }
  body.app-layout .sidebar { position: fixed; width: min(86vw, 18.75rem); height: 100dvh; transform: translateX(-105%); }
  .mobile-menu-open .sidebar { transform: translateX(0); }
  body.app-layout .workspace { --gutter: .875rem; padding: 0 0 1.875rem; }
  body.app-layout .utility-context { display: none; }
  body.app-layout .utility-links { width: 100%; justify-content: flex-end; }
  body.app-layout .sidebar-collapse { display: none; }
}

@media (max-width: 760px) {
  .auth-layout { display: block; padding: 0; background: #fff; }
  .auth-main { width: 100%; }
  .career-login-visual { display: none; }
  .career-login-shell { display: block; }
  .career-login-form-panel { min-height: 100vh; padding: 1.5rem; }
  .career-login-form { padding: 1.875rem 1.5rem; }
  .career-login-mobile-brand { display: flex; align-items: center; justify-content: center; gap: .5625rem; margin-bottom: clamp(3.25rem, 10vh, 5.625rem); font-size: 1rem; color: var(--text); }
}

@media (max-width: 700px) {
  .cockpit-bar-actions { width: 100%; flex-wrap: wrap; }
  .cockpit-scope-note { display: none; }
}

@media (max-width: 700px) {
  .account-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: .625rem .75rem; }
  .account-role-form { grid-column: 1 / -1; grid-row: 2; }
  .breadcrumbs { margin-bottom: .875rem; }
  .title-with-status { align-items: flex-start; flex-direction: column; }
  .list-overview { align-items: flex-start; flex-direction: column; }
  .list-overview p { text-align: left; }
  .entity-card { padding: 1.125rem; }
  .entity-card-title-row { align-items: flex-start; flex-direction: column-reverse; }
  .entity-facts { grid-template-columns: 1fr; }
  .entity-facts > span { padding: .5rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .entity-card-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .entity-card-actions > *, .entity-card-actions .button { width: 100%; }
  .project-command-grid, .project-workspace-grid, .project-settings-grid, .result-metric-strip { grid-template-columns: 1fr; }
  .danger-zone, .removed-project-state { align-items: stretch; flex-direction: column; }
  .run-feed-item { grid-template-columns: .625rem minmax(0, 1fr) auto; }
  .run-feed-item time { display: none; }
  .schedule-form-inline { grid-template-columns: 1fr; }
  .one-time-secret { grid-template-columns: 1fr; }
  .connection-test-card { align-items: stretch; flex-direction: column; }
  .execution-filter-rail > form { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .detail-filter { flex: 1 1 100%; margin-left: 0; }
  body.app-layout .detail-filter input { flex: 1 1 auto; width: auto; min-width: 0; }
  table.data-table.mapping-fields { min-width: 0; }
  table.data-table.mapping-fields thead { display: none; }
  table.data-table.mapping-fields tbody { display: block; }
  table.data-table.mapping-fields tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .375rem .625rem; padding: .75rem .875rem; border-bottom: 1px solid var(--line-soft); }
  table.data-table.mapping-fields tbody tr:last-child { border-bottom: 0; }
  table.data-table.mapping-fields td { display: block; height: auto; padding: 0; border: 0; }
  table.data-table.mapping-fields td:nth-child(1) { grid-column: 1; grid-row: 1; }
  table.data-table.mapping-fields td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  table.data-table.mapping-fields td:nth-child(2), table.data-table.mapping-fields td.col-actions { grid-column: 1 / -1; width: auto; text-align: left; }
  table.data-table.mapping-fields tbody tr:hover td { background: transparent; }
  .rebind-form { justify-content: flex-start; }
  body.app-layout .rebind-form select { flex: 1 1 auto; width: auto; min-width: 0; }
  table.data-table.is-stacked tr { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .75rem; padding: .75rem .875rem; }
  table.data-table.is-stacked td:first-child { grid-column: 1; }
  table.data-table.is-stacked td.col-actions { grid-column: 2; }
  table.data-table.is-stacked td:not(:first-child):not(.col-actions) { grid-column: 1 / -1; }
  .page-actions { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
  .page-actions > .button, .page-actions > form, .page-actions > form > .button { width: 100%; }
  .callout { flex-wrap: wrap; align-items: flex-start; }
  .callout-body { flex-basis: calc(100% - 2.5rem); }
  .callout > form, .callout > .button, .callout > form > .button { width: 100%; }
  .stat-strip, .settings-overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 4.375rem; padding: .75rem .875rem; }
  .table-toolbar { padding: .75rem .875rem; }
  .search-field { flex: 1 1 100%; }
  .block-header { flex-wrap: wrap; padding: .75rem .875rem; }
  .run-row { grid-template-columns: .5rem minmax(0, 1fr) auto; padding: .625rem .875rem; }
  .run-row-metric, .run-row-chevron { display: none; }
  .settings-row { flex-wrap: wrap; gap: .625rem; padding: .75rem .875rem; }
  .settings-row:has(.switch), .settings-row.is-actions { flex-wrap: nowrap; }
  .settings-row:not(:has(.switch)):not(.is-actions) .settings-row-control { width: 100%; justify-content: flex-start; }
  body.app-layout .settings-row-control input:not([type="checkbox"]), body.app-layout .settings-row-control select { flex: 1 1 auto; width: auto; min-width: 0; }
  .settings-row.is-actions { flex-wrap: wrap; }
  .settings-row.is-actions > small { flex-basis: 100%; }
  .dialog-grid { grid-template-columns: minmax(0, 1fr); }
  .dialog-header, .dialog-body, .dialog-actions { padding-right: 1.125rem; padding-left: 1.125rem; }
  .dialog-actions .button { flex: 1 1 0; min-width: 0; }
  .form-footer { padding: .625rem .875rem; }
  .form-footer > small { flex-basis: 100%; }
  .form-footer > .button { flex: 1 1 0; }
  .flow-steps { padding: .25rem .875rem .5rem; }
  .table-map-grid { grid-template-columns: minmax(0, 1fr); }
  .cockpit-kpis { grid-template-columns: 1fr; }
  .cockpit-kpi { min-height: 8.25rem; }
  .page-header .button { width: 100%; }
  .settings-card:last-child { grid-column: auto; }
  .permission-matrix { grid-template-columns: 1fr; }
  .task-summary-grid { grid-template-columns: 1fr; }
  .definition-list div { display: grid; gap: .3125rem; }
  .definition-list dd { text-align: left; }
  .project-toolbar { grid-template-columns: 1fr 1fr; }
  .project-toolbar .project-filter-field { grid-column: 1 / -1; }
  .project-toolbar .project-filter-result { grid-column: 1 / -1; }
  .project-summary-card { grid-template-columns: minmax(0, 1fr) auto; gap: .8125rem; padding: 1.125rem; }
  .project-summary-card > div { display: none; }
  .dedup-toolbar { grid-template-columns: 1fr 1fr; }
  .dedup-toolbar .button-primary { grid-column: 1 / -1; width: 100%; }
  .dedup-toolbar .dedup-filter-field { grid-column: 1 / -1; }
  .dedup-filter-result { grid-column: 1 / -1; }
  .dedup-target-grid, .dedup-plan-grid, .dedup-detail-grid { grid-template-columns: 1fr; }
  .dedup-rule-summary { grid-template-columns: minmax(0, 1fr) auto; gap: .8125rem; padding: 1.125rem; }
  .dedup-rule-summary > div { display: none; }
  .dedup-rule-summary .dedup-rule-identity, .dedup-rule-summary > div:nth-child(3) { display: grid; }
  .dedup-rule-summary .dedup-rule-identity { grid-column: 1; }
  .dedup-rule-detail-toggle { grid-column: 2; grid-row: 1; }
  /* Phone: the trigger and time carry the row; the link moves under them
     rather than competing for the same line. */
  .dedup-run-row { grid-template-columns: .625rem minmax(0, 1fr); gap: .625rem; padding: .875rem 1rem; }
  .dedup-run-row > span:nth-child(n+3) { display: none; }
  .dedup-run-row .dedup-run-link { display: block; grid-column: 2; }
  .dedup-detail-grid, .dedup-rule-actions { padding-right: 1.125rem; padding-left: 1.125rem; }
  h1 { font-size: 1.85rem; }
  .page-header { display: flex; }
  .page-header .button, .page-header .action-row, .page-header .action-row .button { width: 100%; }
  .page-header .action-row { display: grid; grid-template-columns: 1fr; }
  .project-toolbar, .dedup-toolbar { grid-template-columns: 1fr; }
  .project-toolbar .project-filter-field, .dedup-toolbar .button-primary, .dedup-toolbar .dedup-filter-field, .dedup-filter-result { grid-column: auto; }
  .project-toolbar .button, .dedup-toolbar .button { width: 100%; }
  .settings-card, .section-card, .form-card { padding: 1.125rem; }
  .permission-matrix, .dedup-target-grid, .dedup-plan-grid, .dedup-detail-grid { grid-template-columns: 1fr; }
  .action-row { display: grid; grid-template-columns: 1fr; }
  .action-row .button, .action-row form, .action-row form .button { width: 100%; }
  th, td { padding: .75rem; }
  .rule-validation-rail { grid-template-columns: 1fr; }
  .failure-presentation > header { flex-direction: column; }
  .failure-presentation dl div { grid-template-columns: 1fr; gap: .1875rem; }
  .preview-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-metric-grid article:nth-child(2) { border-right: 0; }
  .preview-metric-grid article:nth-child(n+3) { border-top: 1px solid var(--v3-line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Batch expense entry */
.expense-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .875rem 1rem; }
.expense-head label { display: grid; gap: .375rem; color: var(--text); font-size: .8125rem; font-weight: 500; }
.expense-head label small { color: var(--muted); font-size: .75rem; font-weight: 400; }
.expense-head-wide { grid-column: 1 / -1; }
.expense-total { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.expense-total strong { color: var(--text); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.expense-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-block: 0 .75rem; }
.expense-tools-label { color: var(--muted); font-size: .75rem; }
.expense-paste { display: contents; }
.expense-paste > summary { list-style: none; }
.expense-paste > summary::-webkit-details-marker { display: none; }
.expense-paste[open] > label { flex: 1 0 100%; }
.expense-paste textarea { width: 100%; font: inherit; font-size: .8125rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: .75rem; }
.expense-lines input, .expense-lines select { width: 100%; min-width: 6rem; min-height: 2rem; padding-block: .25rem; font-size: .8125rem; }
.expense-lines td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.run-row.is-static { cursor: default; }
.inline-label { display: inline-flex; align-items: center; gap: .375rem; color: var(--muted); font-size: .75rem; }

/* Login slider puzzle */
.login-captcha-dialog { width: min(calc(100vw - 2rem), 21.75rem); }
.login-captcha { display: grid; justify-items: center; gap: .75rem; padding: 1rem 1.125rem 1.125rem; }
.login-captcha-head { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 18.75rem; }
.login-captcha-head h2 { margin: 0; color: var(--text); font-size: 1rem; font-weight: 600; }
.login-captcha-tools { display: flex; gap: .25rem; }
.login-captcha-icon { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.login-captcha-icon:hover { background: var(--surface-soft); color: var(--text); }
.login-captcha-icon:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 1px; }
.login-captcha-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .375rem; width: 100%; max-width: 18.75rem; margin: 0; color: var(--text); font-size: .9rem; }
.login-captcha-prompt small { width: 100%; color: var(--muted); font-size: .75rem; text-align: center; }
.login-captcha-chip { display: grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 .375rem; border: 1px solid var(--line-strong); border-radius: .5rem; background: #fff; font-size: 1rem; font-weight: 600; }
.login-captcha-chip.is-done { border-color: var(--success); background: #dcfae6; color: #05603a; }
.login-captcha-status { width: 100%; max-width: 18.75rem; min-height: 1.25rem; margin: 0; color: var(--muted); font-size: .8rem; text-align: center; }
.login-captcha-status[data-tone="error"] { color: var(--danger); }
.login-captcha-status[data-tone="success"] { color: var(--success); }
.login-captcha-stage { position: relative; width: 100%; max-width: 18.75rem; aspect-ratio: 5 / 3; overflow: hidden; border-radius: .75rem; background: #e4e7ec; cursor: crosshair; touch-action: manipulation; }
.login-captcha-image { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.login-captcha-marks { position: absolute; inset: 0; pointer-events: none; }
.login-captcha-mark { position: absolute; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border-radius: 50%; background: rgba(37,99,235,.92); color: #fff; font-size: .75rem; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.login-captcha-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; background: #f2f4f7; color: var(--muted); font-size: .8rem; }
.login-captcha-dialog.is-failed .login-captcha-stage { animation: captchaShake .36s ease-in-out; }
.login-captcha-dialog.is-done .login-captcha-stage { outline: 2px solid var(--success); outline-offset: -2px; }
@keyframes captchaShake { 20%, 60% { transform: translateX(-.3125rem); } 40%, 80% { transform: translateX(.3125rem); } }
@media (prefers-reduced-motion: reduce) { .login-captcha-dialog.is-failed .login-captcha-stage { animation: none; } }

/* ---- 运行日志与审计：一屏看清后台状态，分区留白、左说明右数值 ---- */
.ops-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.ops-header h1 { margin: 0 0 .375rem; font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; }
.ops-header p { margin: 0; color: var(--muted); font-size: .875rem; }
.ops-header-actions { display: flex; gap: .5rem; }
.ops-verdict { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-bottom: 1rem; padding: 1.125rem 1.375rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-xs); }
.ops-verdict-main { display: flex; align-items: center; gap: .75rem; }
.ops-verdict-main strong { display: block; font-size: 1.0625rem; font-weight: 600; }
.ops-verdict-main span { color: var(--muted); font-size: .8125rem; }
.ops-verdict-dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 .25rem rgba(52,199,89,.15); }
.ops-verdict.is-attention .ops-verdict-dot { background: #ff9f0a; box-shadow: 0 0 0 .25rem rgba(255,159,10,.16); }
.ops-verdict-facts { display: flex; flex-wrap: wrap; gap: 1.75rem; margin: 0; }
.ops-verdict-facts div { display: grid; gap: .125rem; }
.ops-verdict-facts dt { color: var(--muted); font-size: .75rem; }
.ops-verdict-facts dd { margin: 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ops-card { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-xs); overflow: hidden; }
.ops-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.125rem 1.375rem .875rem; }
.ops-card-head h2 { margin: 0 0 .1875rem; font-size: 1rem; font-weight: 600; }
.ops-card-head p { margin: 0; color: var(--muted); font-size: .8125rem; }
.ops-count { display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .5rem; border-radius: var(--radius-pill); background: var(--line-soft); color: var(--text); font-size: .75rem; font-weight: 600; }
.ops-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.ops-row { display: flex; align-items: center; gap: .875rem; padding: .8125rem 1.375rem; border-bottom: 1px solid var(--line-soft); }
.ops-row:last-child { border-bottom: 0; }
.ops-row-text { flex: 1 1 auto; min-width: 0; display: grid; gap: .125rem; }
.ops-row-text strong { font-size: .875rem; font-weight: 600; }
.ops-row-text small { color: var(--muted); font-size: .78125rem; overflow-wrap: anywhere; }
.ops-row-value { flex: 0 0 auto; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.ops-row-value.is-bad { color: var(--danger); font-weight: 600; }
.ops-dot { flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); }
.ops-dot.is-good { background: var(--ok); }
.ops-dot.is-busy { background: var(--brand); }
.ops-dot.is-warn { background: #ff9f0a; }
.ops-dot.is-bad { background: var(--danger); }
.ops-dot.is-idle { background: var(--line-strong); }
.ops-time { flex: 0 0 auto; width: 6.25rem; color: var(--muted); font-size: .78125rem; font-variant-numeric: tabular-nums; }
.ops-empty { margin: 0; padding: 1.25rem 1.375rem 1.5rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .8125rem; }
.ops-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.ops-filters select { min-width: 9rem; height: 2rem; padding: 0 1.75rem 0 .625rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--card); color: var(--text); font-size: .8125rem; }
.ops-pager { display: flex; align-items: center; gap: .75rem; padding: .875rem 1.375rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .8125rem; }
.ops-note { margin: 0; padding: 0 1.375rem 1.125rem; color: var(--muted); font-size: .75rem; }
@media (max-width: 40rem) {
  .ops-row { flex-wrap: wrap; }
  .ops-time { width: 100%; }
  .ops-verdict-facts { gap: 1.25rem; }
}

/* ---- 亿企代账同步 ---- */
.yiqi-inline-callout { margin: 0 0 .875rem; }
.block > .yiqi-inline-callout { margin: .875rem 1.125rem 0; }
.block > .settings-group { margin: 0; border: 0; border-radius: 0; }
.yiqi-secondary-action { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0; padding: .75rem 1.125rem; border-top: 1px solid var(--line-soft); }
.settings-section > .yiqi-secondary-action { margin-top: .625rem; padding: 0; border-top: 0; }
.yiqi-secondary-action.is-plain { padding: 0 0 .875rem; border-top: 0; }
.yiqi-secondary-action small { font-size: .75rem; }
.settings-row.yiqi-stacked-row { flex-direction: column; align-items: stretch; gap: .5rem; }
.settings-row.yiqi-stacked-row textarea, body.app-layout .settings-row.yiqi-stacked-row input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.settings-row.yiqi-stacked-row textarea { min-height: 5.5rem; resize: vertical; }
.yiqi-row-actions { display: inline-flex; align-items: center; gap: .375rem; }
.yiqi-row-actions form { margin: 0; }
table.data-table.yiqi-dataset-table td > span + small { display: block; margin-top: .125rem; color: var(--muted); font-size: .75rem; }
table.data-table td > .status-pill + small { display: block; margin-top: .25rem; color: var(--muted); font-size: .75rem; line-height: 1.45; white-space: normal; }
table.data-table.yiqi-field-table { min-width: 52rem; }
table.data-table.yiqi-field-table td { height: 3.25rem; }
table.data-table.yiqi-field-table .yiqi-check-col { width: 3.5rem; text-align: center; }
table.data-table.yiqi-field-table .yiqi-check-col input { width: 1rem; height: 1rem; min-height: 0; }
table.data-table.yiqi-field-table .yiqi-check-col .ti-lock { color: var(--muted-2); }
body.app-layout table.data-table.yiqi-field-table td input:not([type="checkbox"]) { width: 100%; min-width: 11rem; min-height: 2rem; }
table.data-table.yiqi-field-table td > label strong { font-weight: 500; }
.yiqi-form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin: 0 0 .875rem; }
table.data-table tr.yiqi-group-row th, table.data-table tr.yiqi-group-row td { height: 2.75rem; background: #fbfbfd; }
table.data-table tr.yiqi-group-row th { color: var(--text); font-size: .8125rem; font-weight: 600; text-align: left; }
table.data-table tr.yiqi-group-row th small { margin-left: .625rem; color: var(--muted); font-size: .75rem; font-weight: 400; }
.yiqi-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3125rem; }
table.data-table td.yiqi-reason { min-width: 18rem; white-space: normal; line-height: 1.5; }
table.data-table td small code { font-size: .6875rem; word-break: break-all; }
@media (max-width: 48rem) {
  .yiqi-row-actions { flex-direction: column; align-items: stretch; }
}
table.data-table .yiqi-nowrap { white-space: nowrap; }
