/* Supply Hub design system: white surfaces, one blue accent, quiet borders. */
:root {
  --brand-50: #eff4ff;
  --brand-100: #dbe7ff;
  --brand-200: #bcd2ff;
  --brand-500: #3b73f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-ring: rgba(37, 99, 235, .18);

  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --faint: #94a3b8;

  --bg: #f5f7fb;
  --paper: #fff;
  --soft: #f8fafd;
  --line: #e5eaf2;
  --line-soft: #eef2f7;

  --ok: #047857; --ok-bg: #e7f6ef;
  --warn: #b45309; --warn-bg: #fdf3e3;
  --bad: #c2410c; --bad-bg: #fdeee6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
  --sidebar: 248px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --accent: var(--brand-600);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
::selection { background: var(--brand-100); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #b5c2d6; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 40; background: #fff; padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
svg { flex-shrink: 0; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px 16px;
  background: var(--paper); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 22px; color: var(--ink); }
.brand-logo { width: 34px; height: 34px; display: block; filter: drop-shadow(0 4px 10px rgba(37, 99, 235, .28)); }
.brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 1px; color: var(--faint); font-size: 11px; }

.scope-block { margin: 0 4px 18px; }
.scope-block label { display: block; margin: 0 0 6px 2px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.scope-block select, .select {
  width: 100%; height: 38px; padding: 0 34px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background-color: var(--soft);
  appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.scope-block select:hover { border-color: var(--brand-200); background-color: #fff; }
.scope-block select:focus { outline: 0; border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-ring); background-color: #fff; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 6px 12px 6px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.nav-label-gap { margin-top: 14px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); text-align: left; text-decoration: none;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-item .nav-icon { display: inline-flex; width: 18px; height: 18px; color: var(--faint); transition: color .15s; }
.nav-item .nav-icon svg { width: 18px; height: 18px; }
.nav-item:hover { background: var(--soft); color: var(--ink); }
.nav-item:hover .nav-icon { color: var(--ink-2); }
.nav-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.nav-item.active .nav-icon { color: var(--brand-600); }
/* Boards still being built (index.html data-dev): a small tag; a pseudo-element, so page titles stay the name */
.nav-item[data-dev]::after { content: "开发中"; margin-left: auto; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--faint); font-size: 10.5px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand-600);
}
.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 12px; border-radius: 10px; background: var(--soft);
  color: var(--muted); font-size: 12px;
}
.beta-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }

.main-shell { margin-left: var(--sidebar); min-width: 0; flex: 1; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  height: 68px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-kicker, .section-kicker { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--brand-600); text-transform: uppercase; }
.topbar .top-kicker { color: var(--faint); }
.topbar h1 { margin: 1px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.top-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.top-meta > span:not(.status-pill) { padding: 5px 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line-soft); }

.content-shell { max-width: 1600px; margin: 0 auto; padding: 28px 32px 56px; }
.view-panel { display: none; }
.view-panel.active { display: block; animation: rise .28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 14px; }
.page-intro h2 { margin: 2px 0 2px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.page-intro p strong { color: var(--brand-700); font-weight: 600; }
.muted { color: var(--muted); font-size: 12.5px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 18px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700);
  font-size: 13px; line-height: 1.6;
}

/* ---------- surfaces & controls ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.status-ok { color: var(--ok); background: var(--ok-bg); }
.status-beta { color: var(--warn); background: var(--warn-bg); }
.status-pending { color: var(--bad); background: var(--bad-bg); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.button:active { transform: scale(.98); }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.button-primary:hover { background: var(--brand-700); }
.button-light { background: #fff; color: var(--ink-2); border-color: var(--line); }
.button-light:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.button[aria-busy=true] svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.toolbar input, .toolbar select {
  min-width: 230px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-ring); }

.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.icon-button:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.icon-button svg { width: 18px; height: 18px; }
.mobile-only { display: none; }

/* ---------- tables ---------- */
.table-scroll { overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.data-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 5px 8px; background: var(--soft); color: var(--muted);
  text-align: left; font-size: 11px; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.data-table td { padding: 4px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; white-space: nowrap; }
.data-table tbody tr { transition: background-color .12s; }
.data-table tbody tr:hover td { background: #f6f9ff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td strong { display: block; color: var(--ink); font-weight: 600; }
.data-table td small { display: block; margin-top: 1px; max-width: 330px; overflow: hidden; text-overflow: ellipsis; color: var(--faint); font-size: 11px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.source-action {
  border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-700);
  padding: 8px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.source-action:hover { background: var(--brand-100); border-color: var(--brand-200); }
.source-action:disabled { opacity: .55; cursor: progress; }
.empty-cell { text-align: center !important; color: var(--muted) !important; padding: 40px !important; }

/* Skeleton while data loads. */
.loading-block {
  position: relative; margin: 18px; padding: 44px 20px; border-radius: var(--radius);
  text-align: center; color: var(--muted); font-size: 13px;
  background: linear-gradient(90deg, var(--soft) 0%, #eef3fb 45%, var(--soft) 90%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
/* Every loading block carries a moving bar; blocks with a known percentage show .progress instead. */
.loading-block:not(:has(.progress))::after {
  content: ""; display: block; width: min(320px, 70%); height: 6px; margin: 14px auto 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-500) 0 30%, var(--brand-100) 30% 100%); background-size: 200% 100%;
  animation: progress-slide 1.2s linear infinite;
}
.loading-block:has(.progress) { animation: none; background: var(--soft); }
.progress { width: min(520px, 100%); margin: 0 auto; text-align: left; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--ink-2); font-size: 13px; }
.progress-head strong { color: var(--brand-700); font-variant-numeric: tabular-nums; }
.progress-track { height: 8px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--brand-500); transition: width .4s ease; }
.progress-track.is-indeterminate .progress-fill { animation: progress-move 1.2s ease-in-out infinite; }
@keyframes progress-move { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@keyframes progress-slide { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Typeable filter boxes (ui.js): the select draws the box and caret, the text box on top takes typing. */
.combo { position: relative; display: block; }
.combo > select { width: 100%; color: transparent !important; pointer-events: none; }
.combo > select option { color: var(--ink); }
/* (.combo > input: stronger than the form / toolbar input rules of theme.css, which would draw a second box) */
.combo > input.combo-input, .combo > input.combo-input:focus {
  position: absolute; inset: 1px 30px 1px 1px; width: auto; min-width: 0; height: auto; padding: 0 0 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; outline: 0;
  box-shadow: none; text-overflow: ellipsis;
}
.combo > input.combo-input[readonly] { cursor: pointer; }
.combo > input.combo-input:disabled { color: var(--faint); cursor: not-allowed; }
.combo:focus-within > select { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-ring); }
.combo-list {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(520px, 90vw);
  max-height: 300px; margin: 0; padding: 4px; overflow: auto; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  color: var(--ink); font-size: 13px; font-weight: 500; text-align: left;
}
.combo-list li { padding: 6px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.combo-list li:hover, .combo-list li.is-active { background: var(--brand-50); color: var(--brand-700); }
.combo-list li[aria-selected=true] { font-weight: 700; }
.combo-list li.combo-empty { color: var(--muted); cursor: default; }

/* Resizable table columns (ui.js resizableColumns). */
.col-resizable { position: relative; }
.col-resizer { position: absolute; top: 0; right: -3px; z-index: 2; width: 7px; height: 100%; cursor: col-resize; }
.col-resizer:hover, .is-col-resizing .col-resizer:active { background: var(--brand-200); }
.is-col-resizing { cursor: col-resize; user-select: none; }
table.is-resizable .col-pinned { position: sticky; z-index: 3; background: #fff; }
table.is-resizable thead th.col-pinned { z-index: 7; background: var(--soft); }
table.is-resizable tr.rp-total .col-pinned { background: var(--soft); }
table.is-resizable td, table.is-resizable th { max-width: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Headers wrap between words; a column starts at least as wide as its longest word (break-word, unlike
   anywhere, keeps that minimum), so no word is split unless the column is dragged narrower. */
table.is-resizable thead th { white-space: normal; overflow-wrap: break-word; text-overflow: clip; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.rule-card {
  padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s;
}
.rule-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.rule-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; font-size: 15px; }
.rule-card p { margin: 6px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.rule-card p strong { color: var(--ink-2); font-weight: 600; }

/* ---------- drawer ---------- */
.drawer-root { position: fixed; inset: 0; z-index: 30; }
.drawer-root[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0; width: 100%; border: 0;
  background: rgba(15, 23, 42, .32); backdrop-filter: blur(2px); animation: fade .2s ease;
}
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%);
  display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-lg);
  animation: slide-in .28s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 26px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.01em; }
.drawer-content { padding: 22px 26px; overflow: auto; }
.detail-intro {
  margin-bottom: 16px; padding: 18px 20px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}
.detail-intro p { margin: 0 0 10px; font-size: 14px; }
.detail-intro small { color: rgba(255, 255, 255, .8); }

@media (max-width: 1100px) {
  .content-shell { padding: 24px; }
  .topbar { padding: 0 24px; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main-shell { margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .top-title { flex: 1; min-width: 0; }
  .topbar .top-kicker { display: none; }
  .topbar h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-meta { gap: 8px; }
  .top-meta > span:not(.status-pill) { display: none; }
  .topbar .button { width: 36px; padding: 0; }
  .topbar .button span { display: none; }
  .content-shell { padding: 18px 14px 40px; }
  .page-intro { display: block; }
  .page-intro h2 { font-size: 21px; }
  .rules-grid { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .toolbar input { min-width: 0; flex: 1; }
  .drawer-content { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Collapsible sidebar (desktop): icons only, choice remembered per browser. */
.sidebar, .main-shell { transition: width .2s var(--ease), margin-left .2s var(--ease), padding .2s var(--ease); }
.sidebar-toggle {
  display: grid; place-items: center; width: 28px; height: 28px; margin-left: auto; padding: 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.sidebar-toggle:hover { background: var(--soft); border-color: var(--line); color: var(--ink-2); }
.sidebar-toggle svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
@media (min-width: 761px) {
  html.sidebar-collapsed { --sidebar: 68px; }
  html.sidebar-collapsed .sidebar { padding: 20px 10px 16px; }
  html.sidebar-collapsed .brand { flex-direction: column; gap: 12px; padding: 2px 0 16px; }
  html.sidebar-collapsed .brand > span { display: none; }
  html.sidebar-collapsed .sidebar-toggle { margin: 0; }
  html.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
  html.sidebar-collapsed .nav-label { height: 1px; margin: 8px 10px; padding: 0; overflow: hidden; font-size: 0; background: var(--line); }
  html.sidebar-collapsed .side-nav > .nav-label:first-child { display: none; }
  html.sidebar-collapsed .nav-item { justify-content: center; gap: 0; padding: 10px 0; font-size: 0; }
  html.sidebar-collapsed .nav-item.active::before { left: -10px; }
  html.sidebar-collapsed .nav-item[data-dev]::after { content: ""; position: absolute; top: 6px; right: 10px; width: 6px; height: 6px; padding: 0; border: 0; background: var(--faint); }
  html.sidebar-collapsed .sidebar-foot { flex-direction: column; gap: 6px; padding: 8px 0; background: transparent; }
  html.sidebar-collapsed .sidebar-foot > span:not(.admin-avatar):not(.beta-dot) { display: none; }
  html.sidebar-collapsed .user-menu { right: auto; left: 0; width: 150px; }
}
@media (max-width: 760px) { .sidebar-toggle { display: none; } }

/* Product status: first-level column groups shown in the wide tables. */
.product-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 18px 0; }
.product-groups:empty { display: none; }
.product-groups-label { margin-right: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.product-group-chip { padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.product-group-chip:hover { border-color: var(--brand-200); }
.product-group-chip.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.upload-progress:not(:empty) { width: min(520px, 90%); margin-top: 14px; }
.build-progress { display: grid; gap: 10px; width: 100%; }
.build-progress .progress { margin: 0; width: 100%; max-width: 640px; }
/* Header sort / filter (ui.headerFilters, as Excel's AutoFilter): a click on a column header opens its menu. */
thead th[data-tf] { cursor: pointer; }
thead th[data-tf]:hover { background-image: linear-gradient(rgba(37, 99, 235, .06), rgba(37, 99, 235, .06)); }
.tf-mark { display: inline; color: var(--brand-700); font-weight: 700; vertical-align: 0; }
.tf-mark.tf-idle { color: var(--faint); font-weight: 400; font-size: 10px; }
th[data-tf]:hover .tf-mark.tf-idle { color: var(--brand-700); }
.tf-mark.tf-on::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 2px; vertical-align: -1px;
  background: currentColor; clip-path: polygon(0 0, 100% 0, 62% 45%, 62% 100%, 38% 85%, 38% 45%); }
th[data-tf]:has(.tf-on), th[data-tf]:has(.tf-sorted) { color: var(--brand-700); }
.tf-status { margin-left: 10px; color: var(--brand-700); font-size: 12.5px; }
.tf-status .link-button { padding: 0; font-size: 12.5px; }
.tf-menu { position: fixed; z-index: 46; width: 280px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-pop); text-align: left; white-space: normal; font-size: 13px; font-weight: 400; color: var(--ink); }
.tf-menu h2 { margin: 0 0 6px; font-size: 13.5px; color: var(--brand-700); }
.tf-note { max-height: 120px; overflow: auto; overscroll-behavior: contain; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.tf-note p { margin: 0 0 4px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.tf-note p + p { color: var(--muted); font-size: 12px; }
.tf-sort { display: grid; gap: 2px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.tf-sort button { padding: 5px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font: inherit; cursor: pointer; }
.tf-sort button:hover { background: var(--soft); }
.tf-sort button.on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.tf-body input[type="search"] { width: 100%; height: 30px; margin-bottom: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.tf-list { max-height: 240px; overflow: auto; overscroll-behavior: contain; padding: 4px 6px; border: 1px solid var(--line-soft); border-radius: 6px; }
.tf-list label, .tf-op { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; overflow-wrap: anywhere; }
.tf-list .tf-all { border-bottom: 1px solid var(--line-soft); margin-bottom: 2px; padding-bottom: 4px; }
.tf-range { display: flex; align-items: center; gap: 6px; margin: 4px 0 0 22px; }
.tf-range input { width: 90px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.tf-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tf-actions .button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.tf-tip { position: fixed; z-index: 44; display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 8px 10px 8px 12px;
  background: var(--brand-700); color: #fff; border-radius: 8px; box-shadow: var(--shadow-pop); font-size: 12.5px; }
.tf-tip::before { content: ""; position: absolute; top: -5px; left: 16px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); }
.tf-tip p { margin: 0; line-height: 1.45; }
.tf-tip .button { height: 26px; padding: 0 10px; background: #fff; color: var(--brand-700); font-size: 12px; white-space: nowrap; }
