:root {
  --sidebar-width: 232px;
  --sidebar-collapsed-width: 64px;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe4ee;
  --surface: #ffffff;
  --wash: #f4f7fb;
  --blue: #2754ff;
  --blue-soft: #e8efff;
  --cyan: #00a6c8;
  --green: #008a52;
  --amber: #b86500;
  --red: #c73333;
  --shadow: 0 18px 45px rgba(36, 56, 98, 0.11);
  /* shadcn 黑白按钮风格（参考图片 2） */
  --btn-ink: #18181b;
  --btn-border: #e4e4e7;
  --btn-hover: #f4f4f5;
  --btn-muted: #52525b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(90deg, #eef4f8 0, #f9fbfd 22%, #ffffff 100%);
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: #000000;
  animation: splashFadeOut 0.6s ease 1.4s forwards;
}

.splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: splashMarkIn 0.7s ease both;
}

.splash-mark {
  color: #ffffff;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

.splash-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.08em;
  padding-left: 0.08em;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

@keyframes splashMarkIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: #000000;
  color: #ffffff;
}

.login-screen.hidden {
  display: none;
}

.login-brand {
  position: absolute;
  top: 28px;
  left: 32px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

.login-card {
  display: grid;
  gap: 18px;
  width: 360px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-card h1 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-card input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.login-card input:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.login-card input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.login-card .primary {
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #000000;
  font-size: 14px;
  font-weight: 600;
}

.login-card .primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

.login-card small {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 0;
  background: #ffffff;
  border-right: 1px solid var(--btn-border);
  box-shadow: none;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--btn-border);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--btn-ink);
  border-radius: 10px;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

.login-card .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 28px;
}

.sidebar-profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title {
  display: block;
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-user {
  color: var(--btn-muted);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--btn-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-toggle:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
}

.sidebar-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

body.sidebar-collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  padding: 12px 10px;
  overflow-y: auto;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--btn-ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
}

.sidebar-link.active {
  background: var(--btn-ink);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-link.active .sidebar-link-icon {
  color: #ffffff;
}

.sidebar-link-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--btn-muted);
  transition: color 0.15s ease;
}

.sidebar-link:hover .sidebar-link-icon {
  color: var(--btn-ink);
}

.sidebar-link-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-section {
  margin-top: 8px;
}

.sidebar-section[open] {
  margin-bottom: 4px;
}

.sidebar-section > summary {
  list-style: none;
}

.sidebar-section > summary::-webkit-details-marker {
  display: none;
}

.sidebar-section-head {
  cursor: pointer;
}

.sidebar-section-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--btn-muted);
  transition: transform 0.2s ease;
}

.sidebar-section[open] .sidebar-section-arrow {
  transform: rotate(180deg);
}

.sidebar-section-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 4px 0;
}

.sidebar-footer {
  border-top: 1px solid var(--btn-border);
  padding: 10px;
}

.sidebar-link-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.sidebar-link-danger:hover .sidebar-link-icon {
  color: #b91c1c;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-profile {
  flex-direction: column;
  gap: 8px;
  padding: 14px 10px;
}

body.sidebar-collapsed .sidebar-profile-text {
  display: none;
}

body.sidebar-collapsed .sidebar-link-label,
body.sidebar-collapsed .sidebar-section-arrow {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 8px 0;
}

body.sidebar-collapsed .sidebar-section-head {
  display: none;
}

body.sidebar-collapsed .sidebar-section[open] .sidebar-section-body,
body.sidebar-collapsed .sidebar-section .sidebar-section-body {
  display: flex;
  padding: 0;
}

body.sidebar-collapsed .sidebar-nav {
  padding: 10px 8px;
}

body.sidebar-collapsed .sidebar-footer {
  padding: 10px 8px;
}

.eyebrow {
  color: var(--muted);
  font-size: 9px;
}

.workspace {
  margin-left: var(--sidebar-width);
  padding: 28px;
  min-width: 1120px;
  transition: margin-left 0.2s ease;
}

body.sidebar-collapsed .workspace {
  margin-left: var(--sidebar-collapsed-width);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 17px;
}

.toolbar,
.filters,
.tabs,
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-pager {
  flex-wrap: wrap;
}

.match-pager .pager-spacer {
  flex: 1 1 auto;
}

.match-receipt-total {
  font-weight: 700;
  color: #334155;
}

.match-purchase-total {
  font-weight: 700;
  color: #1d4ed8;
}

[hidden] {
  display: none !important;
}

.copy-cell {
  position: relative;
  cursor: pointer;
}

.copy-cell:hover {
  background: rgba(244, 244, 245, 0.55);
}

.copy-cell.is-active {
  background: var(--btn-hover);
}

.copy-cell .copy-cell-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.copy-cell-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--btn-muted);
  cursor: pointer;
  z-index: 1;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.copy-cell-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.copy-cell.num .copy-cell-btn {
  right: auto;
  left: 6px;
}

.copy-cell.is-active .copy-cell-btn {
  display: inline-flex;
}

.copy-cell-btn:hover {
  background: var(--btn-ink);
  color: #ffffff;
  border-color: var(--btn-ink);
}

button,
.primary {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  color: var(--btn-ink);
  background: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

button:hover {
  background: var(--btn-hover);
}

/* ghost：透明底、无描边，悬停浅灰（Features / Pricing / About 风格） */
.ghost {
  border-color: transparent;
  background: transparent;
}

.ghost:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
  filter: none;
}

/* primary：强调型 outline，和默认按钮保持同一套外框语言 */
.primary {
  display: inline-flex;
  align-items: center;
  color: var(--btn-ink);
  background: #ffffff;
  border-color: var(--btn-ink);
}

.primary:hover {
  background: var(--btn-hover);
  border-color: var(--btn-ink);
  color: var(--btn-ink);
  filter: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.view {
  display: none;
}

.view.active-view {
  display: block;
}

.tabs {
  padding: 14px 16px 8px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs button {
  border-color: transparent;
  color: #475569;
  background: #edf3f8;
  white-space: nowrap;
}

.tabs button.active {
  color: white;
  background: var(--btn-ink);
}

.tabs.sub-tabs {
  padding-top: 6px;
  background: #fff;
}

.tabs.sub-tabs button {
  font-size: 12px;
  padding: 6px 10px;
}

.tag-new {
  display: inline-block;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e67e22;
}

.aging {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.badge + small {
  color: #94a3b8;
  font-size: 11px;
}

.hidden {
  display: none !important;
}

.batch-select-col {
  width: 42px;
  text-align: center;
}

.batch-select-col input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.batch-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.batch-invoice-results {
  margin: 12px 0;
  min-height: 120px;
}

.batch-candidate-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.batch-candidate-panel .candidate-list {
  max-height: 420px;
  overflow: auto;
}

#batchAssignDialog {
  width: min(920px, 96vw);
  max-height: 90vh;
}

#batchAssignDialog .detail-grid {
  max-height: calc(90vh - 80px);
  overflow: auto;
}

.filters {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

#matchView > .filters,
#receiptsView > .filters,
#invoicesView > .filters,
#purchaseView > .filters,
#postingView > .filters {
  position: relative;
  z-index: 40;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  overflow: visible;
}

#matchView > .filters > button,
#matchView > .filters > .export-dropdown,
#receiptsView > .filters > button,
#receiptsView > .filters > .export-dropdown,
#invoicesView > .filters > button,
#invoicesView > .filters > .export-dropdown,
#purchaseView > .filters > button,
#purchaseView > .filters > .export-dropdown {
  flex: 0 0 auto;
  align-self: flex-end;
}

#matchView > .filters label,
#receiptsView > .filters label,
#invoicesView > .filters label,
#purchaseView > .filters label {
  flex: 1 1 320px;
  min-width: 260px;
}

#matchView > .filters .filter-date-range,
#receiptsView > .filters .filter-date-range,
#invoicesView > .filters .filter-date-range,
#purchaseView > .filters .filter-date-range {
  flex: 0 0 auto;
  min-width: 0;
}

#matchView > .filters > button,
#receiptsView > .filters > button,
#invoicesView > .filters > button,
#purchaseView > .filters > button {
  min-width: 64px;
}

.filters label {
  display: grid;
  gap: 6px;
  min-width: 280px;
  color: var(--muted);
  font-size: 9px;
}

.filters.compact {
  padding: 0;
  border-bottom: 0;
  flex-wrap: wrap;
}

.filters.compact label {
  min-width: 260px;
}

.file-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #aebbd0;
  border-radius: 8px;
  background: #f8fbff;
}

.file-box span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

input,
select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

input:hover,
select:hover {
  border-color: #d4d4d8;
}

input:focus,
select:focus {
  border-color: var(--btn-ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
  outline: none;
}

input[type="date"] {
  min-width: 142px;
  padding-right: 10px;
  color-scheme: light;
  font-variant-numeric: tabular-nums;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  opacity: 0.68;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.95;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 350px);
}

body.focus-mode .metrics,
body.focus-mode .topbar > div:first-child {
  display: none;
}

body.focus-mode .topbar {
  margin-bottom: 10px;
  justify-content: flex-end;
}

body.focus-mode .view.active-view > .tabs {
  display: none;
}

body.focus-mode .view.active-view {
  display: flex;
  flex-direction: column;
}

body.focus-mode .table-wrap {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 150px);
}

body.focus-mode .report-view.active-view {
  display: block;
}

.focus-toggle {
  color: var(--btn-ink);
  border-color: transparent;
  background: transparent;
  white-space: nowrap;
}

.table-wrap.small {
  max-height: 420px;
}

table {
  width: 100%;
  min-width: 1360px;
  border-collapse: collapse;
}

th,
td {
  height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  white-space: nowrap;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfe;
  font-weight: 700;
}

tbody tr:hover {
  background: #f8fbff;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.status-auto_matched,
.status-confirmed {
  color: var(--green);
  background: #e7f7ef;
}

.status-need_review {
  color: var(--amber);
  background: #fff4df;
}

.status-supplier_exception,
.status-amount_exception,
.status-rejected {
  color: var(--red);
  background: #ffecec;
}

.status-invoice-free {
  color: #1b7f4a;
  background: #e7f7ef;
}

.status-invoice-occupied {
  color: var(--amber);
  background: #fff4df;
}

.status-invoice-confirmed {
  color: var(--green);
  background: #e7f7ef;
}

.status-invoice-rejected {
  color: var(--muted);
  background: #eef2f7;
}

.status-invoice-normal {
  color: #1b7f4a;
  background: #e7f7ef;
}

.status-invoice-red {
  color: var(--red);
  background: #ffecec;
}

.invoice-occupied-by {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.score {
  width: 54px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  color: var(--cyan);
  background: #e8faff;
  border-radius: 6px;
  font-weight: 800;
}

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

.row-actions button {
  height: 30px;
  padding: 0 9px;
  font-size: 12px;
  cursor: pointer;
}

.row-actions .detail-btn {
  color: var(--btn-ink);
  background: #ffffff;
  border-color: var(--btn-ink);
}

.row-actions .detail-btn:hover {
  background: var(--btn-hover);
  filter: none;
}

.posting-status {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.posting-status-pending {
  color: var(--amber);
  background: #fff4df;
}

.posting-status-posted {
  color: var(--green);
  background: #e7f7ef;
}

.posting-status-voided {
  color: var(--muted);
  background: #eef2f7;
}

.pending-summary {
  font-size: 13px;
  color: var(--btn-muted);
  align-self: center;
}

#postingDialog {
  max-width: 1280px;
  width: min(96vw, 1280px);
}

#postingDialog tr.muted td {
  color: #9aa1aa;
  background: #fafbfc;
}

.posting-pending-block {
  margin: 12px 16px 0;
  padding: 10px 16px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.posting-pending-block > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--ink);
}

.posting-pending-block > summary::-webkit-details-marker {
  display: none;
}

.posting-pending-block > summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s;
}

.posting-pending-block[open] > summary::before {
  transform: rotate(90deg);
}

.posting-pending-title {
  font-size: 13px;
  letter-spacing: 0.2px;
}

.posting-pending-meta {
  flex: 1 1 auto;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

.pending-table {
  margin-top: 4px;
  margin-bottom: 12px;
}

.pending-table table {
  width: auto;
  min-width: 0;
  table-layout: auto;
}

.pending-table th,
.pending-table td {
  padding: 8px 20px;
  white-space: nowrap;
}

.pending-table th:first-child,
.pending-table td:first-child {
  padding-left: 4px;
}

.pending-table th:last-child,
.pending-table td:last-child {
  padding-right: 4px;
}

.posting-section-title {
  margin: 16px 16px 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: none;
}

.pager {
  justify-content: flex-end;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--btn-muted);
}

.pager-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-page,
.pager-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.pager-arrow {
  width: 32px;
  padding: 0;
  color: var(--btn-muted);
}

.pager-arrow svg {
  width: 14px;
  height: 14px;
}

.pager-page:hover,
.pager-arrow:not(:disabled):hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
  border-color: var(--btn-ink);
}

.pager-page.is-current {
  background: var(--btn-ink);
  color: #ffffff;
  border-color: var(--btn-ink);
  cursor: default;
}

.pager-page.is-current:hover {
  background: var(--btn-ink);
  color: #ffffff;
}

.pager-arrow:disabled,
.pager-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: var(--btn-muted);
  letter-spacing: 1px;
  user-select: none;
}

.pager-select {
  height: 32px;
  min-width: 96px;
  padding: 0 28px 0 12px;
  margin-left: 6px;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--btn-ink);
  font-size: 13px;
  cursor: pointer;
}

.pager-select:hover {
  border-color: var(--btn-ink);
}

.pager-select:focus {
  outline: none;
  border-color: var(--btn-ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}

dialog {
  z-index: 40;
  width: min(1360px, calc(100vw - 32px));
  max-height: 92vh;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  padding: 0;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.32);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--btn-border);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--btn-muted);
  background: transparent;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
  border-color: var(--btn-border);
}

.detail-grid {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
  overflow: auto;
  max-height: calc(92vh - 80px);
}

.report-view {
  padding: 18px;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.report-card {
  min-height: 240px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.report-card.wide {
  grid-column: 1 / -1;
}

.report-card h3 {
  margin: 0 0 12px;
  font-size: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 90px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
}

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

.bar-fill {
  height: 100%;
  background: var(--blue);
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.kv {
  padding: 12px 14px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: #ffffff;
}

.kv span {
  display: block;
  color: var(--btn-muted);
  font-size: 11px;
  font-weight: 500;
}

.kv strong {
  display: block;
  margin-top: 4px;
  color: var(--btn-ink);
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.split-pane {
  display: flex;
  width: 100%;
  height: min(720px, calc(92vh - 200px));
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.split-pane-left {
  flex: 0 0 var(--split-left, 34%);
  width: var(--split-left, 34%);
  min-width: 50px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.split-pane-right {
  flex: 1 1 0;
  min-width: 50px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.split-pane-divider {
  flex: 0 0 8px;
  cursor: col-resize;
  background: linear-gradient(180deg, #f8fbff 0%, #edf2f7 100%);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
  user-select: none;
}

.split-pane-divider::after {
  content: "⋮";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

body.split-dragging {
  cursor: col-resize;
  user-select: none;
}

.split-pane-left .subtable,
.split-pane-right .subtable {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.split-pane-left .subtable table {
  font-size: 12px;
  line-height: 1.4;
  table-layout: auto;
  width: 100%;
  border-collapse: collapse;
}

.split-pane-left .subtable table.resizable-items {
  table-layout: fixed;
  width: auto;
  align-self: flex-start;
}

.resizable-items th {
  position: relative;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: 4px;
  width: 1px;
  background: var(--btn-border);
  transition: background-color 0.15s ease, width 0.15s ease;
}

.col-resizer:hover::after {
  width: 2px;
  background: var(--btn-ink);
}

body.col-resizing {
  cursor: col-resize;
  user-select: none;
}

body.col-resizing * {
  cursor: col-resize !important;
}

.split-pane-left .subtable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 32px;
  padding: 0 8px;
  background: #fafafa;
  border-bottom: 1px solid var(--btn-border);
  color: var(--btn-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.split-pane-left .subtable tbody td {
  height: auto;
  padding: 6px 8px;
  border-bottom: 1px solid #f4f4f5;
  color: var(--btn-ink);
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.split-pane-left .subtable tbody tr:last-child td {
  border-bottom: 0;
}

.split-pane-left .subtable tbody tr:hover td {
  background: rgba(244, 244, 245, 0.6);
}

.split-pane-left .subtable th:nth-child(3),
.split-pane-left .subtable td:nth-child(3),
.split-pane-left .subtable th:nth-child(4),
.split-pane-left .subtable td:nth-child(4),
.split-pane-left .subtable th:nth-child(5),
.split-pane-left .subtable td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.candidate-panel {
  max-height: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 用户管理：权限勾选 */
.perm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  max-width: 320px;
}

.perm-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--btn-ink);
  white-space: nowrap;
  cursor: pointer;
}

.perm-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.perm-check input:disabled {
  cursor: not-allowed;
}

.perm-custom-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 500;
}

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

.user-row-actions button {
  flex-shrink: 0;
  height: 38px;
  border-radius: 10px;
}

/* 用户与权限弹窗 */
#userDialog .filters.compact {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

#userDialog .filters.compact label {
  min-width: 0;
  flex: 1 1 148px;
  max-width: 200px;
}

#userDialog .user-form-action {
  flex: 0 0 auto;
  min-width: auto;
  max-width: none;
}

#userDialog .user-form-action > span {
  font-size: 9px;
  line-height: 1.2;
  visibility: hidden;
  user-select: none;
}

#userDialog #saveUserBtn {
  width: auto;
  min-width: 96px;
}

#userDialog .table-wrap table {
  min-width: 0;
  width: 100%;
}

#userDialog th,
#userDialog td {
  vertical-align: middle;
}

#userDialog .perm-grid {
  max-width: none;
}

#userDialog td.user-row-actions {
  white-space: nowrap;
}

.change-password-dialog {
  z-index: 2100;
  width: min(440px, calc(100vw - 32px));
}

.change-password-form {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.change-password-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--btn-muted);
}

.change-password-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.change-password-form .primary {
  margin-top: 4px;
}

.subtable {
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
}

.subtable h3 {
  margin: 0;
  padding: 12px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--btn-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--btn-ink);
}

.subtable h3 small {
  margin-left: 8px;
  color: var(--btn-muted);
  font-weight: 400;
  font-size: 12px;
}

.candidate-toolbar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--btn-border);
  background: #fafafa;
  flex-wrap: wrap;
  align-items: center;
}

.candidate-toolbar-hint {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}

.candidate-search-row {
  display: flex;
  flex: 1 1 100%;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.candidate-search-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.candidate-search-row input[type="search"] {
  flex: 1 1 160px;
  min-width: 0;
}

.candidate-search-row > button {
  flex: 0 0 auto;
}

.candidate-search-divider {
  width: 1px;
  align-self: stretch;
  background: var(--btn-border);
  margin: 4px 2px;
  flex: 0 0 auto;
}

.candidate-search-hint {
  margin: 0;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

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

.detail-invoice-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.detail-invoice-check:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.candidate-toolbar input {
  flex: 1 1 0;
  min-width: 0;
}

.candidate-search-results {
  flex: 1 1 auto;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  overflow: auto;
  background: #fffdf8;
}

.candidate-search-results:not(.hidden) {
  min-height: min(360px, 45vh);
}

.candidate-search-results.hidden {
  display: none;
}

/* 商品搜索展开时，主列表收窄，把可视区域让给搜索结果 */
.candidate-panel:has(.candidate-search-results:not(.hidden)) .candidate-list {
  flex: 0 0 auto;
  max-height: min(200px, 22vh);
}

.candidate-search-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.candidate-search-item.is-current {
  background: #f4fbf4;
}

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

.candidate-search-head .candidate-no {
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.candidate-search-lines {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
}

.candidate-search-lines li {
  margin: 2px 0;
}

.candidate-search-lines li.muted {
  list-style: none;
  margin-left: -18px;
}

.candidate-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.candidate-item {
  border-bottom: 1px solid #f4f4f5;
}

.candidate-item:last-child {
  border-bottom: none;
}

.candidate-item:hover > .candidate-summary {
  background: rgba(244, 244, 245, 0.5);
}

.candidate-summary {
  display: grid;
  grid-template-columns: 16px 80px 184px minmax(96px, 1fr) 92px minmax(120px, max-content) minmax(120px, auto);
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  line-height: 1.35;
  transition: background-color 0.15s ease;
}

.candidate-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.candidate-summary-select {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.candidate-select-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.candidate-summary::-webkit-details-marker {
  display: none;
}

.candidate-toggle {
  color: var(--muted);
  font-size: 10px;
  transition: transform 0.15s ease;
}

.candidate-item[open] .candidate-toggle {
  transform: rotate(90deg);
}

.candidate-date {
  color: var(--muted);
  font-size: 12px;
}

.candidate-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.candidate-seller {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  min-width: 0;
}

.candidate-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.candidate-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.candidate-tag-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.candidate-tag-detail {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
  opacity: 0.85;
}

.candidate-tag.current {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.candidate-tag.blocked {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.candidate-tag.tier-priority {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.candidate-tag.tier-review {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.candidate-tag.tier-other {
  background: #f4f4f5;
  color: #52525b;
  border-color: var(--btn-border);
}

.candidate-load-more {
  padding: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.candidate-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--btn-border);
  background: #ffffff;
  font-size: 12px;
  color: var(--btn-muted);
}

.candidate-pager .pager-spacer {
  flex: 1 1 auto;
}

.candidate-pager-total {
  font-variant-numeric: tabular-nums;
}

.candidate-item.tier-priority:not(.is-blocked) .candidate-summary {
  background: linear-gradient(90deg, rgba(232, 245, 233, 0.45), transparent);
}

.candidate-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 60px;
  padding: 0 8px;
  border: 1px solid var(--btn-border);
  background: #ffffff;
  border-radius: 8px;
  color: var(--btn-ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.candidate-select:hover:not(:disabled) {
  background: var(--btn-hover);
  border-color: var(--btn-ink);
  color: var(--btn-ink);
}

.candidate-select.is-selected {
  background: #ecfdf5;
  border-color: #34d399;
  color: #047857;
}

.candidate-select.is-selected:hover:not(:disabled) {
  background: #d1fae5;
  border-color: #047857;
  color: #047857;
}

.candidate-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.candidate-select.batch-reassign,
.candidate-select.candidate-release {
  width: auto;
  min-width: 56px;
  padding: 4px 6px;
  font-size: 11px;
  border-color: #d97706;
  color: #b45309;
  background: #fffbeb;
}

.candidate-select.candidate-release:hover:not(:disabled) {
  filter: brightness(0.97);
}

.batch-candidate-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.candidate-select.batch-release {
  width: auto;
  min-width: 64px;
  padding: 4px 8px;
  border-color: #64748b;
  color: #475569;
  background: #f8fafc;
}

.candidate-select.batch-release:hover:not(:disabled) {
  border-color: #475569;
  background: #f1f5f9;
  color: #334155;
}

.candidate-item.is-blocked .candidate-summary {
  opacity: 0.85;
}

.candidate-select.batch-reassign:hover {
  border-color: #b45309;
  background: #fef3c7;
  color: #92400e;
}

.candidate-item.is-current {
  background: #f4fbf4;
}

.candidate-body {
  padding: 6px 12px 10px 24px;
  background: #fafafa;
  border-top: 1px solid #f4f4f5;
}

.candidate-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.4;
  background: #ffffff;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  overflow: hidden;
  table-layout: auto;
}

.candidate-items-table.resizable-items {
  table-layout: fixed;
  width: auto;
}

.candidate-items-table thead th {
  height: 30px;
  padding: 0 8px;
  background: #fafafa;
  border-bottom: 1px solid var(--btn-border);
  color: var(--btn-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.candidate-items-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #f4f4f5;
  color: var(--btn-ink);
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.candidate-items-table tbody tr:last-child td {
  border-bottom: 0;
}

.candidate-items-table tbody tr:hover td {
  background: rgba(244, 244, 245, 0.6);
}

.candidate-items-table th:nth-child(3),
.candidate-items-table td:nth-child(3),
.candidate-items-table th:nth-child(4),
.candidate-items-table td:nth-child(4),
.candidate-items-table th:nth-child(5),
.candidate-items-table td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.candidate-items-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.candidate-empty {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
}

.candidate-loading {
  font-style: italic;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 12px 14px;
  color: white;
  background: #111827;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

.export-dropdown {
  position: relative;
  display: inline-flex;
  align-self: flex-end;
  height: 38px;
  align-items: center;
}

.filters-export {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 168px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 120;
}

.export-menu.hidden {
  display: none;
}

.export-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.export-menu button:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
}

.filter-date-range .date-range-inputs {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.date-range-trigger {
  min-width: 238px;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
}

.date-range-trigger:focus-visible {
  border-color: var(--btn-ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
  outline: none;
}

.date-range-icon {
  color: var(--btn-muted);
  font-size: 15px;
  line-height: 1;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  width: 310px;
  padding: 14px;
  border: 1px solid var(--btn-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.date-range-calendar-head,
.date-range-calendar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-range-calendar-head {
  margin-bottom: 12px;
}

.date-range-calendar-head strong {
  font-size: 14px;
}

.date-range-nav-group {
  display: inline-flex;
  gap: 4px;
}

.date-range-calendar-head button,
.date-range-calendar-foot button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.date-range-calendar-head button:hover,
.date-range-calendar-foot button:hover {
  background: var(--btn-hover);
}

.date-range-weekdays,
.date-range-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-range-weekdays {
  margin-bottom: 6px;
}

.date-range-weekdays span {
  display: grid;
  height: 28px;
  place-items: center;
  color: var(--btn-muted);
  font-size: 12px;
  font-weight: 600;
}

.date-range-days button {
  height: 34px;
  padding: 0;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
}

.date-range-days button:hover {
  background: var(--btn-hover);
}

.date-range-days button.is-outside {
  color: #a1a1aa;
}

.date-range-days button.is-in-range,
.date-range-days button.is-preview {
  background: #f4f4f5;
}

.date-range-days button.is-start,
.date-range-days button.is-end,
.date-range-days button.is-preview-end {
  border-color: var(--btn-ink);
  background: #ffffff;
  color: var(--btn-ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--btn-ink);
}

.date-range-days button.is-preview:not(.is-start):not(.is-preview-end) {
  color: #3f3f46;
}

.date-range-calendar-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--btn-border);
}

.date-range-calendar-foot button {
  width: auto;
  padding: 0 8px;
  color: #006fd6;
}

.date-range-calendar-foot span {
  color: var(--btn-muted);
  font-size: 12px;
}

.task-center-dialog {
  width: min(960px, 96vw);
  max-height: 88vh;
}

.task-center-body {
  max-height: calc(88vh - 72px);
  overflow: auto;
}

.task-center-hint {
  margin-left: auto;
  font-size: 12px;
}

.task-center-table td,
.task-center-table th {
  font-size: 12px;
}

.job-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.job-status.pending,
.job-status.running {
  background: #e3f2fd;
  color: #1565c0;
}

.job-status.succeeded {
  background: #e8f5e9;
  color: #2e7d32;
}

.job-status.failed {
  background: #ffebee;
  color: #c62828;
}

.job-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}

.job-progress-bar {
  flex: 1;
  height: 6px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.job-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  transition: width 0.2s ease;
}

.job-progress-done {
  color: #2e7d32;
  font-weight: 700;
  font-size: 14px;
}

/* 顶部工具栏仅调整布局间距，按钮视觉统一走全局规则。 */
.topbar .toolbar {
  gap: 6px;
}
