:root {
  --bg: #f2f3f7;
  --bg-elevated: #ffffff;
  --ink: #1d1d1f;
  --muted: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: #f0f0f2;
  --accent: #007aff;
  --accent-hover: #0069d9;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --warn: #ff3b30;
  --warn-soft: #ffeaea;
  --ok: #34c759;
  --ok-soft: #e9f9ee;
  --caution: #ff9500;
  --caution-soft: #fff4e0;
  --side: rgba(255, 255, 255, 0.55);
  --side-2: rgba(255, 255, 255, 0.75);
  --side-text: #1d1d1f;
  --side-muted: #86868b;
  --radius: 12px;
  --font: "Inter", "SF Pro Text", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Inter", "SF Pro Display", "Noto Sans SC", sans-serif;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    linear-gradient(135deg, #d9e6f8 0%, #f2f3f7 42%, #ece5f4 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

/* —— Sidebar（macOS 毛玻璃） —— */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--side-text);
  background: var(--side);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-dots {
  display: flex;
  gap: 6px;
  padding: 0 8px 12px;
}

.brand-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.brand-dots i:nth-child(1) { background: #ff5f57; }
.brand-dots i:nth-child(2) { background: #febc2e; }
.brand-dots i:nth-child(3) { background: #28c840; }

.brand-kicker {
  display: block;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--side-muted);
  margin-bottom: 8px;
}

.brand-name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--side-muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--side-muted);
  padding: 0 10px 4px;
}

.nav-group.hidden {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.nav-idx {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  color: var(--side-muted);
  min-width: 1.5em;
}

.nav-item:hover:not(.disabled) {
  background: rgba(0, 0, 0, 0.045);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active .nav-idx { color: var(--accent); }

.nav-item.disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--side-muted);
  padding: 0 4px;
}

.sidebar-user {
  margin-top: auto;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sidebar-user-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
  color: var(--side-muted);
}

.side-link {
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.side-link:hover { text-decoration: underline; }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
}

.todo-template-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.todo-template-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.monthly-panel {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.monthly-panel > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}

.monthly-panel > summary::-webkit-details-marker { display: none; }

.monthly-panel > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.monthly-panel[open] > summary::before {
  transform: rotate(90deg);
}

.monthly-hint {
  margin: 10px 0 12px;
  font-size: 13px;
}

.monthly-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.monthly-create-form input {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.monthly-create-form .cselect-compact {
  width: auto;
  min-width: 88px;
  flex: 0 0 auto;
}

.monthly-create-form input[name="title"] { min-width: 180px; flex: 1; }
.monthly-create-form input[name="note"] { min-width: 140px; flex: 1; }
.monthly-create-form input[name="day_of_month"] { width: 56px; }

.monthly-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.monthly-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monthly-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--line-soft);
  font-size: 13px;
}

.monthly-row.is-off {
  opacity: 0.55;
}

.monthly-row-title {
  font-weight: 600;
  color: var(--ink);
}

.monthly-row-meta {
  color: var(--muted);
  flex: 1;
}

.monthly-row-actions {
  display: flex;
  gap: 10px;
}


/* —— Users admin —— */
.users-head {
  margin-bottom: 4px;
}

.users-panel {
  margin-top: 16px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 35, 47, 0.04);
}

.users-list-panel {
  margin-top: 14px;
  padding-bottom: 8px;
}

.users-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.users-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #163445;
  letter-spacing: -0.01em;
}

.users-panel-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.user-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 14px 12px;
  align-items: end;
}

.user-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.user-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.user-create-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-create-form input:hover {
  border-color: #b7c6ce;
}

.user-create-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.14);
}

.user-cselect {
  width: 100%;
}

.user-create-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0;
}

.user-create-actions .btn {
  height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.users-table-wrap {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.users-table {
  margin: 0;
}

.users-table th {
  padding: 12px 14px;
  background: #f4f8f9;
}

.users-table td {
  padding: 14px;
  vertical-align: middle;
}

.users-table tbody tr:hover {
  background: rgba(13, 115, 119, 0.03);
}

.users-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

.users-table .row-actions .linkish {
  padding: 2px 0;
}

.user-role-badge,
.user-status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.user-role-badge {
  background: #eef5f6;
  color: #0d7377;
}

.user-role-badge.role-admin {
  background: #eef2ff;
  color: #4338ca;
}

.user-role-badge.role-finance {
  background: #fff7ed;
  color: #c2410c;
}

.user-role-badge.role-office {
  background: #f1f5f9;
  color: #475569;
}

.user-role-badge.role-hr {
  background: #ecfdf5;
  color: #047857;
}

.user-role-badge.role-warehouse {
  background: #fef3c7;
  color: #b45309;
}

.user-status-badge.is-on {
  background: var(--ok-soft);
  color: var(--ok);
}

.user-status-badge.is-off {
  background: #f1f5f9;
  color: #64748b;
}

.user-edit-dialog .user-edit-fields {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.user-edit-dialog .user-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.user-edit-dialog .user-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.user-edit-dialog .user-field input:disabled {
  background: #f4f7f9;
  color: #64748b;
  cursor: not-allowed;
}

.user-edit-dialog .user-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.14);
}

.user-cselect .cselect-trigger.is-disabled,
.user-cselect .cselect-trigger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f4f7f9;
}

.users-empty {
  padding: 28px 16px;
}

.users-uname {
  font-weight: 650;
  color: #163445;
}

.users-dname {
  color: #475569;
}

@media (max-width: 1100px) {
  .user-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-create-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .user-create-form {
    grid-template-columns: 1fr;
  }
  .users-panel {
    padding: 14px 14px 16px;
  }
}

.row-actions {
  white-space: nowrap;
}

/* —— Work board (replaces old dashboard overview) —— */
#view-dashboard .dash-head {
  margin-bottom: 8px;
}

.board-account-switch {
  margin: 0 0 20px;
}
.board-account-switch.hidden { display: none; }
.board-view-seg {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.board-view-seg-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
  text-transform: none;
}
.board-view-seg-track {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
  max-width: 100%;
}
.board-view-seg-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: #4b5563;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.board-view-seg-btn:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.55);
}
.board-view-seg-btn.is-active {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
  font-weight: 600;
}
.board-view-seg-name {
  font-variant-numeric: tabular-nums;
}
.board-view-seg-meta {
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
}
.board-view-seg-btn.is-active .board-view-seg-meta {
  color: #6b7280;
}
.board-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: transparent;
  padding: 10px 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.board-account-row:last-child { border-bottom: 0; }
.board-account-row:hover { color: var(--accent, #2563eb); }
.board-account-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-readonly-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  font-weight: 400;
}

.board-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.board-kpi.is-static {
  cursor: default;
}
.board-mini-row.is-static {
  cursor: default;
}
.board-mini-row.is-static:hover { color: inherit; }

.board-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(0, 122, 255, 0.07), transparent 42%),
    #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.board-kpi:hover {
  border-color: rgba(0, 122, 255, 0.28);
  box-shadow: 0 4px 14px rgba(16, 35, 47, 0.06);
}

.board-kpi.is-warn {
  background:
    linear-gradient(165deg, rgba(255, 149, 0, 0.12), transparent 45%),
    #fff;
}

.board-kpi-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.board-kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.board-kpi-sub {
  font-size: 12px;
  color: var(--muted);
}

.board-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.board-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.board-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.board-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.board-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.board-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 8px 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.board-mini-row:last-child { border-bottom: 0; }
.board-mini-row:hover { color: var(--accent); }
.board-mini-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.board-stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.board-stat-line strong {
  color: var(--ink);
  font-weight: 650;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f5;
  overflow: hidden;
}

.board-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.board-progress-label {
  font-size: 12px;
  color: var(--muted);
}

.board-alerts-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 8px;
}

.board-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.board-section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.board-alerts {
  display: flex;
  flex-direction: column;
}

.board-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  padding: 12px 2px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.board-alert:first-child { border-top: 0; }
.board-alert.is-warn { color: #b45309; }
.board-alert-go {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
}

.board-empty {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .board-kpis { grid-template-columns: 1fr; }
  .board-modules { grid-template-columns: 1fr; }
}

/* legacy dash bits (todos page / other leftovers) */
#view-dashboard .dash-metrics {
  display: none;
}
.stats-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.stats-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.stats-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: end;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfb 100%);
  box-shadow: 0 1px 0 rgba(16, 35, 47, 0.03);
}

.stats-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: #6a7c86;
}

.stats-filter-field > span {
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1;
  min-height: 12px;
}

.stats-filter-period {
  flex: 0 1 auto;
}

.stats-filter-dates {
  flex: 1 1 280px;
  min-width: 260px;
  max-width: 420px;
}

.stats-filter-user {
  min-width: 160px;
  flex: 0 1 180px;
}

.stats-filter-field .cselect,
.stats-filter-field .cdate,
.stats-filter-field select {
  min-width: 132px;
}

.stats-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.stats-date-sep {
  color: #8a9aa6;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.stats-date-range .cdate {
  min-width: 0;
  width: 100%;
}

.stats-filter-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: auto;
}

.stats-filter-actions-spacer {
  display: block;
  min-height: 12px;
  line-height: 1;
  visibility: hidden;
}

.stats-filter-actions .btn {
  min-height: 38px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.stats-filters .cselect-compact .cselect-trigger,
.stats-filters .cdate-compact .cdate-trigger {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
}

#stats-error {
  margin-bottom: 12px;
}

.stats-cats {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef5f6;
}

.stats-cat-btn {
  border: 0;
  background: transparent;
  color: #5f7278;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
}

.stats-cat-btn.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(16, 42, 54, 0.08);
}

.stats-range {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.stats-range-btn {
  border: 0;
  background: transparent;
  color: #5f7278;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 0 12px;
  min-height: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.stats-range-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.stats-range-btn.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.stats-panel {
  margin-top: 4px;
}

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.stats-kpi {
  position: relative;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(0, 122, 255, 0.08), transparent 42%),
    linear-gradient(180deg, #fbfefe 0%, #fff 100%);
  overflow: hidden;
}

.stats-kpi-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stats-kpi-value {
  display: block;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stats-kpi-value.money {
  font-size: 24px;
}

.stats-kpi-sub {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.stats-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px 18px 12px;
  min-height: 280px;
}

.stats-card-wide {
  grid-column: 1 / -1;
  min-height: 300px;
}

.stats-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.stats-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #1d1d1f;
}

.stats-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.stats-chart-wrap {
  width: 100%;
  min-height: 220px;
}

.stats-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 4px;
  min-height: 220px;
}

.stats-chart-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 48px 0;
  text-align: center;
}

.stats-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.stats-bar-label {
  font-size: 12px;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e8f1f2;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0A84FF, #64d2ff);
}

.stats-bar-value {
  font-size: 12px;
  font-weight: 650;
  text-align: right;
  color: #1d1d1f;
}

.stats-chart-wrap .chart-grid {
  stroke: #e6eef0;
  stroke-width: 1;
}

.stats-chart-wrap .chart-axis {
  fill: #7a8f96;
  font-size: 10px;
}

.stats-chart-wrap .chart-legend {
  font-size: 11px;
  font-weight: 600;
}

.stats-chart-wrap .chart-legend-count { fill: #0A84FF; }
.stats-chart-wrap .chart-legend-amount { fill: #FF9500; }

.stats-table-block .muted {
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

@media (max-width: 980px) {
  .stats-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stats-filter-actions {
    margin-left: 0;
    width: 100%;
  }
  .stats-filter-actions .btn {
    width: 100%;
  }
  .stats-filter-dates {
    max-width: none;
    flex: 1 1 100%;
  }
}


/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 122, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 55% at 85% 90%, rgba(191, 90, 242, 0.12), transparent 55%),
    linear-gradient(160deg, #e8eef8 0%, #f2f3f7 48%, #ece5f4 100%);
}

.login-shell {
  width: min(420px, calc(100% - 32px));
}

.login-panel {
  padding: 36px 32px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}

.login-kicker {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.login-brand {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.login-lede {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login-cert-tip {
  margin: -12px 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 149, 0, 0.12);
  border: 1px solid rgba(198, 106, 0, 0.22);
  font-size: 12.5px;
  line-height: 1.5;
  color: #8a5a00;
}
.login-cert-tip p { margin: 0; }
.login-cert-tip a {
  color: #007aff;
  font-weight: 600;
  text-decoration: underline;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.login-form input {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.login-form input:focus {
  outline: 2px solid rgba(0, 122, 255, 0.25);
  border-color: var(--accent);
}

.login-user-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.login-user-wrap input {
  width: 100%;
  padding-right: 40px;
}

.login-user-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  border-radius: 6px;
}

.login-user-toggle:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.login-user-wrap.is-open .login-user-toggle {
  color: var(--accent);
}

.login-user-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 35, 47, 0.12);
}

.login-user-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 12px;
  min-height: 40px;
  cursor: pointer;
}

.login-user-option:hover {
  background: var(--accent-soft);
}

.login-user-option-name {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}

.login-user-forget {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.login-user-forget:hover {
  background: var(--warn-soft);
  color: var(--warn);
}

.login-user-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.login-submit {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.login-tip {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--caution);
  background: var(--caution-soft);
  border-radius: 8px;
}

.login-error {
  margin: 0;
  font-size: 13px;
  color: var(--warn);
}

/* —— Main —— */
.main {
  padding: 32px 36px 48px;
  width: 100%;
  min-width: 0;
}

.remind-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ead9a0;
  background: #fffbeb;
  color: #6b4e00;
}

.remind-banner.level-urgent {
  border-color: #e8b4ab;
  background: #fdf2f0;
  color: #7a2418;
}

.remind-banner-body {
  min-width: 0;
  flex: 1;
}

.remind-banner-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}

.remind-banner-list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 13px;
  line-height: 1.5;
}

.remind-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.view {
  animation: rise 0.25s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#view-dashboard {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
}

#view-dashboard .dash-head {
  flex-shrink: 0;
}

#view-dashboard .dash-metrics {
  flex-shrink: 0;
}

#view-dashboard .dash-panels {
  flex: 1;
  min-height: 320px;
}

#view-dashboard .dash-panel {
  min-height: 100%;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-head h1,
.dialog-head h2,
.block-head h2,
.dash-panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-head h1 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
}

.lede {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  border-color: #c5d0d8;
  background: #fff;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.text-link:hover { text-decoration: underline; }

/* —— Dashboard —— */
.dash-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.dash-metrics .metric {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  min-width: 0;
  margin: 0;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.dash-metrics .metric:hover {
  border-color: #b9c9d0;
}

.dash-metrics .metric.is-alert {
  border-color: #e8b4ab;
  background: #fff8f7;
}

.dash-metrics .metric.is-warn {
  border-color: #e0d0a0;
  background: #fffdf5;
}

.dash-metrics .metric-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.dash-metrics .metric-value {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
}

.dash-metrics .metric-value.money {
  font-size: 22px;
}

.dash-metrics .metric-value.money::before {
  content: "¥";
  font-size: 13px;
  margin-right: 2px;
  opacity: 0.45;
  font-weight: 600;
}

.dash-metrics .metric-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.dash-panels {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
}

.dash-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 280px;
  min-width: 0;
  overflow: hidden;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dash-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.dash-list {
  flex: 1;
  background: transparent;
  border: 0;
}

.dash-list .todo-item {
  grid-template-columns: auto 1fr;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dash-list .todo-item:last-child {
  border-bottom: 0;
}

.dash-list .empty {
  padding: 36px 16px;
  border: 0;
  background: transparent;
}

.dash-list .recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dash-list .recent-row:last-child { border-bottom: 0; }
.dash-list .recent-row:hover { background: rgba(0, 122, 255, 0.04); }

.dash-list .recent-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-list .recent-seller {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-list .recent-meta {
  font-size: 12px;
  color: var(--muted);
}

.dash-list .recent-amt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .dash-metrics { grid-template-columns: 1fr 1fr !important; }
  .dash-panels { grid-template-columns: 1fr !important; }
}


/* —— Todos —— */
.todo-composer {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 10px;
}

.todo-composer input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.todo-composer .cselect-compact {
  width: auto;
  min-width: 88px;
  flex: 0 0 auto;
}

.todo-title-input { min-width: 0; }

.todo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.chip:hover { border-color: #9aadb8; color: var(--ink); }

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.todo-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.12s ease;
}

.todo-item:hover { background: rgba(0, 122, 255, 0.05); }

.todo-item.is-done .todo-text {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-item.is-overdue .todo-meta { color: var(--warn); }

.todo-check {
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
}

.todo-check input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.todo-check .box {
  display: block;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.todo-check input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M3 8l3.5 3.5L13 4'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

.todo-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.todo-text {
  font-size: 15px;
  font-weight: 500;
}

.todo-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.todo-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  padding-top: 2px;
}

.prio {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.prio-high { background: #fde8e6; color: #b42318; }
.prio-medium { background: #fff4ce; color: #9a6700; }
.prio-low { background: #e8eef2; color: #5a6b78; }

.todo-list.compact .todo-item {
  grid-template-columns: auto 1fr;
}

/* —— Warehouse docs —— */
.wh-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.wh-tpl-list {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 8px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.wh-tpl-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.wh-tpl-btn:hover { background: var(--bg-hover, rgba(0,0,0,.04)); }
.wh-tpl-btn.active { background: var(--accent-soft, #e8f0fe); color: var(--accent, #1a5fb4); }

.wh-tpl-btn .wh-tpl-code {
  display: block;
  font-size: 12px;
  opacity: 0.65;
  margin-top: 2px;
}

.wh-form-panel {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 16px 18px 20px;
  min-height: 280px;
}

.wh-seal-preview-wrap {
  margin-top: 4px;
}

.wh-seal-preview {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

.btn.ghost.small {
  padding: 4px 10px;
  font-size: 12px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.wh-seal-combo {
  position: relative;
}

.wh-seal-input {
  width: 100%;
  box-sizing: border-box;
}

.wh-seal-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated, #fff);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  padding: 4px;
}

.wh-seal-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.wh-seal-option:hover,
.wh-seal-option.is-active {
  background: var(--accent-soft, #e8f0fe);
}

.wh-seal-option.is-selected {
  color: var(--accent, #1a5fb4);
  font-weight: 600;
}

.wh-seal-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.65;
  font-weight: 400;
}

.req { color: #c64600; font-style: normal; }

/* —— HR docs —— */
.hr-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.hr-tpl-list {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 8px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  box-shadow: var(--shadow);
}

.hr-tpl-group + .hr-tpl-group {
  margin-top: 6px;
}

.hr-tpl-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.hr-tpl-group-toggle:hover {
  background: rgba(0, 122, 255, 0.06);
}

.hr-chevron {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.hr-tpl-group:not(.collapsed) > .hr-tpl-group-toggle .hr-chevron {
  transform: rotate(45deg);
}

.hr-tpl-group.collapsed > .hr-tpl-group-body {
  display: none;
}

.hr-tpl-group-body {
  padding: 0 0 4px 6px;
}

.hr-tpl-group.hr-tpl-subgroup > .hr-tpl-group-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #0A84FF);
  padding: 8px 10px;
}

.hr-tpl-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7280);
  padding: 6px 12px 8px;
}

.hr-tpl-subgroup {
  margin: 4px 0 6px;
}

.hr-tpl-section {
  margin: 8px 0 6px;
  padding-top: 4px;
}

.hr-tpl-section-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent, #0A84FF);
  padding: 6px 12px 4px;
  letter-spacing: 0.02em;
}

.hr-tpl-section-body {
  padding-left: 4px;
}

.hr-tpl-sub-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #0A84FF);
  padding: 8px 12px 4px;
}

.hr-tpl-pack {
  border: 1px dashed rgba(0, 122, 255, 0.35);
  margin-bottom: 4px;
}

.hr-tpl-pack small {
  display: block;
  font-weight: 400;
  margin-top: 2px;
}

.hr-pack-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(0, 122, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.hr-tpl-name {
  display: inline;
}

.hr-tpl-badge {
  font-size: 12px;
  font-weight: 650;
  margin-left: 2px;
}

.hr-tpl-item.tone-sales .hr-tpl-badge.is-sales,
.hr-tpl-badge.is-sales,
.hr-tpl-badge.is-danger {
  color: #c62828;
}

.hr-tpl-item.has-danger-badge {
  color: #c62828;
}

.hr-tpl-item.has-danger-badge.active {
  color: #b71c1c;
  background: rgba(198, 40, 40, 0.08);
}

.field-hint {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted, #6b7280);
  margin: 2px 0 4px;
}

.hr-tpl-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.hr-tpl-item:hover { background: rgba(0, 122, 255, 0.06); }
.hr-tpl-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.hr-file-bar {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e4eef0;
  border-radius: 12px;
  background: #f7fbfb;
}

.hr-file-bar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hr-file-bar-label {
  font-size: 12px;
  font-weight: 650;
  color: #5f7278;
  margin-right: 4px;
}

.hr-file-bar-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hr-exclusive-bar {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e4eef0;
  border-radius: 12px;
  background: #fff;
}

.hr-exclusive-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.hr-exclusive-label {
  font-size: 13px;
  font-weight: 650;
  color: #1d1d1f;
}

.hr-exclusive-options {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hr-exclusive-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d7e4e6;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: #5f7278;
  background: #f7fbfb;
}

.hr-exclusive-option.is-active {
  border-color: #0A84FF;
  color: #0A84FF;
  background: rgba(0, 122, 255, 0.08);
  font-weight: 650;
}

.hr-exclusive-option input {
  margin: 0;
}

.hr-exclusive-hint {
  font-size: 12px;
  color: var(--muted);
}

.hr-month-targets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.hr-month-target-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.hr-date-slash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.hr-date-slash-main {
  position: relative;
  min-width: 0;
  min-height: 42px;
}

.hr-date-slash [data-date-slash-text] {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 36px 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
}

.hr-date-slash-btn {
  min-width: 44px;
  min-height: 42px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .hr-date-slash {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
  }
}

.hr-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}

.hr-pack-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.hr-pack-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8f0f1;
}

.hr-pack-file-name {
  flex: 1 1 140px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}

.hr-form-panel {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 16px 18px 12px;
  box-shadow: var(--shadow);
}

.hr-form .dialog-actions {
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
  padding-top: 14px;
}

.hr-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.hr-memory-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: 4px;
}

#hr-memory-hint {
  margin-left: auto;
  font-size: 12px;
}

.hr-batch-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.hr-batch-paste {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 8px;
  resize: vertical;
  background: #fff;
}

.hr-batch-table-wrap {
  margin: 12px 0 8px;
  max-height: 360px;
}

.hr-batch-table-wrap input,
.hr-batch-table-wrap select {
  width: 100%;
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}

.hr-preview-dialog {
  width: min(980px, 98vw);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}

.hr-preview-body {
  display: flex;
  flex-direction: column;
  max-height: 94vh;
  padding: 18px 18px 14px;
}

.hr-preview-mount {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  background: #cfd8dc;
  padding: 16px 12px;
  min-height: 360px;
  max-height: calc(94vh - 160px);
}

.hr-preview-mount .docx-wrapper {
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hr-preview-mount .docx-wrapper > section.docx {
  margin: 0 auto 0;
  background: #fff;
  box-shadow: 0 1px 6px rgba(18, 32, 43, 0.12);
}

/* 预览里制表位/浮动图更接近 Word */
.hr-preview-mount .docx {
  box-sizing: border-box;
}

/* —— Content blocks —— */
.block {
  margin-bottom: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 16px 12px;
  box-shadow: var(--shadow);
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.block-head.tight { margin: 8px 0 10px; }

.block-head h2 { font-size: 15px; font-weight: 600; }

.block-hint {
  font-size: 12px;
  color: var(--muted);
}

/* —— Dropzone —— */
.dropzone {
  display: block;
  margin-bottom: 16px;
  padding: 24px 20px;
  text-align: center;
  border: 1.5px dashed #b7c6ce;
  border-radius: 10px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

.dropzone-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  font-size: 13px;
  color: var(--accent);
  min-height: 1.2em;
}

.toast.error { color: var(--warn); }

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  margin: 0;
  padding: 0;
  min-height: 0;
  max-width: min(520px, calc(100vw - 32px));
  box-shadow: 0 8px 28px rgba(18, 32, 43, 0.16);
}
.app-toast:empty { display: none; }
.app-toast:not(:empty) {
  padding: 12px 18px;
  background: #123;
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
.app-toast.error:not(:empty) {
  background: var(--warn);
  color: #fff;
}
.app-toast.is-loading:not(:empty) {
  background: var(--accent);
}
.app-toast.is-loading:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: toast-spin 0.7s linear infinite;
}
@keyframes toast-spin {
  to { transform: rotate(360deg); }
}

.dropzone.is-busy {
  pointer-events: none;
  opacity: 0.85;
  border-style: solid;
  background: rgba(0, 122, 255, 0.08);
}
.dropzone.is-busy .dropzone-title {
  color: var(--accent);
}

.inv-sort-dropzone {
  margin-top: 4px;
  border-style: dashed;
  background: rgba(0, 122, 255, 0.03);
}
.inv-sort-path-block {
  margin-bottom: 12px;
}
.inv-sort-path-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}
.inv-sort-path-row .btn {
  flex-shrink: 0;
}
.inv-sort-target {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(16, 35, 47, 0.14);
  border-radius: 10px;
  font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
}
.inv-sort-target:focus {
  outline: none;
  border-color: var(--accent, #007aff);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.inv-sort-folder-path {
  flex-basis: 100%;
  font-size: 11.5px !important;
  word-break: break-all;
}
#view-invoice-sort .inv-sort-result {
  margin-top: 16px;
}
.inv-sort-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16, 35, 47, 0.1);
  background: #fff;
}
.inv-sort-result h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.inv-sort-result .inv-sort-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.inv-sort-folders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.inv-sort-folders li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.025);
  font-size: 13px;
}
.inv-sort-folders b {
  color: var(--ink);
}
.inv-sort-folders span {
  color: var(--muted);
  font-size: 12px;
}
.inv-sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* —— Tables —— */
.table-wrap {
  overflow-x: auto;
  border: 0;
  background: transparent;
  margin: 0 -4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: rgba(244, 247, 249, 0.9);
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

th.col-check, td.col-check {
  width: 36px;
  text-align: center;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 4px;
}

.invoice-batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn.ghost.danger {
  color: var(--warn);
  border-color: rgba(192, 57, 43, 0.35);
}

.btn.ghost.danger:hover:not(:disabled) {
  background: var(--warn-soft);
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: rgba(0, 122, 255, 0.05);
}

tbody tr.is-dup-number {
  background: var(--warn-soft);
}

tbody tr.is-dup-number:hover {
  background: #f8e4e0;
}

.dup-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--warn);
  font-weight: 600;
}

.dup-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--warn);
  color: #fff;
  line-height: 1.4;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.warn { background: var(--caution-soft); color: var(--caution); }

.parse-warn {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--caution-soft);
  color: var(--caution);
  font-size: 12px;
  line-height: 1.45;
}

.linkish {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0 6px 0 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.linkish:hover { text-decoration: underline; }
.linkish.danger { color: var(--warn); }

.recent-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.recent-head,
.recent-item {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) minmax(140px, 1.4fr) minmax(110px, 1fr) minmax(130px, 1.1fr) 110px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.recent-head {
  background: rgba(244, 247, 249, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.recent-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
  animation: rise 0.35s ease both;
}

.recent-item:hover {
  background: rgba(0, 122, 255, 0.06);
}

.recent-item:nth-child(3) { animation-delay: 0.04s; }
.recent-item:nth-child(4) { animation-delay: 0.08s; }
.recent-item:nth-child(5) { animation-delay: 0.12s; }
.recent-item:nth-child(6) { animation-delay: 0.16s; }

.recent-item .cell-seller {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item .cell-mono {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.recent-item .amt {
  font-family: var(--display);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.recent-head .num,
.recent-item .num { text-align: right; }

.muted { color: var(--muted); }
.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.hidden { display: none !important; }

/* —— Dialog —— */
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(860px, 94vw);
  background: #f7fafc;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(11, 28, 40, 0.48);
  backdrop-filter: blur(2px);
}

.dialog-body { padding: 22px 22px 18px; }

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.dialog-head h2 { font-size: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 14px;
}

.form-grid label,
.form-grid .field-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.form-grid label.full,
.form-grid .field-control.full { grid-column: 1 / -1; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* Custom select — unified across the app */
.cselect {
  position: relative;
  width: 100%;
  min-width: 0;
}

select.cselect-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cselect-trigger:hover {
  border-color: #b7c6ce;
  background: #fff;
}

.cselect.is-open .cselect-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.14);
  background: #fff;
}

.cselect-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7a8b97;
  border-bottom: 2px solid #7a8b97;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.cselect.is-open .cselect-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
  border-color: var(--accent);
}

.cselect-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 35, 47, 0.12);
}

.cselect-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cselect-option + .cselect-option {
  margin-top: 2px;
}

.cselect-option:hover {
  background: rgba(13, 115, 119, 0.08);
  color: #0d7377;
}

.cselect-option.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.cselect-option.is-selected:hover {
  background: var(--accent-soft);
}

.cselect-trigger.is-disabled,
.cselect-trigger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f4f7f9;
}

/* Compact: filters / composers / batch tables */
.cselect-compact {
  min-width: 88px;
}

.cselect-compact .cselect-trigger {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

.cselect-compact .cselect-option {
  padding: 8px 10px;
  font-size: 13px;
}

.cselect-compact .cselect-menu {
  padding: 4px;
  border-radius: 10px;
}

/* HR form selects stay slightly taller */
.field-control .cselect:not(.cselect-compact) .cselect-trigger {
  min-height: 44px;
  height: 44px;
  font-size: 15px;
}

.field-control .cselect:not(.cselect-compact) .cselect-option {
  padding: 12px 14px;
  font-size: 15px;
}

/* Custom date picker — matches cselect */
.cdate {
  position: relative;
  width: 100%;
  min-width: 0;
}

input.cdate-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cdate-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cdate-trigger:hover {
  border-color: #b7c6ce;
}

.cdate.is-open .cdate-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.14);
}

.cdate-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.cdate-value.is-placeholder {
  color: #8a9aa6;
  letter-spacing: 0;
}

.cdate-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: #7a8b97;
}

.cdate.is-open .cdate-icon {
  color: var(--accent);
}

.cdate-trigger.is-disabled,
.cdate-trigger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f4f7f9;
}

.cdate-panel {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  width: min(292px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 35, 47, 0.14);
}

.cdate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cdate-caption {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.cdate-nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #5a6b76;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.cdate-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(13, 115, 119, 0.06);
}

.cdate-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.cdate-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8a9aa6;
  padding: 4px 0;
}

.cdate-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cdate-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.cdate-month {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cdate-month:hover:not(.is-selected) {
  background: rgba(13, 115, 119, 0.08);
  color: #0d7377;
}

.cdate-month.is-today:not(.is-selected) {
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px rgba(13, 115, 119, 0.35);
}

.cdate-month.is-selected {
  background: var(--accent);
  color: #fff;
}

.cdate-month.is-selected:hover {
  background: var(--accent);
  color: #fff;
}

.field-inline .cdate {
  min-width: 148px;
}

.field-inline .cdate-compact .cdate-trigger {
  min-height: 38px;
  height: 38px;
}

.cdate-day {
  aspect-ratio: 1;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cdate-day.is-empty {
  pointer-events: none;
  visibility: hidden;
}

.cdate-day:hover:not(.is-selected) {
  background: rgba(13, 115, 119, 0.08);
  color: #0d7377;
}

.cdate-day.is-today:not(.is-selected) {
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(13, 115, 119, 0.35);
}

.cdate-day.is-selected {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.cdate-day.is-selected:hover {
  background: var(--accent);
  color: #fff;
}

.cdate-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8eef2;
}

.cdate-foot-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5a6b76;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cdate-foot-btn:hover {
  background: rgba(13, 115, 119, 0.08);
  color: var(--accent);
}

.cdate-foot-btn.accent {
  color: var(--accent);
}

.cdate-compact {
  min-width: 132px;
}

.cdate-compact .cdate-trigger {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

.cdate-compact .cdate-panel {
  width: min(280px, calc(100vw - 24px));
  padding: 10px;
  border-radius: 12px;
}

.cdate-compact .cdate-day {
  min-height: 32px;
  font-size: 12px;
}

.field-control .cdate:not(.cdate-compact):not(.cdate-overlay) .cdate-trigger {
  min-height: 44px;
  height: 44px;
  font-size: 15px;
}

/* HR date-or-slash: calendar icon on the right of text field */
.hr-date-slash-main .cdate.cdate-overlay {
  position: absolute;
  inset: 0;
  width: auto;
  z-index: 2;
  pointer-events: none;
}

.hr-date-slash-main .cdate-overlay .cdate-trigger {
  pointer-events: auto;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  box-shadow: none;
  justify-content: center;
  padding: 0;
}

.hr-date-slash-main .cdate-overlay .cdate-trigger:hover,
.hr-date-slash-main .cdate-overlay.is-open .cdate-trigger {
  border: 0;
  box-shadow: none;
  background: rgba(13, 115, 119, 0.06);
}

.hr-date-slash-main .cdate-overlay .cdate-value {
  display: none;
}

.hr-date-slash-main .cdate-overlay .cdate-icon {
  color: #7a8b97;
}

.hr-date-slash-main .cdate-overlay.is-open .cdate-icon {
  color: var(--accent);
}

.hr-date-slash-main .cdate-overlay .cdate-panel {
  pointer-events: auto;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
}

.select-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}

.form-grid input,
.form-grid textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-grid input:hover,
.form-grid textarea:hover {
  border-color: #c5d0d8;
}

.form-grid input:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.item-row {
  display: grid;
  grid-template-columns: 2fr 0.7fr 0.9fr 0.7fr 0.9fr auto;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}

.item-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.app-modal-dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 48px rgba(16, 35, 47, 0.18);
  background: #fff;
}

.app-modal-dialog::backdrop {
  background: rgba(16, 35, 47, 0.42);
  backdrop-filter: blur(2px);
}

.app-modal-message {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-wrap;
}

.app-modal-message.hidden {
  display: none;
}

.app-prompt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.app-prompt-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.app-prompt-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.14);
}

.btn.danger {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

.btn.danger:hover {
  background: #a93226;
  border-color: #a93226;
}

/* —— Todo calendar —— */
.todo-view-toggle {
  display: inline-flex;
  gap: 4px;
  margin-right: 4px;
}

.todo-calendar-wrap {
  margin-top: 4px;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.cal-title {
  margin: 0;
  min-width: 7em;
  text-align: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

.cal-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.cal-dow {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0 8px;
}

.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: 92px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafcfd;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.cal-cell.is-out {
  background: transparent;
  border-color: transparent;
  min-height: 40px;
  cursor: default;
}

.cal-cell:not(.is-out):hover {
  border-color: #c5d4da;
  background: #fff;
}

.cal-cell.is-today {
  border-color: rgba(0, 122, 255, 0.45);
  background: #f3fbfb;
}

.cal-cell.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
  background: #fff;
}

.cal-cell.has-overdue .cal-daynum {
  color: var(--warn);
}

.cal-daynum {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.cal-count {
  position: absolute;
}

.cal-cell {
  position: relative;
}

.cal-cell .cal-count {
  top: 8px;
  right: 8px;
  font-size: 11px;
  color: var(--muted);
}

.cal-pills {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
  min-height: 0;
}

.cal-pill {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--accent-soft);
  color: var(--accent);
}

.cal-pill.high {
  background: var(--warn-soft);
  color: var(--warn);
}

.cal-pill.overdue {
  background: #fde8e6;
  color: #b42318;
}

.cal-pill.done {
  background: #eef2f5;
  color: var(--muted);
  text-decoration: line-through;
}

.cal-more {
  font-size: 11px;
  color: var(--muted);
  padding-left: 2px;
}

.cal-day-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-height: 320px;
  overflow: hidden;
}

.cal-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.cal-day-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.cal-day-list {
  border: 0;
  border-radius: 0;
  max-height: 520px;
  overflow: auto;
}

.cal-day-list .todo-item {
  grid-template-columns: auto 1fr;
}

.cal-day-list .todo-actions {
  grid-column: 2;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    gap: 18px;
    padding: 18px 16px;
  }
  .brand-name { font-size: 18px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { width: auto; }
  .main { padding: 20px 16px 36px; }
  .form-grid { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .todo-composer { grid-template-columns: 1fr; }
  .todo-item { grid-template-columns: auto 1fr; }
  .todo-actions { grid-column: 2; }
  .hr-layout { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  .cal-cell { min-height: 72px; }
}

/* ===== Resume (筛选简历) ===== */
.resume-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resume-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(0, 122, 255, 0.12);
  background:
    radial-gradient(1200px 280px at 8% -20%, rgba(100, 210, 255, 0.18), transparent 55%),
    radial-gradient(800px 220px at 92% 0%, rgba(0, 122, 255, 0.1), transparent 50%),
    linear-gradient(135deg, #f7fcfc 0%, #ffffff 48%, #f4f8f9 100%);
  box-shadow: 0 10px 30px rgba(16, 35, 47, 0.05);
}

.resume-hero-kicker {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64d2ff;
}

.resume-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #122833;
}

.resume-hero .lede {
  margin: 8px 0 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.resume-head-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.resume-eval-progress {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  background:
    linear-gradient(165deg, rgba(0, 122, 255, 0.08), transparent 55%),
    #fff;
  box-shadow: var(--shadow);
}

.resume-eval-progress-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin-bottom: 10px;
}

.resume-eval-progress-main strong {
  font-size: 13px;
  color: #1d1d1f;
}

.resume-eval-progress-main span {
  font-size: 12px;
  color: var(--muted);
}

.resume-eval-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eef1;
  overflow: hidden;
}

.resume-eval-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0A84FF, #64d2ff);
  transition: width 0.35s ease;
}

.resume-dashboard {
  display: grid;
  gap: 14px;
}

.resume-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.resume-kpi {
  position: relative;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 35, 47, 0.04);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.resume-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 35, 47, 0.07);
}

.resume-kpi::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.06);
}

.resume-kpi-primary {
  border-color: rgba(0, 122, 255, 0.2);
  background: linear-gradient(160deg, #effbfb 0%, #fff 62%);
}

.resume-kpi-accent {
  border-color: rgba(30, 122, 74, 0.22);
  background: linear-gradient(160deg, #f1faf5 0%, #fff 62%);
}

.resume-kpi-accent .resume-kpi-value {
  color: var(--ok);
}

.resume-kpi-date {
  border-color: rgba(31, 111, 139, 0.2);
  background: linear-gradient(160deg, #eef7fb 0%, #fff 62%);
}

.resume-kpi-date .resume-kpi-hint {
  color: #4f7f96;
}

.resume-kpi-label {
  display: block;
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.resume-kpi-value {
  display: block;
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.resume-kpi-hint {
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #5f9788;
  letter-spacing: 0.02em;
}

.resume-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resume-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 14px;
  min-height: 0;
  box-shadow: 0 8px 24px rgba(16, 35, 47, 0.04);
}

.resume-chart-wide {
  grid-column: span 2;
}

.resume-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.resume-chart-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #1d1d1f;
}

.resume-chart-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.resume-chart-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0;
  text-align: center;
}

.resume-chart-date {
  padding-bottom: 18px;
}

.resume-date-panel {
  display: grid;
  gap: 12px;
}

.resume-date-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-date-summary {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.resume-date-summary-item {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f8fa;
  border: 1px solid rgba(16, 35, 47, 0.06);
  display: grid;
  gap: 2px;
}

.resume-date-summary-item strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.1;
}

.resume-date-summary-item span {
  font-size: 11px;
  color: var(--muted);
}

.resume-date-summary-item.is-pass {
  background: #f1faf5;
  border-color: rgba(30, 122, 74, 0.12);
}

.resume-date-summary-item.is-pass strong {
  color: #1e7a4a;
}

.resume-date-range {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f4f8fa;
  border: 1px solid rgba(16, 35, 47, 0.06);
}

.resume-date-range-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.resume-date-range-btn:hover {
  color: #0A84FF;
}

.resume-date-range-btn.active {
  background: #fff;
  color: #0A84FF;
  box-shadow: 0 2px 8px rgba(16, 35, 47, 0.08);
}

.resume-date-chart-area {
  display: flex;
  justify-content: center;
  padding: 14px 16px 10px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(239, 251, 251, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(0, 122, 255, 0.1);
  overflow-x: auto;
}

.resume-date-columns {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 14px;
  min-width: min(100%, calc(var(--date-cols, 7) * 72px));
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 4px 0;
  min-height: 168px;
  background-image: linear-gradient(to top, rgba(16, 35, 47, 0.05) 1px, transparent 1px);
  background-size: 100% 28px;
}

.resume-date-group {
  width: 64px;
  flex: 0 0 64px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.resume-date-bars {
  width: 100%;
  height: 128px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.resume-date-bar {
  position: relative;
  width: 24px;
  border-radius: 8px 8px 4px 4px;
  min-height: 6px;
  transition: height 0.35s ease;
}

.resume-date-bar span {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.resume-date-bar.total {
  background: linear-gradient(180deg, #4aa8ff 0%, #0A84FF 100%);
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.18);
}

.resume-date-bar.total span {
  color: #0A84FF;
}

.resume-date-bar.pass {
  background: linear-gradient(180deg, #52c088 0%, #1e7a4a 100%);
  box-shadow: 0 8px 18px rgba(30, 122, 74, 0.16);
}

.resume-date-bar.pass span {
  color: #1e7a4a;
}

.resume-date-group-foot {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.resume-date-group-foot strong {
  font-size: 12px;
  color: #1d1d1f;
}

.resume-date-group-foot em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: #5f9788;
}

.resume-date-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
}

.resume-date-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.resume-date-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.resume-date-legend-dot.total {
  background: linear-gradient(180deg, #4aa8ff 0%, #0A84FF 100%);
}

.resume-date-legend-dot.pass {
  background: linear-gradient(180deg, #52c088 0%, #1e7a4a 100%);
}

.resume-pie {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.resume-pie-svg {
  display: block;
}

.resume-pie-center-val {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  fill: #1d1d1f;
}

.resume-pie-center-label {
  font-size: 9px;
  fill: var(--muted);
}

.resume-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.resume-pie-legend-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.resume-pie-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.resume-pie-name {
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-pie-num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}

.resume-workspace {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(16, 35, 47, 0.05);
  overflow: hidden;
}

.resume-toolbar {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
}

.resume-toolbar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.resume-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.resume-panel-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.resume-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.1fr) repeat(2, minmax(118px, 0.9fr)) minmax(180px, 1.4fr);
  gap: 10px;
  align-items: end;
}

.resume-filters select,
.resume-filters input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.84rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.resume-filters .cselect-compact .cselect-trigger {
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 0.84rem;
}

.resume-filters input:focus {
  outline: none;
  border-color: rgba(13, 115, 119, 0.45);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.12);
}

.resume-filter-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.resume-filter-date .cdate-compact .cdate-trigger {
  min-width: 0;
  font-family: var(--display);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #1d1d1f;
}

.resume-filter-search {
  position: relative;
  min-width: 0;
}

.resume-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.resume-filter-keyword {
  padding-left: 34px !important;
}

.resume-list-panel {
  background: #fff;
}

.resume-table-wrap {
  margin: 0;
  max-height: min(64vh, 760px);
  overflow: auto;
}

.resume-table-wrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.resume-table {
  font-size: 13px;
  border-collapse: separate;
  border-spacing: 0;
}

.resume-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(247, 250, 251, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 -1px 0 var(--line-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 12px 14px;
  text-transform: none;
}

.resume-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.resume-table tbody tr {
  transition: background 0.12s ease;
}

.resume-table tbody tr:hover {
  background: rgba(0, 122, 255, 0.035);
}

.resume-table tbody tr.is-evaluating {
  background: rgba(29, 78, 216, 0.04);
}

.resume-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.resume-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #0A84FF, #64d2ff);
  box-shadow: 0 6px 14px rgba(0, 122, 255, 0.22);
}

.resume-avatar.tone-1 { background: linear-gradient(145deg, #0A84FF, #64d2ff); box-shadow: 0 6px 14px rgba(0, 122, 255, 0.22); }
.resume-avatar.tone-2 { background: linear-gradient(145deg, #1f6f8b, #3d8b92); box-shadow: 0 6px 14px rgba(31, 111, 139, 0.22); }
.resume-avatar.tone-3 { background: linear-gradient(145deg, #b86b2e, #d4894a); box-shadow: 0 6px 14px rgba(184, 107, 46, 0.22); }
.resume-avatar.tone-4 { background: linear-gradient(145deg, #4a7c59, #5f9788); box-shadow: 0 6px 14px rgba(74, 124, 89, 0.22); }
.resume-avatar.tone-5 { background: linear-gradient(145deg, #1d1d1f, #48484a); box-shadow: 0 6px 14px rgba(22, 52, 69, 0.22); }

.resume-person-meta {
  min-width: 0;
}

.resume-name-cell strong {
  display: block;
  font-weight: 650;
  color: #1d1d1f;
  line-height: 1.25;
}

.resume-person-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.resume-position-cell {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
}

.resume-num-cell {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
  color: #334155;
}

.resume-date-cell,
.resume-date,
time.resume-date {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #64748b;
  white-space: nowrap;
}

.resume-date-cell time {
  font: inherit;
  color: inherit;
}

.resume-eval-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
}

.resume-eval-inline::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: resume-spin 0.7s linear infinite;
}

.resume-empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}

.resume-empty-illu {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(0, 122, 255, 0.12), rgba(100, 210, 255, 0.08)),
    #f4fafb;
  border: 1px solid rgba(0, 122, 255, 0.12);
  position: relative;
}

.resume-empty-illu::before {
  content: "";
  position: absolute;
  inset: 16px 14px 14px;
  border-radius: 6px;
  border: 1.5px solid rgba(0, 122, 255, 0.28);
  border-top-width: 6px;
}

.resume-empty p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: #1d1d1f;
}

.resume-empty span {
  font-size: 13px;
}

.resume-list-panel .resume-pagination {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.resume-sync-bar {
  background: #fff;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.06);
}

.resume-sync-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.resume-sync-head h3 {
  margin: 0;
  font-size: 15px;
  color: #1d1d1f;
}

.resume-sync-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.resume-sync-result {
  margin: 12px 0 0;
  font-size: 13px;
  color: #334155;
  min-height: 1.2em;
}

.btn.accent {
  background: linear-gradient(135deg, #0A84FF, #64d2ff);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.25);
}

.btn.accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 122, 255, 0.32);
}

.btn.accent:disabled {
  opacity: 0.65;
  transform: none;
}

.btn-resume-sync-main {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 20px;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.28);
}

.btn-resume-sync-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.34);
}

.eval-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.eval-badge.pass {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.eval-badge.fail {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.eval-badge.pending {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.eval-badge.evaluating {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.06);
}

.eval-spinner {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: resume-spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes resume-spin {
  to { transform: rotate(360deg); }
}

.eval-reason-cell {
  max-width: 240px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.row-actions .linkish {
  padding: 4px 0;
  font-weight: 600;
}

.rd-eval-box {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.rd-eval-box.pass { border-color: #a7f3d0; background: #ecfdf5; }
.rd-eval-box.fail { border-color: #fecaca; background: #fef2f2; }

.rd-eval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.rd-eval-reason {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #334155;
}

.feishu-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
  color: #64748b;
  box-shadow: var(--shadow);
}

.feishu-auth-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.feishu-auth-badge.ready {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.feishu-auth-badge.ready::before {
  background: #10b981;
}

.feishu-auth-badge.expired {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.feishu-auth-badge.expired::before {
  background: #f97316;
}

.feishu-auth-badge.checking::before {
  background: #94a3b8;
  animation: feishu-pulse 1.2s ease-in-out infinite;
}

@keyframes feishu-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.feishu-auth-dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: min(440px, 94vw);
  width: min(440px, 94vw);
}

.feishu-auth-qrcode-wrap {
  display: grid;
  place-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.feishu-auth-qrcode-wrap img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
}

.feishu-auth-link-row {
  font-size: 0.85rem;
}

.resume-sync-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.resume-sync-fields input {
  padding: 8px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  font-size: 0.85rem;
  min-width: 200px;
}

.resume-sync-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted, #6b7280);
}

.resume-sync-date input[type="date"] {
  min-width: 150px;
  font-family: var(--display);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: #1d1d1f;
  padding: 8px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
}

.resume-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-page-meta {
  font-size: 13px;
  color: var(--muted);
}

.resume-page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.resume-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1d1d1f;
}

.resume-page-jump input {
  width: 64px;
  padding: 4px 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  font: inherit;
  text-align: center;
}

.btn.sm {
  padding: 4px 14px;
  font-size: 0.82rem;
}

.resume-detail-dialog {
  border: 0;
  padding: 0;
  border-radius: 20px;
  max-width: min(880px, 94vw);
  width: min(880px, 94vw);
  background: transparent;
}

.resume-detail-body {
  max-width: none;
  width: auto;
  padding: 0;
  background:
    linear-gradient(165deg, rgba(0, 122, 255, 0.08), transparent 36%),
    #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line, #dfe8ea);
  box-shadow: 0 24px 60px rgba(16, 42, 54, 0.18);
}

.resume-detail-head {
  padding: 20px 22px 12px;
  align-items: flex-start;
}

.resume-detail-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.resume-detail-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

#resume-detail-content {
  padding: 0 22px 20px;
}

.rd-summary {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.rd-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #0A84FF, #64d2ff);
}

.rd-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rd-chip {
  padding: 10px 10px 9px;
  border: 1px solid #e4eef0;
  border-radius: 12px;
  background: #f7fbfb;
  min-width: 0;
}

.rd-chip-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.rd-chip-value {
  display: block;
  font-size: 13px;
  color: #1d1d1f;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.rd-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 10px;
  padding: 4px;
  border-radius: 12px;
  background: #f3f7f8;
  width: fit-content;
}

.rd-tab {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 7px 12px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.rd-tab.is-active {
  background: #fff;
  color: #0A84FF;
  box-shadow: 0 1px 3px rgba(16, 35, 47, 0.08);
}

.rd-panel {
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fcfefe;
}

.rd-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: #243940;
  white-space: normal;
  word-break: break-word;
}

.rd-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 28px 0;
  text-align: center;
}

@media (max-width: 1280px) {
  .resume-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .resume-filter-search {
    grid-column: span 2;
  }
}

@media (max-width: 1200px) {
  .resume-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resume-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .resume-head-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .resume-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume-charts { grid-template-columns: 1fr; }
  .resume-chart-wide { grid-column: auto; }
  .resume-filters { grid-template-columns: 1fr 1fr; }
  .resume-filter-search { grid-column: span 2; }
  .resume-table-wrap { max-height: none; }
  .rd-chips {
    grid-template-columns: 1fr 1fr;
  }
  .rd-summary {
    grid-template-columns: 48px 1fr;
  }
}


/* ============================================================
   Apple 主题覆写层（方案1 · macOS 浅色毛玻璃）
   依赖上方 :root 变量；仅覆盖视觉，不改布局逻辑
   ============================================================ */

/* 按钮 → 胶囊形 */
.btn {
  border-radius: 999px;
  border-color: rgba(0, 0, 0, 0.1);
  padding: 7px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn:hover {
  border-color: rgba(0, 0, 0, 0.16);
  background: #fff;
}

.btn.primary {
  box-shadow: 0 1px 3px rgba(0, 122, 255, 0.28);
}

.btn.ghost {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.btn.ghost:hover {
  background: rgba(0, 122, 255, 0.18);
}

.btn.ghost.danger {
  background: var(--warn-soft);
  color: var(--warn);
}

/* 卡片类容器 → 大圆角 + 轻投影 + 去描边 */
.block,
.dash-panel,
.stats-card,
.table-wrap,
.monthly-panel,
.hr-form-panel {
  border: 0;
  border-radius: 14px;
  background: var(--bg-elevated);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.06);
}

/* 指标卡 */
.dash-metrics .metric {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.06);
}

.dash-metrics .metric:hover {
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.09);
}

.dash-metrics .metric.is-alert {
  background: var(--warn-soft);
}

.dash-metrics .metric.is-warn {
  background: var(--caution-soft);
}

/* 表格 */
.table-wrap table thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

/* chip 筛选 → 胶囊 */
.chip {
  border-radius: 999px;
  border-color: rgba(0, 0, 0, 0.1);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 输入控件 → 圆角 + 蓝色聚焦环 */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input:not([type]),
select,
textarea {
  border-radius: 9px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3.5px rgba(0, 122, 255, 0.18) !important;
}

/* 徽章 → 胶囊 */
.badge,
.prio,
.dup-tag {
  border-radius: 999px;
}

/* 对话框 → 更圆润 + 玻璃质感 */
dialog {
  border-radius: 16px;
}

/* 登录卡片阴影柔化 */
.login-panel {
  box-shadow: 0 24px 60px rgba(29, 29, 31, 0.14);
}

/* hr 模板项选中 → 蓝色 */
.hr-tpl-item.active {
  border-color: rgba(0, 122, 255, 0.35);
  background: var(--accent-soft);
}

/* 排版微调：标题更苹果 */
.page-head h1,
.dialog-head h2,
.block-head h2,
.dash-panel-head h2 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lede {
  color: var(--muted);
}

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* 客户复购 */
.rp-panel { margin-top: 12px; }
.rp-params-bar {
  position: relative;
  z-index: 20;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: transparent;
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 18px rgba(80, 100, 140, 0.06);
}
.rp-params-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  pointer-events: none;
  z-index: 0;
}
.rp-params-title {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 650;
  color: #5a6b7a;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.rp-params-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rp-params-chips > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(90, 110, 140, 0.16);
  font-size: 12px;
  color: #5a6b7a;
}
.rp-params-chips > span i {
  font-style: normal;
  font-size: 11px;
  color: #8a9aa6;
  margin-left: 2px;
}
.rp-params-edit {
  margin-left: auto;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}
.rp-filters,
.rp-filter-bar {
  position: relative;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: end;
  margin: 8px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  background: transparent;
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 8px 24px rgba(80, 100, 140, 0.08);
}
/* 毛玻璃放在伪元素，避免 backdrop-filter 裁切 cselect 菜单 */
.rp-filters::before,
.rp-filter-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: inherit;
  pointer-events: none;
  z-index: 0;
}
.rp-filters > *,
.rp-filter-bar > * {
  position: relative;
  z-index: 1;
}
.rp-filters .cselect.is-open,
.rp-filter-bar .cselect.is-open {
  z-index: 40;
}
.rp-filters .cselect-menu,
.rp-filter-bar .cselect-menu {
  z-index: 50;
}
.rp-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: #5a6b7a;
}
.rp-filter-field > span {
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1;
  min-height: 12px;
}
.rp-filter-field .cselect,
.rp-filter-field select {
  min-width: 128px;
}
.rp-filter-search {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 280px;
}
.rp-filters .cselect-compact .cselect-trigger {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(90, 110, 140, 0.22);
  box-shadow: 0 1px 2px rgba(80, 100, 140, 0.04);
}
.rp-filters .cselect-compact .cselect-trigger:hover {
  border-color: rgba(90, 110, 140, 0.36);
  background: #fff;
}
.rp-filters .cselect.is-open .cselect-trigger {
  border-color: var(--accent, #007aff);
  background: #fff;
}
.rp-filter-field input[type="search"],
.rp-filter-field input:not([type]) {
  height: 38px;
  min-width: 0;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(90, 110, 140, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(80, 100, 140, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.rp-filter-field input:hover {
  border-color: rgba(90, 110, 140, 0.36);
  background: #fff;
}
.rp-filter-field input:focus {
  outline: none;
  border-color: var(--accent, #007aff);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
}
.rp-filter-field input::placeholder { color: rgba(0, 0, 0, 0.32); }
#rp-tabs.todo-view-toggle {
  position: relative;
  z-index: 31;
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: transparent;
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 18px rgba(80, 100, 140, 0.07);
}
#rp-tabs.todo-view-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  pointer-events: none;
  z-index: 0;
}
#rp-tabs.todo-view-toggle > * {
  position: relative;
  z-index: 1;
}
#rp-tabs .chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  color: #5a6b7a;
}
#rp-tabs .chip:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
}
#rp-tabs .chip.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px rgba(80, 100, 140, 0.12);
}
#view-repurchase .table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
#view-repurchase .table-wrap table {
  margin: 0;
}
#view-repurchase .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbfb;
  font-size: 12px;
  font-weight: 650;
  color: #6a7c86;
  letter-spacing: 0.02em;
}
#view-repurchase .table-wrap td {
  font-size: 13px;
}
#view-repurchase .table-wrap tr.rp-row:hover td {
  background: rgba(0, 122, 255, 0.04);
}
.rp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .rp-grid-2 { grid-template-columns: 1fr; }
}
.rp-banner {
  background: #fff3e0;
  color: #9a3412;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.rp-warn {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  border-radius: 999px;
  font-size: 12px;
  padding: 1px 8px;
}
.rp-warn-red { background: #fecaca; color: #991b1b; }
.rp-warn-orange { background: #fed7aa; color: #9a3412; }
.rp-warn-yellow { background: #fef08a; color: #854d0e; }
.rp-warn-attention { background: #e5e7eb; color: #374151; }
.rp-row { cursor: pointer; }
.rp-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.rp-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  padding: 22px 20px;
  border: 1.5px dashed rgba(16, 35, 47, 0.22);
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rp-upload-zone:hover,
.rp-upload-zone.is-drag {
  border-color: var(--accent, #007aff);
  background: rgba(0, 122, 255, 0.06);
}
.rp-upload-zone strong {
  font-size: 14px;
  color: var(--ink, #1d1d1f);
}
.rp-upload-zone span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.rp-settings label { font-size: 12px; color: var(--muted); }
.rp-settings label small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  opacity: .85;
  margin-top: 2px;
  line-height: 1.4;
}
.rp-fieldset {
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 12px 0 4px;
  margin: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.rp-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent, #007aff);
  padding: 0 6px 0 0;
}
.rp-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.rp-kv { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.rp-kv span { color: var(--muted); font-size: 12px; }
.rp-sub { margin: 16px 0 8px; font-size: 14px; }
#view-repurchase .board-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  #view-repurchase .board-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 复购三层结构（文档 3.4）+ 两本账（文档 6.1） ===== */
#view-repurchase .board-kpis.rp-layers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-layer {
  border-radius: 16px;
  padding: 14px 16px 16px;
  background: rgba(0,0,0,.018);
  border: 1px solid rgba(16, 35, 47, 0.06);
  box-shadow: none;
}
.rp-layer-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}
.rp-layer-head b { color: var(--ink, #1d1d1f); font-weight: 600; }
.rp-layer-head i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.rp-layer-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0,122,255,.10);
  color: var(--accent, #007aff);
}
.rp-layer-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 1000px) {
  .rp-layer-body { grid-template-columns: 1fr; }
}
.rp-layer-body .board-kpi {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(16, 35, 47, 0.12);
  border-radius: 12px;
  box-shadow: none;
  cursor: default;
}
.rp-layer-body .board-kpi:hover {
  border-color: rgba(16, 35, 47, 0.18);
  box-shadow: 0 2px 8px rgba(16, 35, 47, 0.04);
}
/* 状态只体现在数字色，边框保持完整四边，不用单侧色条 */
#view-repurchase .board-kpi.is-ok,
#view-repurchase .board-kpi.is-bad,
#view-repurchase .board-kpi.is-caution,
#view-repurchase .board-kpi.is-warn {
  box-shadow: none;
  border: 1px solid rgba(16, 35, 47, 0.12);
  background: #fff;
}

.rp-layer-accounts .rp-layer-body.rp-accounts {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 1000px) {
  .rp-layer-accounts .rp-layer-body.rp-accounts { grid-template-columns: 1fr; }
}
.rp-account {
  background: #fff;
  border: 1px solid rgba(16, 35, 47, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: none;
}
.rp-account-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rp-account-title span { font-size: 11px; font-weight: 400; color: var(--muted); }
.rp-account-rows { display: flex; flex-direction: column; gap: 6px; }
.rp-account-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}
.rp-account-rows span { color: var(--muted); }
.rp-account-rows b { font-variant-numeric: tabular-nums; }

/* 投放名单 */
.rp-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.rp-review-card {
  padding: 14px 16px 16px;
  border: 1px solid rgba(16, 35, 47, 0.12);
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-review-card.is-bad { box-shadow: inset 0 0 0 1px rgba(217, 56, 46, 0.18); }
.rp-review-card.is-caution { box-shadow: inset 0 0 0 1px rgba(198, 106, 0, 0.18); }
.rp-review-card.is-ok { box-shadow: inset 0 0 0 1px rgba(31, 138, 59, 0.14); }
.rp-review-card.is-hold {
  background: linear-gradient(180deg, #fff8f6 0%, #fff 40%);
}
.rp-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rp-review-name {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink, #1d1d1f);
}
.rp-review-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.rp-review-grade {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: #5a6b7a;
}
.rp-review-card.is-bad .rp-review-grade {
  background: rgba(217, 56, 46, 0.12);
  color: #c62828;
}
.rp-review-card.is-caution .rp-review-grade {
  background: rgba(255, 149, 0, 0.16);
  color: #c66a00;
}
.rp-review-card.is-ok .rp-review-grade {
  background: rgba(52, 199, 89, 0.14);
  color: #1f8a3b;
}
.rp-review-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink, #1d1d1f);
}
.rp-review-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #6a7c86;
}
.rp-review-metrics b {
  color: var(--ink, #1d1d1f);
  font-variant-numeric: tabular-nums;
}
.rp-review-dims {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rp-review-dim {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(16, 35, 47, 0.06);
}
.rp-review-dim-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 2px;
}
.rp-review-dim p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5a6b7a;
}
.rp-review-dim.lv-strong .rp-review-dim-top b { color: #1f8a3b; }
.rp-review-dim.lv-mid .rp-review-dim-top b { color: #c66a00; }
.rp-review-dim.lv-weak .rp-review-dim-top b { color: #c62828; }
.rp-review-act h4,
.rp-review-focus h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5a6b7a;
  letter-spacing: 0.04em;
}
.rp-review-act ul,
.rp-review-tips {
  margin: 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4a5b68;
}
.rp-review-act ul li::marker,
.rp-review-tips li::marker { color: var(--accent, #007aff); }
.rp-review-focus-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rp-review-focus-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}
.rp-review-focus-item b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}
.rp-review-focus-item p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #6a7c86;
}

.rp-placement-head {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #9a3412;
}
.rp-placement-head span { font-weight: 400; color: var(--muted); font-size: 12px; }
.rp-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.rp-reason {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}
.rp-reason-cell, .rp-action-cell { font-size: 12px; color: var(--muted); }
.rp-action-cell { color: #9a3412; }
.rp-empty-note {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}
.rp-vague { color: #9a3412; }
.rp-vague-tag {
  font-size: 10px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #854d0e;
  margin-left: 4px;
}
.rp-fincards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
@media (max-width: 700px) { .rp-fincards { grid-template-columns: 1fr; } }
.rp-fincards > div {
  background: rgba(0,0,0,.02);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rp-fincards span { font-size: 12px; color: var(--muted); }
.rp-fincards b { font-size: 20px; font-variant-numeric: tabular-nums; }
.rp-fincards b.is-bad { color: #ff3b30; }
.rp-fincards b.is-ok { color: #34c759; }

/* 产品结构 */
.rp-structure { display: flex; flex-direction: column; gap: 12px; padding: 6px 0; }
.rp-struct-row {
  display: grid;
  grid-template-columns: 56px 1fr 90px 54px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.rp-struct-label { color: var(--muted); }
.rp-struct-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  overflow: hidden;
}
.rp-struct-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent, #007aff);
}
.rp-struct-val, .rp-struct-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rp-struct-pct { color: var(--muted); }
.rp-fieldset-pending { opacity: .72; }
.rp-fieldset-pending legend { color: var(--muted); }
.rp-pending-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  background: rgba(0,0,0,.02);
  border-radius: 10px;
  padding: 10px 12px;
}



/* ============================================================
   控件精修层 · Apple HIG
   ⚠ 作用域：仅限「客户复购」模块（#view-repurchase 及其弹窗 #rp-cust-dialog /
   #rp-order-dialog / #rp-record-dialog）。其他视图保持原生外观，不受影响。
   ============================================================ */

/* ---- 复购模块下拉框：弹窗内仍用原生精修；筛选条走 cselect ---- */
#rp-cust-dialog select,
#rp-order-dialog select,
#rp-record-dialog select,
#rp-cust-dialog .rp-form-row select {
  -webkit-appearance: none;
  appearance: none;
  height: 34px;
  padding: 0 30px 0 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 9px;
  background:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e6e73' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 11px center,
    #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink, #1d1d1f);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
#rp-cust-dialog select:hover,
#rp-order-dialog select:hover,
#rp-record-dialog select:hover {
  border-color: rgba(0,0,0,.22);
}
#rp-cust-dialog select:focus,
#rp-order-dialog select:focus,
#rp-record-dialog select:focus {
  outline: none;
  border-color: var(--accent, #007aff);
  box-shadow: 0 0 0 3px rgba(0,122,255,.18);
}

/* ---- 复购模块输入框（设置表单 + 弹窗；筛选搜索见 .rp-filter-field） ---- */
#rp-settings-form input[type="number"],
#rp-settings-form input[type="text"],
#rp-cust-dialog input[type="text"],
#rp-cust-dialog input[type="number"],
#rp-cust-dialog input[type="date"],
#rp-cust-dialog input:not([type]),
#rp-order-dialog input[type="text"],
#rp-order-dialog input[type="number"],
#rp-order-dialog input[type="date"],
#rp-order-dialog input:not([type]) {
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink, #1d1d1f);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
#rp-settings-form input:hover,
#rp-cust-dialog input:hover,
#rp-order-dialog input:hover {
  border-color: rgba(0,0,0,.22);
}
#rp-settings-form input:focus,
#rp-cust-dialog input:focus,
#rp-order-dialog input:focus {
  outline: none;
  border-color: var(--accent, #007aff);
  box-shadow: 0 0 0 3px rgba(0,122,255,.18);
}
#rp-settings-form input[type="number"] { font-variant-numeric: tabular-nums; }

/* ---- 复购模块文本域 ---- */
#rp-cust-dialog textarea,
#rp-order-dialog textarea {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink, #1d1d1f);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
#rp-cust-dialog textarea:focus,
#rp-order-dialog textarea:focus {
  outline: none;
  border-color: var(--accent, #007aff);
  box-shadow: 0 0 0 3px rgba(0,122,255,.18);
}

/* ---- 复购设置表单：固定三列、说明文字留白 ---- */
#rp-settings-form { row-gap: 4px; }
#rp-settings-form .rp-fieldset { grid-template-columns: repeat(3, 1fr); }
#rp-settings-form .rp-fieldset label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink, #1d1d1f);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.018);
}
#rp-settings-form .rp-fieldset label small {
  margin-top: 0;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}
@media (max-width: 1000px) {
  #rp-settings-form .rp-fieldset { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #rp-settings-form .rp-fieldset { grid-template-columns: 1fr; }
}

/* ---- 复购模块按钮：胶囊化（仅模块内，不动全局 .btn） ---- */
#view-repurchase .block-head .btn.ghost,
#rp-cust-dialog .dialog-actions .btn,
#rp-order-dialog .dialog-actions .btn,
#rp-record-dialog .dialog-actions .btn {
  border-radius: 999px;
}

/* ---- 三层结构：淡色底 + 全框卡片，无单侧竖条 ---- */
.rp-layer {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(16, 35, 47, 0.06);
}
.rp-layer::before { display: none; content: none; }
.rp-layer-1 { background: rgba(0, 122, 255, 0.05); box-shadow: none; }
.rp-layer-2 { background: rgba(255, 149, 0, 0.055); box-shadow: none; }
.rp-layer-3 { background: rgba(175, 82, 222, 0.05); box-shadow: none; }
.rp-layer-accounts { background: rgba(52, 199, 89, 0.055); box-shadow: none; }

.rp-layer-tag {
  font-size: 11px;
  font-weight: 650;
  padding: 2px 9px;
  border-radius: 999px;
}
.rp-layer-1 .rp-layer-tag {
  color: #007aff;
  background: rgba(0, 122, 255, 0.12);
}
.rp-layer-2 .rp-layer-tag {
  color: #c66a00;
  background: rgba(255, 149, 0, 0.14);
}
.rp-layer-3 .rp-layer-tag {
  color: #8e44ad;
  background: rgba(175, 82, 222, 0.12);
}
.rp-layer-accounts .rp-layer-tag {
  color: #1f8a3b;
  background: rgba(52, 199, 89, 0.14);
}

/* ---- KPI 数值语义色（略柔和） ---- */
#view-repurchase .board-kpi-value { font-variant-numeric: tabular-nums; }
#view-repurchase .board-kpi-value.val-ok { color: #1f8a3b; }
#view-repurchase .board-kpi-value.val-bad { color: #d9382e; }
#view-repurchase .board-kpi-value.val-caution { color: #c66a00; }

/* ---- 迷你进度条（目标线在右端） ---- */
.rp-meter {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
  margin-top: 2px;
}
.rp-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .5s ease;
}
.rp-meter.ok i { background: #34c759; }
.rp-meter.bad i { background: #ff3b30; }
.rp-meter.caution i { background: #ff9500; }

/* ---- 预警表「要求动作」降噪：灰字 + 色点 ---- */
.rp-action-cell {
  color: var(--muted);
  position: relative;
  padding-left: 14px !important;
}
.rp-action-cell::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ff9500;
}
tr:has(.rp-warn-red) .rp-action-cell::before { background: #ff3b30; }
tr:has(.rp-warn-yellow) .rp-action-cell::before { background: #e6b800; }
tr:has(.rp-warn-attention) .rp-action-cell::before { background: #8e8e93; }

/* ---- 图表条形圆角 ---- */
#rp-chart-region .bar-rect, #rp-chart-owner .bar-rect,
#rp-chart-region rect, #rp-chart-owner rect {
  rx: 3px;
}

/* ---- 筛选器容器（与看板筛选统一，避免旧规则覆盖） ---- */
.rp-filters label {
  display: none;
}

/* ---- 预警 pill 加边框提质感 ---- */
.rp-warn { font-weight: 600; }
.rp-warn-red { box-shadow: inset 0 0 0 1px rgba(153,27,27,.25); }
.rp-warn-orange { box-shadow: inset 0 0 0 1px rgba(154,52,18,.25); }
.rp-warn-yellow { box-shadow: inset 0 0 0 1px rgba(133,77,14,.25); }
.rp-warn-attention { box-shadow: inset 0 0 0 1px rgba(55,65,81,.25); }

/* ============================================================
   复购模块控件 · cselect 源 select 勿被属性选择器撑开
   ============================================================ */
#view-repurchase select.cselect-source[data-rp-f],
#view-repurchase .rp-filters select.cselect-source {
  height: 1px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
