:root {
  --blue: #1677ff;
  --blue-strong: #0958d9;
  --green: #18a058;
  --red: #d92d20;
  --amber: #d97706;
  --ink: #1f2937;
  --muted: #667085;
  --weak: #98a2b3;
  --line: #d9e2ef;
  --line-dark: #c7d3e3;
  --canvas: #f4f7fb;
  --panel: #ffffff;
  --soft: #f7faff;
  --sidebar: rgba(255, 255, 255, 0.76);
  --hover: #eaf3ff;
  --shadow: none;
  --radius: 8px;
  --radius-sm: 8px;
  --sidebar-width: 218px;
  --topbar-height: 72px;
  --sticky-command-height: 64px;
  --sticky-command-top: var(--topbar-height);
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-height) + 14px);
  color-scheme: light;
}

/* Quality pass: calmer enterprise UI, less card-wall noise. */
:root {
  --ink: #172033;
  --muted: #5f6f86;
  --weak: #8a97aa;
  --line: #dbe4f0;
  --line-dark: #c8d4e5;
  --canvas: #f1f5f9;
  --soft: #f8fafc;
  --hover: #eef6ff;
  --panel-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body[data-theme="dark"] {
  --ink: #f3f7fb;
  --muted: #b8c4d6;
  --weak: #8391a6;
  --line: #263244;
  --line-dark: #344257;
  --canvas: #0b1017;
  --panel: #121923;
  --soft: #0f1620;
  --hover: #17253a;
  --panel-shadow: none;
}

.sidebar {
  background: color-mix(in srgb, var(--panel) 90%, var(--canvas));
  backdrop-filter: none;
}

.brand {
  padding-inline: 16px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #1264d8;
  font-size: 15px;
}

.brand-name {
  letter-spacing: 0;
}

.nav {
  padding-inline: 12px;
}

.nav-module {
  min-height: 48px;
  padding: 8px 10px;
}

.nav-module .nav-icon {
  background: transparent;
  color: #6b7a90;
}

.nav-module.is-active {
  border-color: #b7d4ff;
  background: #e6f0ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.nav-module.is-active .nav-icon {
  background: var(--blue);
  color: #fff;
}

body[data-theme="dark"] .nav-module .nav-icon {
  color: #9aa8bc;
}

body[data-theme="dark"] .nav-module.is-active {
  border-color: #2f6fb6;
  background: #10243d;
}

.topbar {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: none;
}

.panel,
.module-command-bar,
.business-inspector,
.site-budget-inspector {
  box-shadow: var(--panel-shadow);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.text-button,
.link-button {
  transform: none !important;
}

.primary-button {
  box-shadow: none;
}

.ghost-button:hover,
.icon-button:hover,
.table-shell .row-actions .link-button:hover,
.table-shell .row-actions .link-button:focus-visible,
.account-row-actions .link-button:hover,
.org-row-actions .link-button:hover,
.employee-row-actions .link-button:hover,
.role-row-actions .link-button:hover,
.partner-row-actions .link-button:hover,
.material-row-actions .link-button:hover,
.warehouse-row-actions .link-button:hover,
.fund-row-actions .link-button:hover,
.subject-row-actions .link-button:hover,
.flow-config-row-actions .link-button:hover {
  border-color: color-mix(in srgb, var(--blue) 32%, var(--line));
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
  color: var(--blue);
}

.module-command-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.module-maintenance-actions {
  border-color: color-mix(in srgb, var(--line) 76%, transparent);
}

.action-step {
  border-color: color-mix(in srgb, var(--blue) 26%, var(--line));
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

.action-step:hover,
.action-step:focus-visible,
.action-step.is-active {
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
}

.home-work-item,
.home-project-item,
.home-risk-item,
.home-finance-grid div {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.home-work-list,
.home-project-list,
.home-risk-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.home-work-item:last-child,
.home-project-item:last-child,
.home-risk-item:last-child {
  border-bottom: 0;
}

.home-work-item:hover,
.home-work-item:focus-visible,
.home-project-item:hover,
.home-project-item:focus-visible,
.home-risk-item:hover,
.home-risk-item:focus-visible {
  background: color-mix(in srgb, var(--blue) 6%, var(--panel));
}

.home-ops-grid,
.home-finance-grid {
  background: var(--panel);
}

.home-module-strip.panel {
  padding: 0;
}

.quick-entry {
  min-height: 58px;
  background: var(--panel);
}

.quick-entry:hover,
.quick-entry:focus-visible {
  background: color-mix(in srgb, var(--blue) 6%, var(--panel));
}

.quick-icon {
  background: transparent;
  color: var(--blue);
}

.business-main,
.site-budget-main {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.business-head,
.site-budget-head {
  margin-bottom: 8px;
}

.head-filter-form {
  max-width: none;
}

.filter-row.business-filter,
.filter-row.site-budget-filter {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.business-metrics,
.site-budget-metrics {
  margin-bottom: 8px;
  background: var(--panel);
}

.business-metrics div,
.site-budget-metrics div {
  background: transparent;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  border-color: var(--line);
  box-shadow: var(--panel-shadow);
}

th {
  background: #f6f8fb;
  color: #334155;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

.table-shell .row-actions {
  gap: 6px;
}

.table-shell .row-actions .link-button,
.account-row-actions .link-button,
.org-row-actions .link-button,
.employee-row-actions .link-button,
.role-row-actions .link-button,
.partner-row-actions .link-button,
.material-row-actions .link-button,
.warehouse-row-actions .link-button,
.fund-row-actions .link-button,
.subject-row-actions .link-button,
.flow-config-row-actions .link-button {
  min-height: 28px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

.table-shell .row-actions .danger-link,
.account-row-actions .danger-link,
.org-row-actions .danger-link,
.employee-row-actions .danger-link,
.role-row-actions .danger-link,
.partner-row-actions .danger-link,
.material-row-actions .danger-link,
.warehouse-row-actions .danger-link,
.fund-row-actions .danger-link,
.subject-row-actions .danger-link {
  color: var(--red);
}

.business-inspector,
.site-budget-inspector {
  border-color: var(--line);
}

.inspector-kv,
.inspector-next {
  background: var(--panel);
}

.inspector-note {
  background: color-mix(in srgb, var(--canvas) 54%, var(--panel));
}

.account-create-panel,
.account-filter-panel,
.org-create-panel,
.org-filter-panel,
.employee-create-panel,
.employee-filter-panel,
.role-create-panel,
.role-filter-panel,
.partner-create-panel,
.partner-filter-panel,
.material-create-panel,
.material-filter-panel,
.warehouse-create-panel,
.warehouse-filter-panel,
.fund-create-panel,
.fund-filter-panel,
.subject-create-panel,
.subject-filter-panel {
  box-shadow: none;
}

.account-table-panel,
.org-table-panel,
.employee-table-panel,
.role-table-panel,
.partner-table-panel,
.material-table-panel,
.warehouse-table-panel,
.fund-table-panel,
.subject-table-panel,
.flow-config-panel,
.system-settings-panel {
  box-shadow: var(--panel-shadow);
}

.management-metrics span {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

body[data-theme="dark"] .module-command-bar,
body[data-theme="dark"] .home-work-list,
body[data-theme="dark"] .home-project-list,
body[data-theme="dark"] .home-risk-list,
body[data-theme="dark"] .business-table.table-shell,
body[data-theme="dark"] .site-budget-table.table-shell,
body[data-theme="dark"] .business-inspector,
body[data-theme="dark"] .site-budget-inspector {
  border-color: var(--line-dark);
}

body[data-theme="dark"] th {
  background: #0f1620;
  color: #c7d2e4;
}

body[data-theme="dark"] .quick-entry,
body[data-theme="dark"] .home-work-list,
body[data-theme="dark"] .home-project-list,
body[data-theme="dark"] .home-risk-list,
body[data-theme="dark"] .home-ops-grid,
body[data-theme="dark"] .home-finance-grid,
body[data-theme="dark"] .inspector-kv,
body[data-theme="dark"] .inspector-next {
  background: var(--panel);
}

@media (min-width: 821px) {
  body.is-home-page .content {
    padding-inline: 16px;
  }

  body.is-business-page .business-workbench,
  body.is-business-page .site-budget-workbench {
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    background: var(--panel);
  }

  .nav {
    padding-inline: 10px;
  }

  .nav-module .nav-icon {
    background: transparent;
  }

  .module-command-bar {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .home-work-item,
  .home-project-item,
  .home-risk-item {
    min-height: 44px;
    padding-block: 7px;
  }

  body.is-company-page .management-head {
    gap: 6px;
    margin-bottom: 6px;
  }

  body.is-company-page .company-management-switcher {
    gap: 3px;
    padding-bottom: 2px;
  }

  body.is-company-page .company-management-switcher button {
    min-height: 28px;
    padding-inline: 8px;
  }

  body.is-company-page .account-create-panel,
  body.is-company-page .account-filter-panel,
  body.is-company-page .org-create-panel,
  body.is-company-page .org-filter-panel,
  body.is-company-page .employee-create-panel,
  body.is-company-page .employee-filter-panel,
  body.is-company-page .role-create-panel,
  body.is-company-page .role-filter-panel,
  body.is-company-page .partner-create-panel,
  body.is-company-page .partner-filter-panel,
  body.is-company-page .material-create-panel,
  body.is-company-page .material-filter-panel,
  body.is-company-page .warehouse-create-panel,
  body.is-company-page .warehouse-filter-panel,
  body.is-company-page .fund-create-panel,
  body.is-company-page .fund-filter-panel,
  body.is-company-page .subject-create-panel,
  body.is-company-page .subject-filter-panel {
    padding: 6px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.is-company-page .account-table-panel,
  body.is-company-page .org-table-panel,
  body.is-company-page .employee-table-panel,
  body.is-company-page .role-table-panel,
  body.is-company-page .partner-table-panel,
  body.is-company-page .material-table-panel,
  body.is-company-page .warehouse-table-panel,
  body.is-company-page .fund-table-panel,
  body.is-company-page .subject-table-panel,
  body.is-company-page .flow-config-panel,
  body.is-company-page .system-settings-panel {
    padding: 8px;
  }

  body.is-company-page .account-create-form,
  body.is-company-page .org-create-form,
  body.is-company-page .employee-create-form,
  body.is-company-page .role-create-form,
  body.is-company-page .partner-create-form,
  body.is-company-page .material-create-form,
  body.is-company-page .warehouse-create-form,
  body.is-company-page .fund-create-form,
  body.is-company-page .subject-create-form,
  body.is-company-page .account-filter-form,
  body.is-company-page .org-filter-form,
  body.is-company-page .employee-filter-form,
  body.is-company-page .role-filter-form,
  body.is-company-page .partner-filter-form,
  body.is-company-page .material-filter-form,
  body.is-company-page .warehouse-filter-form,
  body.is-company-page .fund-filter-form,
  body.is-company-page .subject-filter-form {
    gap: 6px;
  }

  body.is-company-page .account-create-form label,
  body.is-company-page .account-filter-form label,
  body.is-company-page .org-create-form label,
  body.is-company-page .org-filter-form label,
  body.is-company-page .employee-create-form label,
  body.is-company-page .employee-filter-form label,
  body.is-company-page .role-create-form label,
  body.is-company-page .role-filter-form label,
  body.is-company-page .partner-create-form label,
  body.is-company-page .partner-filter-form label,
  body.is-company-page .material-create-form label,
  body.is-company-page .material-filter-form label,
  body.is-company-page .warehouse-create-form label,
  body.is-company-page .warehouse-filter-form label,
  body.is-company-page .fund-create-form label,
  body.is-company-page .fund-filter-form label,
  body.is-company-page .subject-create-form label,
  body.is-company-page .subject-filter-form label {
    gap: 3px;
    font-size: 12px;
  }

  body.is-company-page .account-create-form input,
  body.is-company-page .account-create-form select,
  body.is-company-page .account-filter-form input,
  body.is-company-page .account-filter-form select,
  body.is-company-page .org-create-form input,
  body.is-company-page .org-create-form select,
  body.is-company-page .org-filter-form input,
  body.is-company-page .org-filter-form select,
  body.is-company-page .employee-create-form input,
  body.is-company-page .employee-create-form select,
  body.is-company-page .employee-filter-form input,
  body.is-company-page .employee-filter-form select,
  body.is-company-page .role-create-form input,
  body.is-company-page .role-create-form select,
  body.is-company-page .role-filter-form input,
  body.is-company-page .role-filter-form select,
  body.is-company-page .partner-create-form input,
  body.is-company-page .partner-create-form select,
  body.is-company-page .partner-filter-form input,
  body.is-company-page .partner-filter-form select,
  body.is-company-page .material-create-form input,
  body.is-company-page .material-create-form select,
  body.is-company-page .material-filter-form input,
  body.is-company-page .material-filter-form select,
  body.is-company-page .warehouse-create-form input,
  body.is-company-page .warehouse-create-form select,
  body.is-company-page .warehouse-filter-form input,
  body.is-company-page .warehouse-filter-form select,
  body.is-company-page .fund-create-form input,
  body.is-company-page .fund-create-form select,
  body.is-company-page .fund-filter-form input,
  body.is-company-page .fund-filter-form select,
  body.is-company-page .subject-create-form input,
  body.is-company-page .subject-create-form select,
  body.is-company-page .subject-filter-form input,
  body.is-company-page .subject-filter-form select {
    min-height: 32px;
    padding-block: 5px;
  }
}

/* Final business layout fix: restore spacing and remove horizontal drag bars. */
:root {
  --sticky-command-height: 72px;
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-height) + 16px);
}

body.is-business-page .content {
  padding: calc(var(--topbar-height) + var(--sticky-command-height) + 16px) 24px 20px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - 36px);
  gap: 16px;
}

.module-command-bar {
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  min-height: var(--sticky-command-height);
  padding: 10px 14px;
}

.module-command-track {
  gap: 14px;
}

.module-maintenance-actions {
  gap: 8px;
  padding-right: 14px;
}

.module-import-scope {
  gap: 10px;
}

.business-head,
.site-budget-head,
.business-metrics,
.site-budget-metrics {
  margin-bottom: 12px;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  overflow-x: hidden;
  overflow-y: auto;
}

.business-table table,
.site-budget-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.business-table th,
.business-table td,
.site-budget-table th,
.site-budget-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table th:nth-child(1),
.business-table td:nth-child(1),
.site-budget-table th:nth-child(1),
.site-budget-table td:nth-child(1) {
  width: 42px;
}

.business-table th:nth-child(2),
.business-table td:nth-child(2),
.site-budget-table th:nth-child(2),
.site-budget-table td:nth-child(2) {
  width: 96px;
}

.business-table th:nth-child(3),
.business-table td:nth-child(3),
.site-budget-table th:nth-child(3),
.site-budget-table td:nth-child(3) {
  width: 32%;
}

.business-table th:nth-child(4),
.business-table td:nth-child(4),
.site-budget-table th:nth-child(4),
.site-budget-table td:nth-child(4) {
  width: 22%;
}

.business-table th:nth-child(5),
.business-table td:nth-child(5),
.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5) {
  width: 92px;
}

.business-table th:nth-child(6),
.business-table td:nth-child(6),
.site-budget-table th:nth-child(6),
.site-budget-table td:nth-child(6) {
  width: 76px;
}

.business-table th:nth-child(7),
.business-table td:nth-child(7),
.site-budget-table th:nth-child(7),
.site-budget-table td:nth-child(7) {
  width: 92px;
}

.business-table th:nth-child(8),
.business-table td:nth-child(8),
.site-budget-table th:nth-child(8),
.site-budget-table td:nth-child(8) {
  width: 118px;
}

.site-budget-table td:nth-child(3) strong,
.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) strong,
.business-table td:nth-child(3) em {
  max-width: 100%;
}

@media (max-width: 820px) {
  :root {
    --sticky-command-height: 0px;
  }

  body.is-business-page .content {
    padding: 10px 12px 16px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    gap: 10px;
  }

  .module-command-bar {
    left: auto;
    right: auto;
    min-height: 0;
    padding: 8px 12px;
  }

  .business-table.table-shell,
  .site-budget-table.table-shell {
    overflow-x: hidden;
  }

  .business-table table,
  .site-budget-table table {
    min-width: 0;
  }

  .business-table th,
  .business-table td,
  .site-budget-table th,
  .site-budget-table td {
    padding-inline: 8px;
  }

  .business-table th:nth-child(4),
  .business-table td:nth-child(4),
  .site-budget-table th:nth-child(4),
  .site-budget-table td:nth-child(4),
  .business-table th:nth-child(5),
  .business-table td:nth-child(5),
  .site-budget-table th:nth-child(5),
  .site-budget-table td:nth-child(5) {
    display: none;
  }

  .business-table th:nth-child(3),
  .business-table td:nth-child(3),
  .site-budget-table th:nth-child(3),
  .site-budget-table td:nth-child(3) {
    width: auto;
  }
}

/* Final business layout fix: restore spacing and remove horizontal drag bars. */
:root {
  --sticky-command-height: 72px;
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-height) + 16px);
}

body.is-business-page .content {
  padding: calc(var(--topbar-height) + var(--sticky-command-height) + 16px) 24px 20px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - 36px);
  gap: 16px;
}

.module-command-bar {
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  min-height: var(--sticky-command-height);
  padding: 10px 14px;
}

.module-command-track {
  gap: 14px;
}

.module-maintenance-actions {
  gap: 8px;
  padding-right: 14px;
}

.module-import-scope {
  gap: 10px;
}

.business-head,
.site-budget-head,
.business-metrics,
.site-budget-metrics {
  margin-bottom: 12px;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  overflow-x: hidden;
  overflow-y: auto;
}

.business-table table,
.site-budget-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.business-table th,
.business-table td,
.site-budget-table th,
.site-budget-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table th:nth-child(1),
.business-table td:nth-child(1),
.site-budget-table th:nth-child(1),
.site-budget-table td:nth-child(1) {
  width: 42px;
}

.business-table th:nth-child(2),
.business-table td:nth-child(2),
.site-budget-table th:nth-child(2),
.site-budget-table td:nth-child(2) {
  width: 96px;
}

.business-table th:nth-child(3),
.business-table td:nth-child(3),
.site-budget-table th:nth-child(3),
.site-budget-table td:nth-child(3) {
  width: 32%;
}

.business-table th:nth-child(4),
.business-table td:nth-child(4),
.site-budget-table th:nth-child(4),
.site-budget-table td:nth-child(4) {
  width: 22%;
}

.business-table th:nth-child(5),
.business-table td:nth-child(5),
.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5) {
  width: 92px;
}

.business-table th:nth-child(6),
.business-table td:nth-child(6),
.site-budget-table th:nth-child(6),
.site-budget-table td:nth-child(6) {
  width: 76px;
}

.business-table th:nth-child(7),
.business-table td:nth-child(7),
.site-budget-table th:nth-child(7),
.site-budget-table td:nth-child(7) {
  width: 92px;
}

.business-table th:nth-child(8),
.business-table td:nth-child(8),
.site-budget-table th:nth-child(8),
.site-budget-table td:nth-child(8) {
  width: 118px;
}

.site-budget-table td:nth-child(3) strong,
.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) strong,
.business-table td:nth-child(3) em {
  max-width: 100%;
}

@media (max-width: 820px) {
  :root {
    --sticky-command-height: 0px;
  }

  body.is-business-page .content {
    padding: 10px 12px 16px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    gap: 10px;
  }

  .module-command-bar {
    left: auto;
    right: auto;
    min-height: 0;
    padding: 8px 12px;
  }

  .business-table.table-shell,
  .site-budget-table.table-shell {
    overflow-x: hidden;
  }

  .business-table table,
  .site-budget-table table {
    min-width: 0;
  }

  .business-table th,
  .business-table td,
  .site-budget-table th,
  .site-budget-table td {
    padding-inline: 8px;
  }

  .business-table th:nth-child(4),
  .business-table td:nth-child(4),
  .site-budget-table th:nth-child(4),
  .site-budget-table td:nth-child(4),
  .business-table th:nth-child(5),
  .business-table td:nth-child(5),
  .site-budget-table th:nth-child(5),
  .site-budget-table td:nth-child(5) {
    display: none;
  }

  .business-table th:nth-child(3),
  .business-table td:nth-child(3),
  .site-budget-table th:nth-child(3),
  .site-budget-table td:nth-child(3) {
    width: auto;
  }
}

/* Business page spacing and no horizontal table drag bars. */
:root {
  --sticky-command-height: 72px;
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-height) + 16px);
}

body.is-business-page .content {
  padding: calc(var(--topbar-height) + var(--sticky-command-height) + 16px) 24px 20px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - 36px);
  gap: 16px;
}

.module-command-bar {
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  min-height: var(--sticky-command-height);
  padding: 10px 14px;
}

.module-command-track {
  gap: 14px;
}

.module-maintenance-actions {
  gap: 8px;
  padding-right: 14px;
}

.module-import-scope {
  gap: 10px;
}

.business-head,
.site-budget-head {
  margin-bottom: 12px;
}

.business-metrics,
.site-budget-metrics {
  margin-bottom: 12px;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  overflow-x: hidden;
  overflow-y: auto;
}

.business-table table,
.site-budget-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.business-table th,
.business-table td,
.site-budget-table th,
.site-budget-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table th:nth-child(1),
.business-table td:nth-child(1),
.site-budget-table th:nth-child(1),
.site-budget-table td:nth-child(1) {
  width: 42px;
}

.business-table th:nth-child(2),
.business-table td:nth-child(2),
.site-budget-table th:nth-child(2),
.site-budget-table td:nth-child(2) {
  width: 96px;
}

.business-table th:nth-child(3),
.business-table td:nth-child(3),
.site-budget-table th:nth-child(3),
.site-budget-table td:nth-child(3) {
  width: 32%;
}

.business-table th:nth-child(4),
.business-table td:nth-child(4),
.site-budget-table th:nth-child(4),
.site-budget-table td:nth-child(4) {
  width: 22%;
}

.business-table th:nth-child(5),
.business-table td:nth-child(5),
.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5) {
  width: 92px;
}

.business-table th:nth-child(6),
.business-table td:nth-child(6),
.site-budget-table th:nth-child(6),
.site-budget-table td:nth-child(6) {
  width: 76px;
}

.business-table th:nth-child(7),
.business-table td:nth-child(7),
.site-budget-table th:nth-child(7),
.site-budget-table td:nth-child(7) {
  width: 92px;
}

.business-table th:nth-child(8),
.business-table td:nth-child(8),
.site-budget-table th:nth-child(8),
.site-budget-table td:nth-child(8) {
  width: 118px;
}

.site-budget-table td:nth-child(3) strong,
.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) strong,
.business-table td:nth-child(3) em {
  max-width: 100%;
}

@media (max-width: 820px) {
  :root {
    --sticky-command-height: 0px;
  }

  body.is-business-page .content {
    padding: 10px 12px 16px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    gap: 10px;
  }

  .module-command-bar {
    left: auto;
    right: auto;
    min-height: 0;
    padding: 8px 12px;
  }

  .business-table.table-shell,
  .site-budget-table.table-shell {
    overflow-x: hidden;
  }

  .business-table table,
  .site-budget-table table {
    min-width: 0;
  }

  .business-table th,
  .business-table td,
  .site-budget-table th,
  .site-budget-table td {
    padding-inline: 8px;
  }

  .business-table th:nth-child(4),
  .business-table td:nth-child(4),
  .site-budget-table th:nth-child(4),
  .site-budget-table td:nth-child(4),
  .business-table th:nth-child(5),
  .business-table td:nth-child(5),
  .site-budget-table th:nth-child(5),
  .site-budget-table td:nth-child(5) {
    display: none;
  }

  .business-table th:nth-child(3),
  .business-table td:nth-child(3),
  .site-budget-table th:nth-child(3),
  .site-budget-table td:nth-child(3) {
    width: auto;
  }
}

body[data-theme="dark"] {
  --blue: #4096ff;
  --blue-strong: #69b1ff;
  --green: #30d158;
  --red: #ff453a;
  --amber: #ff9f0a;
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --weak: #94a3b8;
  --line: #293241;
  --line-dark: #3a4659;
  --canvas: #0d1117;
  --panel: #151b24;
  --soft: #101722;
  --sidebar: rgba(17, 24, 34, 0.88);
  --hover: #16263d;
  --shadow: none;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
/* 日夜切换药丸开关(仿 shadcn ThemeSwitch) */
.theme-switch { padding: 0; border: none; background: transparent; cursor: pointer; line-height: 0; }
.theme-switch .ts-track { position: relative; display: inline-flex; align-items: center; width: 64px; height: 30px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, var(--panel)); border: 0; transition: background .2s; }
.theme-switch .ts-ico { position: absolute; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; transition: color .2s; }
.theme-switch .ts-sun { left: 8px; color: #f59e0b; }
.theme-switch .ts-moon { right: 8px; color: #8a97aa; }
body[data-theme="dark"] .theme-switch .ts-sun { color: #6b7787; }
body[data-theme="dark"] .theme-switch .ts-moon { color: #cdd5e0; }
.theme-switch .ts-thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 2; transition: transform .25s cubic-bezier(.3,.7,.3,1); }
body[data-theme="dark"] .theme-switch .ts-thumb { transform: translateX(34px); background: #cdd5e0; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.theme-switch:focus-visible .ts-track { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Luckysheet 依赖 content-box 计算画布与表头/选区的像素位置,全局 border-box 会导致格子错位 */
#luckysheet, #luckysheet *, .luckysheet, .luckysheet * {
  box-sizing: content-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.is-home-page {
  overflow: hidden;
}

body.is-business-page {
  overflow: hidden;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body.is-login {
  background: #f5f5f7;
}

body[data-theme="dark"].is-login {
  background: var(--canvas);
}

.login-shell {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  height: 100vh;
  width: var(--sidebar-width);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  backdrop-filter: blur(22px);
}

.brand {
  height: var(--topbar-height);
  flex: 0 0 var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-sub,
.tenant-label {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 12px 10px 18px;
}

.menu-search {
  padding: 8px;
}

.menu-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fbfcfe;
}

.nav-section {
  margin-bottom: 14px;
}

.nav-section-title {
  padding: 0 8px 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nav-link {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px calc(11px + var(--indent, 0) * 16px);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.nav-link:hover,
.nav-link:focus-visible {
  outline: none;
  background: var(--hover);
}

.nav-link.is-active {
  background: rgba(22, 119, 255, 0.11);
  color: var(--blue);
  font-weight: 800;
}

.nav-icon {
  color: #7d8795;
}

.app-icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-module {
  min-height: 46px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  margin-bottom: 4px;
  padding: 7px 8px;
  border: 1px solid transparent;
}

.nav-module .nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
  font-weight: 900;
  font-size: 17px;
}

.nav-module strong,
.nav-module em {
  display: block;
}
.nav-module strong { font-size: 17px; font-weight: 700; letter-spacing: .2px; }

.nav-module em {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-module.is-active .nav-icon {
  background: var(--blue);
  color: #fff;
}

.nav-module.is-active {
  border-color: color-mix(in srgb, var(--blue) 20%, var(--line));
}

.nav-copy {
  min-width: 0;
}

.workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 20;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.topbar > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-theme="dark"] .topbar {
  background: rgba(19, 22, 29, 0.86);
}

.topbar-meta {
  position: fixed;
  top: 14px;
  right: 26px;
  z-index: 55;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  pointer-events: none;
}
body.is-login .topbar-meta,
body.is-home-page .topbar-meta,
body.is-company-page .topbar-meta,
body.is-cost-page .topbar-meta {
  display: none;
}
.topbar-meta .topbar-date {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar-meta .topbar-date strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.topbar-meta .topbar-date em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.topbar-meta .topbar-weather {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid var(--line);
}
@media (max-width: 820px) {
  .topbar-meta { gap: 8px; }
  .topbar-meta .topbar-weather { display: none; }
}

.breadcrumb {
  display: none;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions,
.welcome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions .ghost-button,
.top-actions .primary-button {
  white-space: nowrap;
}

#newRecordButton {
  min-width: 116px;
}

.top-work-button {
  position: relative;
  padding-right: 22px;
}

.top-tool-button {
  position: relative;
  min-width: 58px;
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.module-command-bar {
  position: fixed;
  top: var(--sticky-command-top);
  left: calc(var(--sidebar-width) + 18px);
  right: 18px;
  z-index: 18;
  min-height: var(--sticky-command-height);
  padding: 8px 10px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: none;
}

.module-command-track {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.module-maintenance-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.module-maintenance-actions > .ghost-button,
.module-maintenance-actions > .primary-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding-inline: 12px;
  white-space: nowrap;
}

.module-import-scope {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
}

body[data-theme="dark"] .module-import-scope {
  border-color: var(--line-dark);
  background: transparent;
}

body[data-theme="dark"] .module-maintenance-actions {
  border-color: var(--line-dark);
}

.global-user-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}

.global-user-status .online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.14);
}

.global-user-status strong {
  font-size: 13px;
  font-weight: 800;
}

.global-user-status em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.global-user-status .link-button {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--blue);
}

.global-user-status .link-button:hover,
.global-user-status .link-button:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}

body[data-theme="dark"] .global-user-status {
  border-color: var(--line-dark);
  background: var(--panel);
}

.content {
  padding: calc(var(--topbar-height) + 12px) 18px 28px;
}

body.is-home-page .content {
  height: 100vh;
  padding: calc(var(--topbar-height) + 10px) 18px 14px;
  overflow: hidden;
}

body.is-business-page .content {
  height: 100vh;
  padding: calc(var(--topbar-height) + var(--sticky-command-height) + 12px) 18px 18px;
  overflow: hidden;
}

/* 特殊整页内容(记账管理、签证汇总等长表单/表格):允许整页滚动,不被固定高度裁切 */
body.is-business-page .content.free-scroll {
  height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 14px;
  margin-bottom: 10px;
}

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

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-toolbar.is-end {
  justify-content: flex-end;
}

.panel-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.text-button,
.link-button {
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line-dark);
  background: #f4f6f8;
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

body[data-theme="dark"] .ghost-button,
body[data-theme="dark"] .danger-button,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .text-button,
body[data-theme="dark"] .link-button,
body[data-theme="dark"] .tabs button,
body[data-theme="dark"] .pager button,
body[data-theme="dark"] .pager input {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

.primary-button {
  padding: 0 16px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.18);
}

.ghost-button,
.danger-button {
  padding: 0 14px;
}

.danger-button {
  border-color: #ffd4d4;
  color: var(--red);
}

.icon-button {
  position: relative;
  width: 36px;
  display: inline-grid;
  place-items: center;
}

.theme-toggle .app-icon,
#globalAssistantButton .app-icon,
#globalReminderButton .app-icon,
#globalMessageButton .app-icon,
#globalCollaborationButton .app-icon,
#globalDataButton .app-icon,
#globalFlowButton .app-icon,
#globalArchiveButton .app-icon,
#globalRecycleButton .app-icon,
#globalAuditButton .app-icon,
#globalTodoButton .app-icon,
#globalMoreButton .app-icon {
  width: 18px;
  height: 18px;
}

.todo-badge,
.reminder-badge,
.message-badge,
.collab-badge,
.recycle-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  padding: 0 3px;
  border: 1px solid var(--panel);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .todo-badge {
  border-color: var(--panel);
}

.reminder-badge {
  background: var(--red);
}

body[data-theme="dark"] .reminder-badge {
  border-color: var(--panel);
}

.message-badge {
  background: var(--amber);
}

body[data-theme="dark"] .message-badge {
  border-color: var(--panel);
}

.collab-badge {
  background: var(--blue);
}

body[data-theme="dark"] .collab-badge {
  border-color: var(--panel);
}

.recycle-badge {
  background: var(--amber);
}

body[data-theme="dark"] .recycle-badge {
  border-color: var(--panel);
}

.tool-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--panel);
  border-radius: 999px;
  background: var(--amber);
}

body[data-theme="dark"] .tool-dot {
  border-color: var(--panel);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.action-card:hover,
.quick-entry:hover {
  transform: translateY(-1px);
}

.ghost-button:hover,
.icon-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
}

body[data-theme="dark"] .ghost-button:hover,
body[data-theme="dark"] .icon-button:hover,
body[data-theme="dark"] .action-card:hover,
body[data-theme="dark"] .quick-entry:hover {
  border-color: #2f6fb6;
  background: var(--hover);
}

.text-button,
.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
}

.link-button {
  font-weight: 800;
}

.danger-link {
  color: var(--red);
}

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

.row-actions .link-button + .link-button {
  position: relative;
  padding-left: 9px;
}

.row-actions .link-button + .link-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  transform: translateY(-50%);
  background: var(--line-dark);
}

.login-screen {
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfbfd 0%, #f0f4fb 100%);
}

body[data-theme="dark"] .login-screen {
  background: linear-gradient(180deg, #0f1116 0%, #151923 100%);
}

.login-top {
  height: 96px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 18%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px);
}

body[data-theme="dark"] .login-top {
  background: rgba(19, 22, 29, 0.84);
}

.login-logo {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.login-top strong,
.login-top span {
  display: block;
}

.login-top span {
  color: var(--muted);
  letter-spacing: 1px;
}

.login-top em {
  justify-self: center;
  color: #d1d1d6;
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 10px;
}

.login-card {
  width: min(760px, calc(100vw - 40px));
  min-height: 474px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 92px auto 0;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

body[data-theme="dark"] .login-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.login-visual {
  position: relative;
  overflow: hidden;
  padding: 72px;
  background: linear-gradient(155deg, #5ac8fa, #1677ff);
  color: #fff;
}

.login-visual::before,
.login-visual::after {
  display: none;
}

.cube-mark {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  font-size: 42px;
  font-weight: 900;
}

.login-visual h1 {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  font-size: 34px;
  color: #fff;
}

.login-visual p {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 54px 70px;
}

.login-notice {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 149, 0, 0.36);
  border-radius: var(--radius);
  background: rgba(255, 149, 0, 0.1);
  color: #7a3f00;
  line-height: 1.45;
}

.login-notice strong {
  color: #7a3f00;
  font-size: 14px;
}

.login-notice span {
  color: #7a3f00;
  font-size: 12px;
}

body[data-theme="dark"] .login-notice {
  border-color: rgba(255, 159, 10, 0.38);
  background: rgba(255, 159, 10, 0.12);
}

body[data-theme="dark"] .login-notice,
body[data-theme="dark"] .login-notice strong,
body[data-theme="dark"] .login-notice span {
  color: #ffd79a;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.login-tabs button {
  height: 38px;
  border: 0;
  background: transparent;
}

.login-tabs button.is-active {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  font-weight: 800;
}

.login-form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.login-form input,
.login-form select,
.filter-row input,
.filter-row select,
.head-filter-form input,
.head-filter-form select,
.proto-form input,
.proto-form select,
.proto-form textarea,
.form-row input,
.form-row select,
.form-row textarea,
.search-panel input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
}

body[data-theme="dark"] .login-form input,
body[data-theme="dark"] .login-form select,
body[data-theme="dark"] .filter-row input,
body[data-theme="dark"] .filter-row select,
body[data-theme="dark"] .head-filter-form input,
body[data-theme="dark"] .head-filter-form select,
body[data-theme="dark"] .proto-form input,
body[data-theme="dark"] .proto-form select,
body[data-theme="dark"] .proto-form textarea,
body[data-theme="dark"] .form-row input,
body[data-theme="dark"] .form-row select,
body[data-theme="dark"] .form-row textarea,
body[data-theme="dark"] .search-panel input,
body[data-theme="dark"] .menu-search input {
  background: #11151d;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #8f96a3;
}

.login-form input:focus,
.login-form select:focus,
.filter-row input:focus,
.filter-row select:focus,
.head-filter-form input:focus,
.head-filter-form select:focus,
.proto-form input:focus,
.proto-form select:focus,
.proto-form textarea:focus,
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.search-panel input:focus {
  outline: 3px solid rgba(22, 119, 255, 0.14);
  border-color: var(--blue);
}

.chrono-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.chrono-trigger {
  width: 100%;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
  font-weight: 750;
}

.chrono-trigger-icon {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
}

.chrono-trigger-icon .app-icon {
  width: 14px;
  height: 14px;
}

.chrono-trigger:hover,
.chrono-trigger:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.14);
  border-color: var(--blue);
}

.chrono-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 80;
  width: 226px;
  height: 244px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.chrono-select.is-open .chrono-popover {
  display: grid;
  grid-template-rows: 26px 18px 180px;
  gap: 4px;
}

.chrono-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 4px;
}

.chrono-current {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 850;
}

.chrono-current select {
  width: 72px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
}

.chrono-nav {
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.chrono-nav:hover,
.chrono-nav:focus-visible {
  border-color: var(--line);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.chrono-weekdays,
.chrono-grid {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  justify-content: center;
  gap: 0;
}

.chrono-weekdays span {
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.chrono-grid {
  grid-template-rows: repeat(6, 30px);
}

.chrono-day {
  width: 24px;
  height: 24px;
  align-self: center;
  justify-self: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.chrono-day:hover,
.chrono-day:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.chrono-day.is-outside {
  color: color-mix(in srgb, var(--muted) 62%, transparent);
}

.chrono-day.is-today {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 28%, transparent);
}

.chrono-day.is-selected,
.chrono-day.is-selected:hover,
.chrono-day.is-selected:focus-visible {
  background: var(--ink);
  color: var(--panel);
}

body[data-theme="dark"] .chrono-trigger {
  background: #11151d;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .chrono-popover {
  border-color: #303030;
  background: #202020;
  color: #f4f4f4;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .chrono-current select {
  border-color: #303030;
  background: #181818;
  color: #f4f4f4;
}

body[data-theme="dark"] .chrono-nav:hover,
body[data-theme="dark"] .chrono-nav:focus-visible,
body[data-theme="dark"] .chrono-day:hover,
body[data-theme="dark"] .chrono-day:focus-visible {
  background: #2a2a2a;
  color: #ffffff;
}

body[data-theme="dark"] .chrono-day.is-selected,
body[data-theme="dark"] .chrono-day.is-selected:hover,
body[data-theme="dark"] .chrono-day.is-selected:focus-visible {
  background: #f0f0f0;
  color: #181818;
}

.custom-select-native {
  display: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  opacity: 0.56;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease, opacity 160ms ease;
}

.custom-select.is-open .custom-select-chevron {
  opacity: 0.84;
  transform: translateY(2px) rotate(225deg);
}

.custom-select-trigger:hover,
.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  border-color: color-mix(in srgb, var(--ink) 32%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 9%, transparent);
  outline: none;
}

.custom-select-content {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 120;
  width: max(100%, 128px);
  max-height: 236px;
  display: none;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
}

.custom-select.is-open .custom-select-content {
  display: grid;
  gap: 2px;
}

.custom-select-item {
  position: relative;
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
  line-height: 1.2;
  text-align: left;
  cursor: default;
}

.custom-select-item:hover,
.custom-select-item:focus-visible,
.custom-select-item.is-active {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  outline: none;
}

.custom-select-item.is-selected {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}

.custom-select-check {
  width: 18px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
}

.custom-select-item.is-selected .custom-select-check {
  opacity: 1;
}

.custom-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-item:disabled {
  opacity: 0.45;
  pointer-events: none;
}

body[data-theme="dark"] .custom-select-trigger {
  border-color: #303030;
  background: #181818;
  color: #f4f4f4;
  box-shadow: none;
}

body[data-theme="dark"] .custom-select-trigger:hover,
body[data-theme="dark"] .custom-select-trigger:focus-visible,
body[data-theme="dark"] .custom-select.is-open .custom-select-trigger {
  border-color: #4a4a4a;
  background: #1f1f1f;
  box-shadow: 0 0 0 3px rgba(244, 244, 244, 0.08);
}

body[data-theme="dark"] .custom-select-content {
  border-color: #303030;
  background: #202020;
  color: #f4f4f4;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .custom-select-item {
  color: #f4f4f4;
}

body[data-theme="dark"] .custom-select-item:hover,
body[data-theme="dark"] .custom-select-item:focus-visible,
body[data-theme="dark"] .custom-select-item.is-active,
body[data-theme="dark"] .custom-select-item.is-selected {
  background: #2a2a2a;
}

@media (prefers-reduced-motion: reduce) {
  .custom-select-trigger,
  .custom-select-chevron {
    transition: none;
  }
}

.login-options {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-options input {
  width: auto;
  min-height: auto;
}

.login-options a,
.login-options .text-button {
  color: var(--blue);
  text-decoration: none;
}

.management-alias {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.management-alias span {
  font-weight: 800;
}

.management-alias em {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

body[data-theme="dark"] .management-alias em {
  border-color: var(--line-dark);
  background: #111821;
  color: var(--ink);
}

.login-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--weak);
  font-size: 12px;
}

.login-or::before,
.login-or::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.login-footer {
  margin-top: 48px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.home-dashboard {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(96px, auto) auto minmax(0, 1fr) 66px;
  gap: 10px;
  overflow: hidden;
}

.home-dashboard .panel {
  margin-bottom: 0;
}

.home-kpi-bar {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  min-height: 96px;
  padding: 0;
  overflow: hidden;
}

.home-user-line,
.home-kpi-cell {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.home-kpi-cell:last-child {
  border-right: 0;
}

body[data-theme="dark"] .home-user-line,
body[data-theme="dark"] .home-kpi-cell {
  border-color: var(--line-dark);
}

.home-user-line strong,
.home-user-line span,
.home-kpi-cell span,
.home-kpi-cell strong,
.home-kpi-cell em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-line strong {
  font-size: 16px;
}

.home-user-line span {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-user-line span,
.home-kpi-cell span,
.home-kpi-cell em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.home-kpi-cell strong {
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.home-dashboard-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.home-col {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.home-col-left {
  grid-template-rows: minmax(0, 1.55fr) minmax(0, 1fr);
}

.home-col-right {
  grid-template-rows: auto minmax(0, 1fr);
}

.home-work-panel,
.home-risk-panel,
.home-finance-panel,
.home-project-panel,
.home-ops-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
}

.home-finance-panel {
  grid-template-rows: auto auto;
}

.home-ops-panel {
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 0.62fr);
}

.home-panel-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-panel-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.home-panel-head strong,
.home-panel-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-panel-head strong {
  font-size: 15px;
}

.home-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-panel-head .ghost-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding-inline: 10px;
}

.home-panel-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-work-list,
.home-project-list,
.home-risk-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: hidden;
}

.home-work-item,
.home-project-item,
.home-risk-item {
  min-width: 0;
  width: 100%;
  display: grid;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  text-align: left;
}

.home-work-item,
.home-project-item {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 8px 10px;
}

.home-risk-item {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 44px;
  column-gap: 8px;
  row-gap: 1px;
  padding: 7px 9px;
}

.home-work-item:hover,
.home-work-item:focus-visible,
.home-project-item:hover,
.home-project-item:focus-visible,
.home-risk-item:hover,
.home-risk-item:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  background: var(--hover);
}

body[data-theme="dark"] .home-work-item,
body[data-theme="dark"] .home-project-item,
body[data-theme="dark"] .home-risk-item {
  border-color: var(--line-dark);
  background: var(--soft);
}

.home-work-item > span,
.home-project-item > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-work-item strong,
.home-work-item em,
.home-project-item strong,
.home-project-item em,
.home-risk-item strong,
.home-risk-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-work-item em,
.home-project-item em,
.home-risk-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.home-risk-item span {
  grid-row: 1 / span 2;
  display: inline-grid;
  min-width: 42px;
  height: 24px;
  place-items: center;
  padding-inline: 6px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--red) 9%, transparent);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.home-ops-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
}

.home-ops-grid div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 66px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-ops-grid div:nth-child(2n) {
  border-right: 0;
}

.home-ops-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

body[data-theme="dark"] .home-ops-grid,
body[data-theme="dark"] .home-ops-grid div {
  border-color: var(--line-dark);
}

.home-ops-grid span,
.home-ops-grid strong,
.home-ops-grid em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-ops-grid span,
.home-ops-grid em {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
}

.home-ops-grid strong {
  font-size: 17px;
  line-height: 1.1;
}

.home-ops-grid .done strong {
  color: var(--green);
}

.home-ops-grid .warning strong {
  color: var(--amber);
}

.home-ops-grid .risk strong {
  color: var(--red);
}

.home-ops-grid .info strong {
  color: var(--blue);
}

.home-ops-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  overflow: hidden;
}

.home-section-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-section-title strong,
.home-section-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-section-title strong {
  font-size: 14px;
}

.home-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-finance-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
}

.home-finance-grid div {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

body[data-theme="dark"] .home-finance-grid div {
  border-color: var(--line-dark);
}

.home-finance-grid span,
.home-finance-grid strong,
.home-finance-grid em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-finance-grid span,
.home-finance-grid em {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
}

.home-finance-grid strong {
  font-size: 16px;
  line-height: 1.1;
}

.home-finance-grid .done strong {
  color: var(--green);
}

.home-finance-grid .warning strong {
  color: var(--amber);
}

.home-finance-grid .risk strong {
  color: var(--red);
}

.home-finance-grid .info strong {
  color: var(--blue);
}

.home-module-strip {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.home-brief {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.home-brief-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.welcome-line {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.home-brief-copy p,
.home-brief-stats span,
.home-brief-stats em {
  color: var(--muted);
}

.home-brief-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.home-brief-stats div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
}

.home-brief-stats span,
.home-brief-stats strong,
.home-brief-stats em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-brief-stats strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.home-brief-stats em {
  font-style: normal;
  font-weight: 700;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  align-items: start;
  gap: 10px;
}

.dashboard-columns.two {
  grid-template-columns: 1fr 1fr;
}

.dashboard-columns .wide {
  grid-column: 1 / -1;
}

.dashboard-columns > .panel,
.dashboard-main-column .panel,
.dashboard-side-column .panel {
  margin-bottom: 0;
}

.dashboard-main-column,
.dashboard-side-column {
  min-width: 0;
  display: grid;
  align-content: start;
  align-items: start;
  gap: 10px;
}

.dashboard-metrics-panel,
.reminder-panel,
.process-panel {
  align-self: start;
}

.home-operating-panel {
  display: grid;
  gap: 10px;
}

.home-operating-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.home-operating-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-operating-copy strong,
.home-operating-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-operating-copy strong {
  color: var(--ink);
  font-size: 16px;
}

.home-operating-copy em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.home-operating-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-operating-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-operating-strip div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.home-operating-strip div:last-child {
  border-right: 0;
}

body[data-theme="dark"] .home-operating-strip div {
  border-color: var(--line-dark);
}

.home-operating-strip span,
.home-operating-strip em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-operating-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-operating-strip .done strong {
  color: var(--green);
}

.home-operating-strip .warning strong {
  color: var(--amber);
}

.home-operating-strip .risk strong {
  color: var(--red);
}

.home-operating-strip .info strong {
  color: var(--blue);
}

.home-operating-projects {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-operating-projects button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.home-operating-projects button:last-child {
  border-bottom: 0;
}

body[data-theme="dark"] .home-operating-projects button {
  border-color: var(--line-dark);
}

.home-operating-projects button:hover,
.home-operating-projects button:focus-visible {
  outline: none;
  border-color: #b7d6ff;
  background: #eaf3ff;
}

body[data-theme="dark"] .home-operating-projects button:hover,
body[data-theme="dark"] .home-operating-projects button:focus-visible {
  background: var(--hover);
}

.home-operating-projects button > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-operating-projects strong,
.home-operating-projects em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-operating-projects em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.quick-panel {
  grid-column: 1 / -1;
  padding: 8px;
  margin-bottom: 10px;
}

.quick-panel .panel-head {
  margin-bottom: 12px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-entry {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.quick-entry:last-child {
  border-right: 0;
}

body[data-theme="dark"] .quick-entry,
body[data-theme="dark"] .stage-card,
body[data-theme="dark"] .process-strip div {
  border-color: var(--line);
}

.quick-number {
  min-width: 30px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.quick-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.08);
  color: var(--blue);
  font-size: 20px;
}

.quick-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quick-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .quick-number {
  background: rgba(64, 150, 255, 0.16);
}

body[data-theme="dark"] .quick-icon {
  background: rgba(64, 150, 255, 0.13);
}

.stage-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stage-card {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.stage-card strong,
.stage-card span {
  display: block;
}

.stage-card span {
  margin-top: 8px;
  color: var(--muted);
}

.coverage-grid,
.data-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.coverage-grid div,
.data-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
}

body[data-theme="dark"] .coverage-grid div,
body[data-theme="dark"] .data-summary div {
  background: linear-gradient(180deg, #171b24, #141820);
}

.coverage-grid strong,
.coverage-grid span,
.data-summary span,
.data-summary strong {
  display: block;
}

.data-summary strong {
  margin-top: 8px;
  color: var(--blue);
  font-size: 26px;
}

.dashboard-side-column .data-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-side-column .data-summary div {
  min-height: 58px;
  padding: 10px;
}

.dashboard-side-column .data-summary strong {
  margin-top: 4px;
  font-size: 20px;
}

.dashboard-side-column .process-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-side-column .process-strip div {
  min-height: 66px;
  padding: 12px;
}

.reminder-list {
  display: grid;
  gap: 8px;
}

.reminder-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .reminder-item {
  background: #151922;
}

.reminder-item span {
  grid-row: span 2;
  min-width: 38px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

body[data-theme="dark"] .reminder-item span {
  background: rgba(64, 150, 255, 0.16);
}

.reminder-item strong,
.reminder-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-item strong {
  font-size: 14px;
}

.reminder-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.project-progress-panel,
.site-overview-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.project-progress-panel .panel-toolbar,
.site-overview-panel .panel-toolbar {
  margin-bottom: 8px;
}

.project-overview-strip,
.site-overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

body[data-theme="dark"] .project-overview-strip,
body[data-theme="dark"] .site-overview-strip {
  border-color: var(--line-dark);
}

.project-overview-strip div,
.site-overview-strip div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.project-overview-strip div:last-child,
.site-overview-strip div:last-child {
  border-right: 0;
}

body[data-theme="dark"] .project-overview-strip div,
body[data-theme="dark"] .site-overview-strip div {
  border-color: var(--line-dark);
}

.project-overview-strip span,
.project-overview-strip em,
.site-overview-strip span,
.site-overview-strip em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-overview-strip span,
.site-overview-strip span {
  font-weight: 800;
}

.project-overview-strip strong,
.site-overview-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-progress-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.site-focus-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project-progress-item,
.site-focus-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.project-progress-item.risk {
  color: var(--ink);
}

.project-progress-item.warning {
  color: var(--ink);
}

body[data-theme="dark"] .project-progress-item {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .site-focus-item {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .project-progress-item.risk {
  color: var(--ink);
}

body[data-theme="dark"] .project-progress-item.warning {
  color: var(--ink);
}

.project-progress-main,
.site-focus-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.project-progress-main span,
.project-progress-main strong,
.project-progress-main em,
.site-focus-copy span,
.site-focus-copy strong,
.site-focus-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-progress-main span,
.project-progress-main em,
.site-focus-copy span,
.site-focus-copy em {
  color: var(--muted);
  font-style: normal;
}

.project-progress-main strong,
.site-focus-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.project-progress-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.project-progress-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

body[data-theme="dark"] .project-progress-meter {
  background: #222a36;
}

.project-progress-side,
.site-focus-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.project-progress-side > strong {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.finance-overview {
  margin-bottom: 0;
}

.finance-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.finance-overview-grid div {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 8px 0;
  border-right: 1px solid var(--line);
}

.finance-overview-grid div:last-child {
  border-right: 0;
}

body[data-theme="dark"] .finance-overview-grid div {
  border-color: var(--line-dark);
}

.finance-overview-grid span {
  color: var(--muted);
  font-weight: 800;
}

.finance-overview-grid strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.finance-overview-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.finance-workbench-panel {
  padding: 12px;
  margin-bottom: 10px;
}

.finance-workbench-panel .finance-overview {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

body[data-theme="dark"] .finance-workbench-panel .finance-overview {
  border-color: var(--line-dark);
}

.finance-workbench-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
}

.finance-workbench-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

body[data-theme="dark"] .finance-workbench-nav {
  border-color: var(--line-dark);
}

.finance-workbench-nav button {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.finance-workbench-nav button:hover,
.finance-workbench-nav button:focus-visible {
  outline: none;
  background: var(--hover);
}

.finance-workbench-nav span {
  color: var(--blue);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.finance-workbench-nav strong,
.finance-workbench-nav em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-workbench-nav strong {
  font-size: 13px;
}

.finance-workbench-nav em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.finance-focus-table {
  min-width: 0;
}

.finance-focus-table .table-shell {
  border-radius: 6px;
}

.finance-focus-table .pager {
  display: none;
}

.finance-cell {
  display: grid;
  gap: 3px;
}

.finance-cell strong,
.finance-cell em {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
}

.finance-cell strong {
  color: var(--ink);
  font-size: 13px;
}

.finance-cell em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.finance-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.finance-date em {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff1f0;
  color: var(--red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

body[data-theme="dark"] .finance-date em {
  background: rgba(255, 69, 58, 0.15);
  color: #ff8a85;
}

.finance-insight-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.finance-insight-stack > .panel {
  margin-bottom: 0;
}

.contract-warning-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.contract-ledger-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.contract-lifecycle-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.signing-platform-panel,
.payment-schedule-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.legal-risk-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.material-ledger-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.price-list-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.visa-summary-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.debt-summary-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.invoice-ledger-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.bookkeeping-panel {
  margin-bottom: 10px;
  padding: 10px;
}

.invoice-ledger-panel .panel-toolbar,
.bookkeeping-panel .panel-toolbar,
.contract-ledger-panel .panel-toolbar,
.contract-lifecycle-panel .panel-toolbar,
.signing-platform-panel .panel-toolbar,
.payment-schedule-panel .panel-toolbar,
.material-ledger-panel .panel-toolbar,
.price-list-panel .panel-toolbar,
.visa-summary-panel .panel-toolbar,
.debt-summary-panel .panel-toolbar,
.legal-risk-panel .panel-toolbar,
.contract-warning-panel .panel-toolbar {
  margin-bottom: 8px;
}

.invoice-ledger-list,
.bookkeeping-list,
.contract-ledger-list,
.contract-lifecycle-list,
.signing-platform-list,
.payment-schedule-list,
.material-ledger-list,
.price-list-list,
.visa-summary-list,
.debt-summary-list,
.legal-risk-list,
.contract-warning-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

body[data-theme="dark"] .invoice-ledger-list,
body[data-theme="dark"] .bookkeeping-list,
body[data-theme="dark"] .contract-ledger-list,
body[data-theme="dark"] .contract-lifecycle-list,
body[data-theme="dark"] .signing-platform-list,
body[data-theme="dark"] .payment-schedule-list,
body[data-theme="dark"] .material-ledger-list,
body[data-theme="dark"] .price-list-list,
body[data-theme="dark"] .visa-summary-list,
body[data-theme="dark"] .debt-summary-list,
body[data-theme="dark"] .legal-risk-list,
body[data-theme="dark"] .contract-warning-list {
  border-color: var(--line-dark);
}

.invoice-ledger-item,
.bookkeeping-item,
.contract-ledger-item,
.contract-lifecycle-item,
.signing-platform-item,
.payment-schedule-item,
.material-ledger-item,
.price-list-item,
.visa-summary-item,
.debt-summary-item,
.legal-risk-item,
.contract-warning-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.invoice-ledger-item.risk,
.bookkeeping-item.risk,
.contract-ledger-item.risk,
.contract-lifecycle-item.risk,
.signing-platform-item.risk,
.payment-schedule-item.risk,
.material-ledger-item.risk,
.price-list-item.risk,
.visa-summary-item.risk,
.debt-summary-item.risk,
.legal-risk-item.risk,
.contract-warning-item.risk {
  color: var(--ink);
}

.invoice-ledger-item.warning,
.bookkeeping-item.warning,
.contract-ledger-item.warning,
.contract-lifecycle-item.warning,
.signing-platform-item.warning,
.payment-schedule-item.warning,
.material-ledger-item.warning,
.price-list-item.warning,
.visa-summary-item.warning,
.debt-summary-item.warning,
.legal-risk-item.warning,
.contract-warning-item.warning {
  color: var(--ink);
}

body[data-theme="dark"] .invoice-ledger-item,
body[data-theme="dark"] .bookkeeping-item,
body[data-theme="dark"] .contract-ledger-item,
body[data-theme="dark"] .contract-lifecycle-item,
body[data-theme="dark"] .signing-platform-item,
body[data-theme="dark"] .payment-schedule-item,
body[data-theme="dark"] .material-ledger-item,
body[data-theme="dark"] .price-list-item,
body[data-theme="dark"] .visa-summary-item,
body[data-theme="dark"] .debt-summary-item,
body[data-theme="dark"] .legal-risk-item,
body[data-theme="dark"] .contract-warning-item {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .invoice-ledger-item.risk,
body[data-theme="dark"] .bookkeeping-item.risk,
body[data-theme="dark"] .contract-ledger-item.risk,
body[data-theme="dark"] .contract-lifecycle-item.risk,
body[data-theme="dark"] .signing-platform-item.risk,
body[data-theme="dark"] .payment-schedule-item.risk,
body[data-theme="dark"] .material-ledger-item.risk,
body[data-theme="dark"] .price-list-item.risk,
body[data-theme="dark"] .visa-summary-item.risk,
body[data-theme="dark"] .debt-summary-item.risk,
body[data-theme="dark"] .legal-risk-item.risk,
body[data-theme="dark"] .contract-warning-item.risk {
  color: var(--ink);
}

body[data-theme="dark"] .invoice-ledger-item.warning,
body[data-theme="dark"] .bookkeeping-item.warning,
body[data-theme="dark"] .contract-ledger-item.warning,
body[data-theme="dark"] .contract-lifecycle-item.warning,
body[data-theme="dark"] .signing-platform-item.warning,
body[data-theme="dark"] .payment-schedule-item.warning,
body[data-theme="dark"] .material-ledger-item.warning,
body[data-theme="dark"] .price-list-item.warning,
body[data-theme="dark"] .visa-summary-item.warning,
body[data-theme="dark"] .debt-summary-item.warning,
body[data-theme="dark"] .legal-risk-item.warning,
body[data-theme="dark"] .contract-warning-item.warning {
  color: var(--ink);
}

.invoice-ledger-copy,
.bookkeeping-copy,
.contract-ledger-copy,
.contract-lifecycle-copy,
.signing-platform-copy,
.payment-schedule-copy,
.material-ledger-copy,
.price-list-copy,
.visa-summary-copy,
.debt-summary-copy,
.legal-risk-copy,
.contract-warning-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.invoice-ledger-copy span,
.invoice-ledger-copy strong,
.invoice-ledger-copy em,
.bookkeeping-copy span,
.bookkeeping-copy strong,
.bookkeeping-copy em,
.contract-ledger-copy span,
.contract-ledger-copy strong,
.contract-ledger-copy em,
.contract-lifecycle-copy span,
.contract-lifecycle-copy strong,
.contract-lifecycle-copy em,
.signing-platform-copy span,
.signing-platform-copy strong,
.signing-platform-copy em,
.payment-schedule-copy span,
.payment-schedule-copy strong,
.payment-schedule-copy em,
.material-ledger-copy span,
.material-ledger-copy strong,
.material-ledger-copy em,
.price-list-copy span,
.price-list-copy strong,
.price-list-copy em,
.visa-summary-copy span,
.visa-summary-copy strong,
.visa-summary-copy em,
.debt-summary-copy span,
.debt-summary-copy strong,
.debt-summary-copy em,
.legal-risk-copy span,
.legal-risk-copy strong,
.legal-risk-copy em,
.contract-warning-copy span,
.contract-warning-copy strong,
.contract-warning-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-ledger-copy span,
.invoice-ledger-copy em,
.bookkeeping-copy span,
.bookkeeping-copy em,
.contract-ledger-copy span,
.contract-ledger-copy em,
.contract-lifecycle-copy span,
.contract-lifecycle-copy em,
.signing-platform-copy span,
.signing-platform-copy em,
.payment-schedule-copy span,
.payment-schedule-copy em,
.material-ledger-copy span,
.material-ledger-copy em,
.price-list-copy span,
.price-list-copy em,
.visa-summary-copy span,
.visa-summary-copy em,
.debt-summary-copy span,
.debt-summary-copy em,
.legal-risk-copy span,
.legal-risk-copy em,
.contract-warning-copy span,
.contract-warning-copy em {
  color: var(--muted);
  font-style: normal;
}

.invoice-ledger-copy strong,
.bookkeeping-copy strong,
.contract-ledger-copy strong,
.contract-lifecycle-copy strong,
.signing-platform-copy strong,
.payment-schedule-copy strong,
.material-ledger-copy strong,
.price-list-copy strong,
.visa-summary-copy strong,
.debt-summary-copy strong,
.legal-risk-copy strong,
.contract-warning-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.invoice-ledger-side,
.bookkeeping-side,
.contract-ledger-side,
.contract-lifecycle-side,
.signing-platform-side,
.payment-schedule-side,
.material-ledger-side,
.price-list-side,
.visa-summary-side,
.debt-summary-side,
.legal-risk-side,
.contract-warning-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.module-actions {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px;
}

.module-actions::-webkit-scrollbar {
  display: none;
}

.action-step {
  min-width: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

body[data-theme="dark"] .action-step {
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
  border-color: color-mix(in srgb, var(--blue) 32%, var(--line-dark));
}

.action-step:hover,
.action-step:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--blue) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
  color: var(--blue);
  transform: translateY(-1px);
}

.action-step:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

.action-step-index {
  display: inline-flex;
  align-items: center;
}

.action-step-index b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  color: var(--blue);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.action-step strong {
  min-width: 0;
  max-width: 82px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-step span:not(.action-step-index) {
  display: none;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.process-strip div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.process-strip span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eafaf2;
  color: #0d8a52;
  font-weight: 900;
}

body[data-theme="dark"] .process-strip span {
  background: rgba(48, 209, 88, 0.14);
  color: #7ee09a;
}

.process-strip strong {
  font-size: 14px;
}

.process-strip.compact {
  grid-template-columns: repeat(5, minmax(96px, 1fr));
}

.compact-filter {
  align-items: end;
}

.site-budget-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
  align-items: start;
}

.business-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
  align-items: start;
  margin-top: 76px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - 30px);
  min-height: 0;
  margin-top: 0;
}

.site-budget-main,
.site-budget-inspector,
.business-main,
.business-inspector {
  margin-bottom: 10px;
}

body.is-business-page .site-budget-main,
body.is-business-page .business-main {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.site-budget-head,
.business-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.business-head-actions {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.business-head-actions > .ghost-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.head-filter-form {
  min-width: 0;
  flex: 1 1 420px;
  max-width: 620px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(104px, 128px) auto;
  align-items: center;
  gap: 6px;
}

.head-filter-form label {
  min-width: 0;
}

.head-filter-form input,
.head-filter-form select {
  width: 100%;
  height: 34px;
}

.head-filter-form .primary-button {
  min-height: 34px;
  padding-inline: 14px;
  white-space: nowrap;
}

.site-budget-head h2,
.business-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.site-budget-metrics,
.business-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.site-budget-metrics div,
.business-metrics div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--blue) 2%, var(--panel));
}

.site-budget-metrics div:last-child,
.business-metrics div:last-child {
  border-right: 0;
}

body[data-theme="dark"] .site-budget-metrics,
body[data-theme="dark"] .site-budget-metrics div,
body[data-theme="dark"] .business-metrics,
body[data-theme="dark"] .business-metrics div {
  border-color: var(--line-dark);
}

.site-budget-metrics span,
.site-budget-metrics em,
.business-metrics span,
.business-metrics em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-budget-metrics strong,
.business-metrics strong {
  display: block;
  margin: 4px 0 3px;
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.filter-row.site-budget-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 200px) auto auto;
}

.filter-row.business-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 200px) auto auto;
}

.site-budget-table table,
.business-table table {
  min-width: 760px;
  table-layout: fixed;
}

.site-budget-table th,
.site-budget-table td,
.business-table th,
.business-table td {
  padding-inline: 10px;
}

body.is-business-page .site-budget-table,
body.is-business-page .business-table {
  min-height: 0;
  overflow: auto;
}

.site-budget-table th:nth-child(1),
.site-budget-table td:nth-child(1),
.business-table th:nth-child(1),
.business-table td:nth-child(1) {
  width: 38px;
}

.site-budget-table th:nth-child(2),
.site-budget-table td:nth-child(2),
.business-table th:nth-child(2),
.business-table td:nth-child(2) {
  width: 82px;
}

.site-budget-table th:nth-child(3),
.site-budget-table td:nth-child(3),
.business-table th:nth-child(3),
.business-table td:nth-child(3) {
  width: auto;
}

.site-budget-table th:nth-child(4),
.site-budget-table td:nth-child(4),
.business-table th:nth-child(4),
.business-table td:nth-child(4) {
  width: 112px;
}

.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5),
.site-budget-table th:nth-child(6),
.site-budget-table td:nth-child(6),
.business-table th:nth-child(5),
.business-table td:nth-child(5),
.business-table th:nth-child(6),
.business-table td:nth-child(6) {
  width: 66px;
}

.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5),
.business-table th:nth-child(5),
.business-table td:nth-child(5) {
  width: 86px;
}

.site-budget-table th:nth-child(7),
.site-budget-table td:nth-child(7),
.business-table th:nth-child(7),
.business-table td:nth-child(7) {
  width: 72px;
}

.site-budget-table th:nth-child(8),
.site-budget-table td:nth-child(8),
.business-table th:nth-child(8),
.business-table td:nth-child(8) {
  width: 96px;
}

.site-budget-table tr.is-selected td,
.business-table tr.is-selected td {
  background: color-mix(in srgb, var(--blue) 7%, transparent);
}

.site-budget-table tbody tr,
.business-table tbody tr {
  cursor: pointer;
}

.site-budget-table td:nth-child(3) strong,
.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) strong,
.business-table td:nth-child(3) em {
  display: block;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.table-record-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.table-record-link:hover,
.table-record-link:focus-visible {
  outline: none;
  text-decoration: underline;
}

.site-budget-pager {
  border-top: 0;
}

.business-pager {
  border-top: 0;
}

.site-budget-inspector,
.business-inspector {
  position: fixed;
  top: var(--sticky-inspector-top);
  right: 18px;
  bottom: 18px;
  width: 320px;
  max-height: none;
  display: grid;
  gap: 10px;
  padding: 12px;
  align-content: start;
  overflow: auto;
  scrollbar-width: none;
}

.site-budget-inspector::-webkit-scrollbar,
.business-inspector::-webkit-scrollbar {
  display: none;
}

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

body[data-theme="dark"] .inspector-head {
  border-color: var(--line-dark);
}

.site-budget-inspector h3,
.business-inspector h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.32;
}

.site-budget-inspector p,
.business-inspector p {
  margin: -4px 0 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.inspector-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.inspector-kv div {
  min-width: 0;
  padding: 8px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.inspector-kv div:nth-child(2n) {
  border-right: 0;
}

.inspector-kv div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

body[data-theme="dark"] .inspector-kv,
body[data-theme="dark"] .inspector-kv div {
  border-color: var(--line-dark);
}

.inspector-kv span,
.inspector-note span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inspector-kv strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-note {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

body[data-theme="dark"] .inspector-note {
  border-color: var(--line-dark);
}

.inspector-note strong {
  line-height: 1.5;
}

.inspector-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

body[data-theme="dark"] .inspector-next {
  border-color: var(--line-dark);
}

.inspector-next div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 9px;
  border-right: 1px solid var(--line);
}

body[data-theme="dark"] .inspector-next div {
  border-color: var(--line-dark);
}

.inspector-next span,
.inspector-next strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-next span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inspector-next strong {
  color: var(--ink);
  font-size: 13px;
}

.inspector-next em {
  min-width: 40px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.inspector-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

body[data-theme="dark"] .inspector-actions {
  border-color: var(--line-dark);
}

.inspector-actions .primary-button {
  grid-column: 1 / -1;
  min-height: 32px;
}

.inspector-actions .secondary-button,
.inspector-actions .danger-button {
  min-height: 30px;
  padding-inline: 8px;
}

.coverage-grid span {
  margin-top: 6px;
  color: var(--muted);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 220px) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .filter-row {
  background: rgba(21, 25, 34, 0.76);
}

.filter-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

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

.tabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.tabs button.is-active {
  border-color: var(--blue);
  background: #eaf3ff;
  color: var(--blue);
  font-weight: 800;
}

body[data-theme="dark"] .tabs button.is-active {
  background: rgba(10, 132, 255, 0.16);
}

.table-shell {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

body[data-theme="dark"] .table-shell,
body[data-theme="dark"] table {
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f9f9fb;
  color: #4a4a4f;
  font-weight: 800;
}

body[data-theme="dark"] th {
  background: #11151d;
  color: var(--muted);
}

tbody tr:hover {
  background: #f5faff;
}

body[data-theme="dark"] tbody tr:hover {
  background: var(--hover);
}

.table-shell .row-actions .link-button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.table-shell .row-actions .link-button:hover,
.table-shell .row-actions .link-button:focus-visible {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.table-shell .row-actions .link-button + .link-button {
  padding-left: 11px;
}

.table-shell .row-actions .link-button + .link-button::before {
  display: none;
}

.table-shell .row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

body[data-theme="dark"] .table-shell .row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .table-shell .row-actions .link-button:hover,
body[data-theme="dark"] .table-shell .row-actions .link-button:focus-visible {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

.table-empty {
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.table-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
}

.pager-summary {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.pagination-control {
  min-width: 0;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pager button,
.pager input {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pager button {
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.pager button:disabled {
  cursor: not-allowed;
  color: var(--weak);
  background: #f5f7fa;
}

body[data-theme="dark"] .pager button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .pager button:disabled {
  color: var(--weak);
  background: #11151d;
}

.pager input {
  width: 42px;
  text-align: center;
}

.pagination-page {
  width: 30px;
  padding: 0;
}

.pagination-edge {
  min-width: 66px;
}

.pagination-ellipsis {
  min-width: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.pager button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.status-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3fb;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
}

body[data-theme="dark"] .status-tag {
  background: rgba(154, 166, 184, 0.16);
  color: #cbd5e1;
}

.status-tag.done {
  background: rgba(52, 199, 89, 0.14);
  color: #178344;
}

.status-tag.warning {
  background: rgba(255, 149, 0, 0.14);
  color: #a15c00;
}

.status-tag.risk {
  background: rgba(255, 59, 48, 0.12);
  color: #c42b1c;
}

.dashboard-columns > * {
  min-width: 0;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 28px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* 图片/附件等字段独占整行 */
.detail-list div:has(img),
.detail-list div:has(a) {
  grid-column: 1 / -1;
}

.detail-list img {
  max-height: min(200px, 30vh) !important;
  width: auto !important;
}

.detail-list span {
  color: var(--muted);
}

@media (max-width: 640px) {
  .detail-list {
    grid-template-columns: 1fr;
  }
}

.related-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.related-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.related-summary span,
.related-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.related-summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.related-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.related-item:last-child {
  border-bottom: 0;
}

.related-item.is-risk {
  background: transparent;
}

body[data-theme="dark"] .related-item {
  border-color: var(--line-dark);
  background: transparent;
}

body[data-theme="dark"] .related-list {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .related-item.is-risk {
  background: transparent;
}

.related-main,
.related-side {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.related-main span,
.related-main strong,
.related-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-main span,
.related-main em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.related-side {
  justify-items: end;
}

.collab-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.collab-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.collab-summary span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.collab-summary.is-due span {
  background: rgba(255, 149, 0, 0.14);
  color: #a15c00;
}

.collab-summary strong,
.collab-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collab-summary em,
.collab-note {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.collab-note {
  margin: 0;
  line-height: 1.5;
}

.collab-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.6fr) minmax(130px, 0.55fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

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

.collab-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

body[data-theme="dark"] .collab-form input {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink-dark);
}

.history-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.history-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(86px, 0.45fr) minmax(72px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .history-item {
  background: #151922;
  border-color: var(--line-dark);
}

.history-item span,
.history-item em,
.history-item p {
  color: var(--muted);
  font-style: normal;
}

.history-item strong {
  color: var(--ink);
}

.history-item p {
  margin: 0;
  line-height: 1.45;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.search-panel input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.search-result {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .search-result {
  background: #151922;
  border-color: var(--line-dark);
}

.search-result:hover,
.search-result:focus-visible {
  outline: none;
  border-color: var(--blue);
  background: #eaf3ff;
}

body[data-theme="dark"] .search-result:hover,
body[data-theme="dark"] .search-result:focus-visible {
  background: var(--hover);
}

.search-result span,
.empty-state {
  color: var(--muted);
}

.system-recovery,
.permission-panel {
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px;
}

.system-recovery-copy,
.permission-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.system-recovery-copy strong,
.permission-copy strong {
  font-size: 20px;
  line-height: 1.35;
}

.system-recovery-copy em,
.permission-copy em {
  max-width: 680px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.system-recovery-actions,
.permission-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.assistant-drawer {
  display: grid;
  gap: 14px;
}

.assistant-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .assistant-hero {
  background: #151922;
  border-color: var(--line-dark);
}

.assistant-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--blue);
}

.assistant-avatar .app-icon {
  width: 22px;
  height: 22px;
}

.assistant-hero div,
.assistant-message,
.assistant-input {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.assistant-hero strong {
  font-size: 16px;
}

.assistant-hero em,
.assistant-message span,
.assistant-input {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.assistant-hero em {
  font-weight: 700;
  line-height: 1.5;
}

.assistant-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assistant-chip-grid button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

body[data-theme="dark"] .assistant-chip-grid button {
  background: #151922;
  border-color: var(--line-dark);
}

.assistant-thread {
  display: grid;
  gap: 10px;
}

.assistant-message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.assistant-message.bot {
  background: #f6faff;
  border-color: #cfe3ff;
}

body[data-theme="dark"] .assistant-message {
  background: #151922;
  border-color: var(--line-dark);
}

body[data-theme="dark"] .assistant-message.bot {
  background: #111927;
  border-color: #23466f;
}

.assistant-message p {
  line-height: 1.55;
}

.assistant-message ul {
  display: grid;
  gap: 6px;
  margin: 3px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.assistant-message .ghost-button {
  justify-self: start;
  margin-top: 4px;
}

.assistant-input input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .assistant-input input {
  background: #11151d;
  border-color: var(--line-dark);
}

.todo-drawer {
  display: grid;
  gap: 14px;
}

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

.todo-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .todo-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.todo-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.todo-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.todo-scope-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faff;
  justify-self: start;
}

body[data-theme="dark"] .todo-scope-tabs {
  background: #11151d;
  border-color: var(--line-dark);
}

.todo-scope-tabs button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.todo-scope-tabs button.is-active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

body[data-theme="dark"] .todo-scope-tabs button.is-active {
  background: #151922;
  box-shadow: none;
}

.todo-scope-tabs strong {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
  font-size: 12px;
}

.todo-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-module-strip button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

body[data-theme="dark"] .todo-module-strip button {
  background: #151922;
  border-color: var(--line-dark);
}

.todo-module-strip strong {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--blue);
  font-size: 12px;
}

.todo-people-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .todo-people-panel {
  background: #151922;
  border-color: var(--line-dark);
}

.reminder-drawer {
  display: grid;
  gap: 14px;
}

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

.smart-reminder-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .smart-reminder-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.smart-reminder-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.smart-reminder-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.smart-reminder-type-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-reminder-type-strip span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

body[data-theme="dark"] .smart-reminder-type-strip span {
  background: #151922;
  border-color: var(--line-dark);
}

.smart-reminder-type-strip strong {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--blue);
  font-size: 12px;
}

.smart-reminder-list,
.message-list,
.collaboration-list,
.todo-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

body[data-theme="dark"] .smart-reminder-list,
body[data-theme="dark"] .message-list,
body[data-theme="dark"] .collaboration-list,
body[data-theme="dark"] .todo-list {
  border-color: var(--line-dark);
}

.smart-reminder-item,
.message-item,
.collaboration-item,
.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.todo-item {
  gap: 12px;
  padding: 11px 12px;
}

.smart-reminder-item:last-child,
.message-item:last-child,
.collaboration-item:last-child,
.todo-item:last-child {
  border-bottom: 0;
}

.smart-reminder-item.risk {
  border-color: var(--line);
  background: color-mix(in srgb, var(--red) 4%, transparent);
}

.smart-reminder-item.warning {
  border-color: var(--line);
  background: color-mix(in srgb, var(--amber) 5%, transparent);
}

body[data-theme="dark"] .smart-reminder-item,
body[data-theme="dark"] .message-item,
body[data-theme="dark"] .collaboration-item,
body[data-theme="dark"] .todo-item {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .smart-reminder-item.risk {
  border-color: var(--line-dark);
  background: rgba(255, 69, 58, 0.08);
}

body[data-theme="dark"] .smart-reminder-item.warning {
  border-color: var(--line-dark);
  background: rgba(255, 159, 10, 0.08);
}

.smart-reminder-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.smart-reminder-item-main span,
.smart-reminder-item-main strong,
.smart-reminder-item-main em,
.smart-reminder-item-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-reminder-item-main span,
.smart-reminder-item-main em,
.smart-reminder-item-main p {
  color: var(--muted);
  font-style: normal;
}

.smart-reminder-item-main strong {
  color: var(--ink);
  font-size: 14px;
}

.smart-reminder-item-main p {
  margin: 0;
}

.smart-reminder-item-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.message-drawer {
  display: grid;
  gap: 14px;
}

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

.message-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .message-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.message-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.message-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.message-item.warning {
  border-color: var(--line);
  background: color-mix(in srgb, var(--amber) 5%, transparent);
}

.message-item.done {
  border-color: var(--line);
  background: color-mix(in srgb, var(--green) 5%, transparent);
}

body[data-theme="dark"] .message-item.warning {
  border-color: var(--line-dark);
  background: rgba(255, 159, 10, 0.08);
}

body[data-theme="dark"] .message-item.done {
  border-color: var(--line-dark);
  background: rgba(48, 209, 88, 0.08);
}

.message-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.message-item-main span,
.message-item-main strong,
.message-item-main em,
.message-item-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item-main span,
.message-item-main em,
.message-item-main p {
  color: var(--muted);
  font-style: normal;
}

.message-item-main strong {
  color: var(--ink);
  font-size: 14px;
}

.message-item-main p {
  margin: 0;
}

.message-item-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.collaboration-drawer {
  display: grid;
  gap: 14px;
}

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

.collaboration-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .collaboration-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.collaboration-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.collaboration-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.collaboration-people-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
}

.collaboration-people-strip button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .collaboration-people-strip button {
  background: #11151d;
  border-color: var(--line-dark);
}

.collaboration-people-strip span,
.collaboration-people-strip em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaboration-people-strip strong {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.collaboration-people-strip em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.collaboration-item.risk {
  border-color: var(--line);
  background: color-mix(in srgb, var(--red) 4%, transparent);
}

.collaboration-item.warning {
  border-color: var(--line);
  background: color-mix(in srgb, var(--amber) 5%, transparent);
}

body[data-theme="dark"] .collaboration-item.risk {
  border-color: var(--line-dark);
  background: rgba(255, 69, 58, 0.08);
}

body[data-theme="dark"] .collaboration-item.warning {
  border-color: var(--line-dark);
  background: rgba(255, 159, 10, 0.08);
}

.collaboration-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.collaboration-item-main span,
.collaboration-item-main strong,
.collaboration-item-main em,
.collaboration-item-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaboration-item-main span,
.collaboration-item-main em,
.collaboration-item-main p {
  color: var(--muted);
  font-style: normal;
}

.collaboration-item-main strong {
  color: var(--ink);
  font-size: 14px;
}

.collaboration-item-main p {
  margin: 0;
}

.collaboration-item-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.todo-inline-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.todo-inline-tools em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-people-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
}

.todo-people-list button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .todo-people-list button {
  background: #11151d;
  border-color: var(--line-dark);
}

.todo-people-list button:hover,
.todo-people-list button:focus-visible,
.todo-people-list button.is-active {
  outline: none;
  border-color: #b7d6ff;
  background: #eaf3ff;
}

body[data-theme="dark"] .todo-people-list button:hover,
body[data-theme="dark"] .todo-people-list button:focus-visible,
body[data-theme="dark"] .todo-people-list button.is-active {
  background: var(--hover);
}

.todo-people-list button > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.todo-people-list strong,
.todo-people-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-people-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.todo-people-list b {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.todo-people-list i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.todo-owner-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 119, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(22, 119, 255, 0.07);
  color: var(--blue);
  font-weight: 800;
}

body[data-theme="dark"] .todo-owner-filter {
  border-color: rgba(64, 150, 255, 0.34);
  background: rgba(64, 150, 255, 0.12);
}

.todo-item.is-risk {
  border-color: var(--line);
  background: color-mix(in srgb, var(--red) 4%, transparent);
}

body[data-theme="dark"] .todo-item.is-risk {
  border-color: var(--line-dark);
  background: rgba(255, 69, 58, 0.08);
}

.todo-item-main,
.todo-item-side {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.todo-item-main span,
.todo-item-main em,
.todo-item-main p {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.todo-item-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-item-main p {
  margin: 0;
  white-space: nowrap;
}

.todo-item-side {
  justify-items: end;
  align-content: space-between;
}

.todo-item-side .row-actions {
  justify-content: flex-end;
}

.data-drawer {
  display: grid;
  gap: 14px;
}

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

.data-summary-grid div,
.data-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .data-summary-grid div,
body[data-theme="dark"] .data-section {
  background: #151922;
  border-color: var(--line-dark);
}

.data-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
}

.data-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.data-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.data-section {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.data-inline-tools,
.flow-inline-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 28px;
}

.flow-inline-tools {
  justify-content: space-between;
}

.data-section-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body[data-theme="dark"] .data-section-label {
  background: #11151d;
  border-color: var(--line-dark);
}

.operating-board {
  gap: 10px;
}

.operating-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.operating-kpi-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

body[data-theme="dark"] .operating-kpi-grid div {
  background: #11151d;
  border-color: var(--line-dark);
}

.operating-kpi-grid span,
.operating-kpi-grid em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operating-kpi-grid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operating-kpi-grid .done strong {
  color: var(--green);
}

.operating-kpi-grid .warning strong {
  color: var(--amber);
}

.operating-kpi-grid .risk strong {
  color: var(--red);
}

.operating-kpi-grid .info strong {
  color: var(--blue);
}

.operating-project-list {
  display: grid;
  gap: 8px;
}

.operating-project-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .operating-project-list button {
  background: #11151d;
  border-color: var(--line-dark);
}

.operating-project-list button:hover,
.operating-project-list button:focus-visible {
  outline: none;
  border-color: #b7d6ff;
  background: #eaf3ff;
}

body[data-theme="dark"] .operating-project-list button:hover,
body[data-theme="dark"] .operating-project-list button:focus-visible {
  background: var(--hover);
}

.operating-project-list button > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.operating-project-list strong,
.operating-project-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operating-project-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.data-bars {
  display: grid;
  gap: 10px;
}

.data-bar {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(120px, 1fr) minmax(74px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.data-bar:last-child {
  border-bottom: 0;
}

.data-bar-label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.data-bar-label strong,
.data-bar-label em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-bar-label em,
.data-bar-value {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.data-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
}

.data-bar-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
}

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

.status-grid div {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

body[data-theme="dark"] .status-grid div {
  border-color: var(--line-dark);
}

.status-grid span,
.insight-list span {
  color: var(--muted);
}

.status-grid strong {
  color: var(--ink);
  font-size: 18px;
}

.insight-list {
  display: grid;
  gap: 8px;
}

.insight-list button {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .insight-list button {
  background: #11151d;
  border-color: var(--line-dark);
}

.insight-list button:hover,
.data-bar:hover {
  color: var(--blue);
}

.flow-drawer {
  display: grid;
  gap: 14px;
}

.flow-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.flow-summary-grid div,
.flow-section,
.flow-stage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .flow-summary-grid div,
body[data-theme="dark"] .flow-section,
body[data-theme="dark"] .flow-stage {
  background: #151922;
  border-color: var(--line-dark);
}

.flow-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
}

.flow-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.flow-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.flow-board {
  display: grid;
  gap: 10px;
}

.flow-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(130px, 0.6fr);
  gap: 10px 12px;
  align-items: center;
  padding: 13px;
}

.flow-stage-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--blue);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.flow-stage-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.flow-stage-copy strong,
.flow-stage-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-stage-copy span,
.flow-stage-stats,
.flow-record span,
.flow-record em {
  color: var(--muted);
}

.flow-stage-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
}

.flow-stage-meter i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
}

.flow-stage-stats {
  grid-column: 2 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-weight: 700;
}

.flow-stage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.flow-section {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.flow-records {
  display: grid;
  gap: 8px;
}

.flow-record {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .flow-record {
  background: #11151d;
  border-color: var(--line-dark);
}

.flow-record:hover,
.flow-record:focus-visible,
.flow-stage .link-button:hover {
  color: var(--blue);
}

.flow-record strong,
.flow-record span,
.flow-record em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.audit-drawer {
  display: grid;
  gap: 14px;
}

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

.audit-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .audit-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.audit-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.audit-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.audit-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .audit-filter {
  background: #151922;
  border-color: var(--line-dark);
}

.audit-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.audit-filter input,
.audit-filter select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .audit-filter input,
body[data-theme="dark"] .audit-filter select {
  background: #11151d;
  border-color: var(--line-dark);
}

.audit-list {
  display: grid;
  gap: 8px;
}

.audit-entry {
  display: grid;
  grid-template-columns: minmax(126px, 0.52fr) minmax(0, 1fr) minmax(70px, 0.28fr) auto;
  gap: 8px 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
}

body[data-theme="dark"] .audit-entry {
  background: #151922;
  border-color: var(--line-dark);
}

.audit-entry:hover,
.audit-entry:focus-visible {
  outline: none;
  border-color: var(--blue);
  background: #eaf3ff;
}

body[data-theme="dark"] .audit-entry:hover,
body[data-theme="dark"] .audit-entry:focus-visible {
  background: var(--hover);
}

.audit-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.audit-main strong,
.audit-main em,
.audit-time,
.audit-actor,
.audit-detail,
.audit-change {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-main em,
.audit-time,
.audit-detail,
.audit-change {
  color: var(--muted);
  font-style: normal;
}

.audit-actor {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.audit-detail {
  grid-column: 2 / -1;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.audit-change-count {
  justify-self: end;
  align-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(22, 119, 255, 0.28);
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.09);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-theme="dark"] .audit-change-count {
  border-color: rgba(64, 150, 255, 0.36);
  background: rgba(64, 150, 255, 0.14);
}

.audit-change {
  grid-column: 2 / -1;
  min-width: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
}

.archive-drawer {
  display: grid;
  gap: 14px;
}

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

.archive-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .archive-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.archive-summary-grid strong {
  color: var(--blue);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.archive-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.archive-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr) minmax(130px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .archive-filter {
  background: #151922;
  border-color: var(--line-dark);
}

.archive-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.archive-filter input,
.archive-filter select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .archive-filter input,
body[data-theme="dark"] .archive-filter select {
  background: #11151d;
  border-color: var(--line-dark);
}

.file-register-panel,
.file-cabinet-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .file-register-panel,
body[data-theme="dark"] .file-cabinet-panel {
  background: #151922;
  border-color: var(--line-dark);
}

.file-register-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.55fr) minmax(150px, 0.65fr) minmax(210px, 1.05fr);
  gap: 10px;
  align-items: end;
}

.file-register-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.file-register-grid input,
.file-register-grid select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .file-register-grid input,
body[data-theme="dark"] .file-register-grid select {
  background: #11151d;
  border-color: var(--line-dark);
}

.file-cabinet-list {
  display: grid;
  gap: 8px;
}

.file-cabinet-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.file-cabinet-entry.risk {
  border-color: rgba(255, 59, 48, 0.3);
  background: #fff8f7;
}

.file-cabinet-entry.warning {
  border-color: rgba(255, 149, 0, 0.28);
  background: #fffaf2;
}

body[data-theme="dark"] .file-cabinet-entry {
  background: #11151d;
  border-color: var(--line-dark);
}

body[data-theme="dark"] .file-cabinet-entry.risk {
  border-color: rgba(255, 69, 58, 0.34);
  background: #19171a;
}

body[data-theme="dark"] .file-cabinet-entry.warning {
  border-color: rgba(255, 159, 10, 0.32);
  background: #191815;
}

.file-cabinet-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.file-cabinet-main:hover,
.file-cabinet-main:focus-visible {
  outline: none;
  color: var(--blue);
}

.file-cabinet-main strong,
.file-cabinet-main span,
.file-cabinet-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-cabinet-main span,
.file-cabinet-main em {
  color: var(--muted);
  font-style: normal;
}

.file-cabinet-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.file-cabinet-side .row-actions {
  justify-content: flex-end;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-confirm-panel {
  display: grid;
  gap: 14px;
}

.archive-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.archive-confirm-summary div,
.archive-required {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .archive-confirm-summary div,
body[data-theme="dark"] .archive-required {
  background: #151922;
  border-color: var(--line-dark);
}

.archive-confirm-summary span,
.archive-required span,
.archive-check,
.archive-note {
  color: var(--muted);
  font-weight: 800;
}

.archive-confirm-summary strong,
.archive-required strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.archive-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.archive-note {
  display: grid;
  gap: 7px;
}

.archive-note textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .archive-note textarea {
  background: #11151d;
  border-color: var(--line-dark);
}

.import-report {
  display: grid;
  gap: 12px;
}

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

.import-report-summary div,
.import-report-file,
.import-failure-list div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .import-report-summary div,
body[data-theme="dark"] .import-report-file,
body[data-theme="dark"] .import-failure-list div {
  background: #151922;
  border-color: var(--line-dark);
}

.import-report-summary span,
.import-report-file span,
.import-failure-list span {
  color: var(--muted);
  font-weight: 800;
}

.import-report-summary strong,
.import-report-file strong,
.import-failure-list strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-report-summary strong {
  color: var(--blue);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.import-failure-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.archive-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .archive-entry {
  background: #151922;
  border-color: var(--line-dark);
}

.archive-entry-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.archive-entry-main:hover,
.archive-entry-main:focus-visible {
  outline: none;
  color: var(--blue);
}

.archive-entry-main strong,
.archive-entry-main span,
.archive-entry-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-entry-main span,
.archive-entry-main em {
  color: var(--muted);
  font-style: normal;
}

.archive-entry-side {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: 8px;
}

.archive-entry-side .row-actions {
  justify-content: flex-end;
}

.recycle-drawer {
  display: grid;
  gap: 14px;
}

.recycle-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recycle-summary-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .recycle-summary-grid div {
  background: #151922;
  border-color: var(--line-dark);
}

.recycle-summary-grid strong {
  color: var(--amber);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.recycle-summary-grid span {
  color: var(--muted);
  font-weight: 700;
}

.recycle-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .recycle-filter {
  background: #151922;
  border-color: var(--line-dark);
}

.recycle-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.recycle-filter input,
.recycle-filter select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .recycle-filter input,
body[data-theme="dark"] .recycle-filter select {
  background: #11151d;
  border-color: var(--line-dark);
}

/* 重构:紧凑单行 + 翻页(不再上下滚动) */
.recycle-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.recycle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.recycle-row:last-child { border-bottom: none; }
.recycle-row:hover { background: color-mix(in srgb, var(--blue) 5%, var(--panel)); }
.recycle-row-info { min-width: 0; flex: 1 1 auto; }
.recycle-row-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recycle-row-title em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 8px; }
.recycle-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.recycle-row-act { display: flex; gap: 4px; flex: 0 0 auto; }
.recycle-summary-line { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.recycle-summary-line strong { color: var(--ink); font-weight: 800; font-size: 15px; }
.recycle-filter { grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr) auto; align-items: center; }
.recycle-pager { margin-top: 14px; }

.recycle-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .recycle-entry {
  background: #151922;
  border-color: var(--line-dark);
}

.recycle-entry-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.recycle-entry-main:hover,
.recycle-entry-main:focus-visible {
  outline: none;
  color: var(--blue);
}

.recycle-entry-main strong,
.recycle-entry-main span,
.recycle-entry-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recycle-entry-main span,
.recycle-entry-main em {
  color: var(--muted);
  font-style: normal;
}

.recycle-entry-side {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: 8px;
}

.recycle-entry-side .row-actions {
  justify-content: flex-end;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #364153;
  line-height: 1.55;
}

body[data-theme="dark"] .plain-list li {
  color: var(--muted);
}

.plain-list li:last-child {
  border-bottom: 0;
}

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

.proto-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.proto-form .full {
  grid-column: 1 / -1;
}

.proto-form textarea {
  min-height: 92px;
  resize: vertical;
}

.upload-box {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--weak);
}

.audit-rail {
  display: grid;
  gap: 12px;
}

.audit-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
}

.audit-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--blue);
  font-weight: 900;
}

.audit-item span:last-child {
  color: var(--muted);
}

.funnel {
  display: grid;
  gap: 12px;
}

.funnel div {
  width: var(--w);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: linear-gradient(90deg, #2f7bff, #79b2ff);
  color: #fff;
}

.bar-chart {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 18px;
}

.bar-chart div {
  height: 210px;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: 8px;
}

.bar-chart span {
  align-self: end;
  width: 44px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.bar-chart em {
  color: var(--muted);
  font-style: normal;
}

.diagram-tabs {
  display: grid;
  gap: 16px;
}

.diagram-frame {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

body[data-theme="dark"] .diagram-frame {
  background: #151922;
}

.diagram-frame img {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
}

.text-blocks {
  display: grid;
  gap: 12px;
}

.text-blocks p {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  line-height: 1.7;
}

body[data-theme="dark"] .text-blocks p {
  background: #151922;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 29, 31, 0.26);
  backdrop-filter: blur(4px);
}

.drawer[aria-hidden="true"] .drawer-title {
  display: none;
}

body[data-theme="dark"] .drawer {
  background: rgba(0, 0, 0, 0.42);
}

.drawer.is-open {
  display: flex;
}

.drawer-panel {
  width: min(920px, calc(100vw - 48px));
  min-height: 0;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .drawer-panel {
  background: rgba(23, 26, 33, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.drawer.card-mode {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.drawer.card-mode .drawer-panel {
  width: min(920px, calc(100vw - 48px));
  min-height: 0;
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .drawer.card-mode .drawer-panel {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  background: var(--panel);
}

body[data-theme="dark"] .drawer-head {
  background: #181b22;
}

.drawer-title {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.record-form {
  padding: 20px;
}

.tool-hub-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.tool-hub-item {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.tool-hub-item:last-child {
  border-bottom: 0;
}

.tool-hub-item::after {
  content: "›";
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

body[data-theme="dark"] .tool-hub-grid,
body[data-theme="dark"] .tool-hub-item {
  border-color: var(--line-dark);
}

.tool-hub-item:hover,
.tool-hub-item:focus-visible {
  outline: none;
  background: #eaf3ff;
}

body[data-theme="dark"] .tool-hub-item:hover,
body[data-theme="dark"] .tool-hub-item:focus-visible {
  background: var(--hover);
}

.tool-hub-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
}

body[data-theme="dark"] .tool-hub-icon {
  background: rgba(64, 150, 255, 0.14);
}

.tool-hub-icon .app-icon {
  width: 18px;
  height: 18px;
}

.tool-hub-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tool-hub-copy strong,
.tool-hub-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-hub-copy strong {
  font-size: 14px;
}

.tool-hub-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

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

.form-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.form-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row.full {
  grid-column: 1 / -1;
}

.form-row label {
  color: var(--muted);
}

.form-row textarea {
  min-height: 90px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.detail-actions {
  flex-wrap: wrap;
  padding-top: 4px;
}

.approval-panel {
  display: grid;
  gap: 14px;
}

.approval-summary,
.approval-flow {
  display: grid;
  gap: 10px;
}

.approval-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.approval-summary div,
.approval-flow div,
.approval-last {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .approval-summary div,
body[data-theme="dark"] .approval-flow div,
body[data-theme="dark"] .approval-last {
  background: #151922;
  border-color: var(--line-dark);
}

.approval-flow {
  grid-template-columns: 1fr 1fr;
}

.approval-summary span,
.approval-flow span,
.approval-last span,
.approval-note {
  color: var(--muted);
  font-weight: 800;
}

.approval-summary strong,
.approval-flow strong,
.approval-last strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-flow strong {
  color: var(--blue);
  font-size: 18px;
}

.approval-flow em,
.approval-last em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-note {
  display: grid;
  gap: 7px;
}

.approval-note textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .approval-note textarea {
  background: #11151d;
  border-color: var(--line-dark);
}

.danger-confirm {
  display: grid;
  gap: 12px;
}

.danger-confirm-banner {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(217, 45, 32, 0.28);
  border-radius: var(--radius);
  background: rgba(217, 45, 32, 0.07);
}

.danger-confirm-banner strong {
  color: var(--red);
  font-size: 16px;
}

.danger-confirm-banner span {
  color: var(--muted);
  line-height: 1.6;
}

.danger-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.danger-confirm-summary div,
.danger-confirm-note {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.danger-confirm-summary .wide {
  grid-column: 1 / -1;
}

body[data-theme="dark"] .danger-confirm-summary div,
body[data-theme="dark"] .danger-confirm-note {
  background: #151922;
  border-color: var(--line-dark);
}

.danger-confirm-summary span {
  color: var(--muted);
  font-weight: 800;
}

.danger-confirm-summary strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-confirm-note {
  color: var(--red);
  font-weight: 900;
}

.delete-approval-check,
.delete-approval-note {
  color: var(--muted);
  font-weight: 800;
}

.delete-approval-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 45, 32, 0.22);
  border-radius: var(--radius);
  background: rgba(217, 45, 32, 0.05);
}

.delete-approval-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.delete-approval-note {
  display: grid;
  gap: 7px;
}

.delete-approval-note textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .delete-approval-check {
  border-color: rgba(255, 77, 79, 0.32);
  background: rgba(255, 77, 79, 0.08);
}

body[data-theme="dark"] .delete-approval-note textarea {
  background: #11151d;
  border-color: var(--line-dark);
}

.management-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.management-head.has-switcher {
  grid-template-columns: minmax(0, 1fr) auto;
}

.management-head.has-switcher .company-management-switcher {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: flex-start;
}

.management-metrics,
.management-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.management-metrics span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.management-metrics strong {
  color: var(--blue);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .management-metrics span {
  background: #151922;
  border-color: var(--line-dark);
}

.company-management-switcher {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.company-management-switcher button {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.company-management-switcher button:hover,
.company-management-switcher button:focus-visible {
  outline: none;
  border-color: #b7d6ff;
  background: var(--hover);
  color: var(--blue);
}

.company-management-switcher button.is-active {
  border-color: rgba(22, 119, 255, 0.45);
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
}

body[data-theme="dark"] .company-management-switcher {
  background: transparent;
  border-color: transparent;
}

body[data-theme="dark"] .company-management-switcher button.is-active {
  border-color: #2f6fb6;
  background: var(--hover);
}

.account-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-create-panel,
.account-filter-panel,
.account-table-panel {
  padding: 12px;
}

.account-create-form,
.account-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, 0.6fr) auto;
  align-items: end;
  gap: 10px;
}

.account-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.3fr) minmax(150px, 0.3fr) auto;
}

.account-create-form label,
.account-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.account-create-form input,
.account-create-form select,
.account-filter-form input,
.account-filter-form select,
.account-type-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

body[data-theme="dark"] .account-create-form input,
body[data-theme="dark"] .account-create-form select,
body[data-theme="dark"] .account-filter-form input,
body[data-theme="dark"] .account-filter-form select,
body[data-theme="dark"] .account-type-select {
  background: #11151d;
  border-color: var(--line-dark);
}

.account-table {
  overflow: auto;
}

.account-table table {
  width: 100%;
  min-width: 880px;
}

.account-table td:first-child strong {
  display: inline-block;
  min-width: 160px;
}

.account-row-actions {
  gap: 8px;
}

.account-row-actions .link-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.account-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.account-row-actions .link-button + .link-button {
  padding-left: 12px;
}

.account-row-actions .link-button + .link-button::before {
  display: none;
}

.account-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.org-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-create-panel,
.org-filter-panel,
.org-table-panel {
  padding: 12px;
}

.org-create-form,
.org-filter-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(140px, 0.6fr) minmax(130px, 0.5fr) minmax(150px, 0.65fr) minmax(140px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
}

.org-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.org-create-form label,
.org-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.org-create-form input,
.org-create-form select,
.org-filter-form input,
.org-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.org-table {
  overflow: auto;
}

.org-table table {
  width: 100%;
  min-width: 980px;
}

.org-row-actions {
  gap: 8px;
}

.org-row-actions .link-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.org-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.org-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.employee-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-workload-panel,
.employee-create-panel,
.employee-filter-panel,
.employee-table-panel {
  padding: 12px;
}

.employee-workload-panel {
  padding: 8px 10px;
}

.employee-workload-strip {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 42px;
}

.employee-workload-summary,
.employee-workload-item,
.employee-workload-empty {
  min-width: 0;
  min-height: 38px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.employee-workload-summary {
  flex: 0 0 118px;
  margin-right: 8px;
  padding-left: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.employee-workload-empty {
  flex: 1 1 auto;
  color: var(--muted);
  font-weight: 800;
}

.employee-workload-item {
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.employee-workload-summary {
  border-color: var(--line);
}

.employee-workload-item:hover,
.employee-workload-item:focus-visible,
.employee-workload-summary:hover,
.employee-workload-summary:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
  color: var(--blue);
}

.employee-workload-item > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.employee-workload-item strong,
.employee-workload-item em,
.employee-workload-summary span,
.employee-workload-summary strong,
.employee-workload-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-workload-item em,
.employee-workload-item i,
.employee-workload-summary span,
.employee-workload-summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.employee-workload-summary strong,
.employee-workload-item b {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.employee-workload-open {
  align-self: center;
  min-height: 34px;
  margin-left: 8px;
  white-space: nowrap;
}

.employee-workload-item.risk b,
.employee-workload-item.risk i {
  color: var(--red);
}

body[data-theme="dark"] .employee-workload-summary,
body[data-theme="dark"] .employee-workload-item,
body[data-theme="dark"] .employee-workload-empty {
  border-color: var(--line-dark);
  background: transparent;
}

body[data-theme="dark"] .employee-workload-item:hover,
body[data-theme="dark"] .employee-workload-item:focus-visible,
body[data-theme="dark"] .employee-workload-summary:hover,
body[data-theme="dark"] .employee-workload-summary:focus-visible {
  background: var(--hover);
}

.employee-create-form,
.employee-filter-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 0.7fr) minmax(190px, 0.9fr) minmax(120px, 0.55fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr) auto;
  align-items: end;
  gap: 10px;
}

.employee-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.employee-create-form label,
.employee-filter-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.employee-create-form input,
.employee-create-form select,
.employee-filter-form input,
.employee-filter-form select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.employee-table {
  overflow: auto;
}

.employee-table table {
  width: 100%;
  min-width: 980px;
}

.employee-row-actions {
  gap: 8px;
}

.employee-row-actions .link-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.employee-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.employee-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.role-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-create-panel,
.role-filter-panel,
.role-table-panel {
  padding: 12px;
}

.role-create-form,
.role-filter-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
  align-items: end;
  gap: 10px;
}

.role-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.role-create-form label,
.role-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.role-create-form input,
.role-create-form select,
.role-filter-form input,
.role-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.role-menu-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.role-menu-field legend {
  grid-column: 1 / -1;
  width: 100%;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.role-menu-field label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.role-menu-field label:nth-of-type(6n) {
  border-right: 0;
}

.role-menu-field label:nth-last-of-type(-n + 6) {
  border-bottom: 0;
}

.role-menu-field input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  flex: 0 0 14px;
  background: transparent;
  accent-color: var(--blue);
}

.role-table {
  overflow: auto;
}

.role-table table {
  width: 100%;
  min-width: 980px;
}

.role-menu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-menu-chips em {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: var(--radius);
  background: #fff;
  color: #35618d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.role-row-actions {
  gap: 8px;
}

.role-row-actions .link-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.role-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.role-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.partner-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.partner-create-panel,
.partner-filter-panel,
.partner-table-panel {
  padding: 12px;
}

.team-ledger-panel {
  padding: 9px 10px;
}

.team-ledger-panel .panel-toolbar {
  margin-bottom: 6px;
}

.team-ledger-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.team-ledger-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 8px 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.team-ledger-item:last-child {
  border-right: 0;
}

.team-ledger-item.risk {
  background: transparent;
}

.team-ledger-item.warning {
  background: transparent;
}

body[data-theme="dark"] .team-ledger-item {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .team-ledger-list {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .team-ledger-item.risk {
  background: transparent;
}

body[data-theme="dark"] .team-ledger-item.warning {
  background: transparent;
}

.team-ledger-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.team-ledger-copy span,
.team-ledger-copy strong,
.team-ledger-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-ledger-copy span,
.team-ledger-copy em {
  color: var(--muted);
  font-style: normal;
}

.team-ledger-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.team-ledger-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.partner-create-form,
.partner-filter-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) minmax(140px, 0.6fr) minmax(150px, 0.75fr) minmax(130px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
}

.partner-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.partner-create-form label,
.partner-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.partner-create-form input,
.partner-create-form select,
.partner-filter-form input,
.partner-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.partner-table {
  overflow: auto;
}

.partner-table table {
  width: 100%;
  min-width: 1080px;
}

.partner-row-actions {
  gap: 8px;
}

.partner-row-actions .link-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.partner-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.partner-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.material-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.material-create-panel,
.material-filter-panel,
.material-table-panel {
  padding: 12px;
}

.material-create-form,
.material-filter-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) minmax(150px, 0.72fr) minmax(120px, 0.45fr) minmax(130px, 0.5fr) auto;
  align-items: end;
  gap: 10px;
}

.material-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.material-create-form label,
.material-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.material-create-form input,
.material-create-form select,
.material-filter-form input,
.material-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.material-table {
  overflow: auto;
}

.material-table table {
  width: 100%;
  min-width: 1060px;
}

.material-row-actions {
  gap: 8px;
}

.material-row-actions .link-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.material-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.material-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.warehouse-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warehouse-create-panel,
.warehouse-filter-panel,
.warehouse-table-panel {
  padding: 12px;
}

.warehouse-create-form,
.warehouse-filter-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.48fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(135px, 0.58fr) minmax(120px, 0.48fr) auto;
  align-items: end;
  gap: 10px;
}

.warehouse-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.warehouse-create-form label,
.warehouse-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.warehouse-create-form input,
.warehouse-create-form select,
.warehouse-filter-form input,
.warehouse-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.warehouse-table {
  overflow: auto;
}

.warehouse-table table {
  width: 100%;
  min-width: 1040px;
}

.warehouse-row-actions {
  gap: 8px;
}

.warehouse-row-actions .link-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.warehouse-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.warehouse-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.fund-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fund-create-panel,
.fund-filter-panel,
.fund-table-panel {
  padding: 12px;
}

.fund-create-form,
.fund-filter-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.45fr) minmax(150px, 0.65fr) minmax(150px, 0.72fr) minmax(170px, 0.85fr) minmax(120px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
}

.fund-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.fund-create-form label,
.fund-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.fund-create-form input,
.fund-create-form select,
.fund-filter-form input,
.fund-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.fund-table {
  overflow: auto;
}

.fund-table table {
  width: 100%;
  min-width: 1120px;
}

.fund-row-actions {
  gap: 8px;
}

.fund-row-actions .link-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.fund-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.fund-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.subject-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-create-panel,
.subject-filter-panel,
.subject-table-panel {
  padding: 12px;
}

.subject-create-form,
.subject-filter-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.45fr) minmax(140px, 0.55fr) minmax(125px, 0.48fr) minmax(110px, 0.4fr) minmax(120px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
}

.subject-filter-form {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
}

.subject-create-form label,
.subject-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.subject-create-form input,
.subject-create-form select,
.subject-filter-form input,
.subject-filter-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.subject-table {
  overflow: auto;
}

.subject-table table {
  width: 100%;
  min-width: 1080px;
}

.subject-row-actions {
  gap: 8px;
}

.subject-row-actions .link-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.subject-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

.subject-row-actions .danger-link {
  border-color: #ffd4d4;
  color: var(--red);
}

.flow-config-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-settings-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-config-panel {
  padding: 12px;
}

.system-settings-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.system-settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.system-settings-summary div {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.system-settings-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.system-settings-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.system-settings-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.system-settings-form input,
.system-settings-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.flow-config-table {
  overflow: auto;
}

.flow-config-table table {
  width: 100%;
  min-width: 1060px;
}

.flow-config-table th:nth-child(2),
.flow-config-table th:nth-child(3) {
  width: 23%;
}

.flow-config-table textarea,
.flow-config-table input,
.flow-config-table select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
}

.flow-config-table textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.45;
}

.flow-config-row-actions {
  gap: 8px;
}

.flow-config-row-actions .link-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.flow-config-row-actions .link-button:hover {
  border-color: #b7d6ff;
  background: #eaf3ff;
  color: var(--blue);
}

body[data-theme="dark"] .account-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .account-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .account-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .org-create-form input,
body[data-theme="dark"] .org-create-form select,
body[data-theme="dark"] .org-filter-form input,
body[data-theme="dark"] .org-filter-form select,
body[data-theme="dark"] .org-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .org-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .org-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .employee-create-form input,
body[data-theme="dark"] .employee-create-form select,
body[data-theme="dark"] .employee-filter-form input,
body[data-theme="dark"] .employee-filter-form select,
body[data-theme="dark"] .employee-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .employee-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .employee-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .role-create-form input,
body[data-theme="dark"] .role-create-form select,
body[data-theme="dark"] .role-filter-form input,
body[data-theme="dark"] .role-filter-form select,
body[data-theme="dark"] .role-menu-field,
body[data-theme="dark"] .role-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .role-menu-field {
  background: #151922;
}

body[data-theme="dark"] .role-menu-field legend,
body[data-theme="dark"] .role-menu-field label {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .role-menu-field legend {
  background: #11151d;
}

body[data-theme="dark"] .role-menu-chips em {
  border-color: rgba(64, 150, 255, 0.28);
  background: #151922;
  color: #9ccaff;
}

body[data-theme="dark"] .role-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .role-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .partner-create-form input,
body[data-theme="dark"] .partner-create-form select,
body[data-theme="dark"] .partner-filter-form input,
body[data-theme="dark"] .partner-filter-form select,
body[data-theme="dark"] .partner-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .partner-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .partner-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .material-create-form input,
body[data-theme="dark"] .material-create-form select,
body[data-theme="dark"] .material-filter-form input,
body[data-theme="dark"] .material-filter-form select,
body[data-theme="dark"] .material-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .material-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .material-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .warehouse-create-form input,
body[data-theme="dark"] .warehouse-create-form select,
body[data-theme="dark"] .warehouse-filter-form input,
body[data-theme="dark"] .warehouse-filter-form select,
body[data-theme="dark"] .warehouse-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .warehouse-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .warehouse-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .fund-create-form input,
body[data-theme="dark"] .fund-create-form select,
body[data-theme="dark"] .fund-filter-form input,
body[data-theme="dark"] .fund-filter-form select,
body[data-theme="dark"] .fund-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .fund-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .fund-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .subject-create-form input,
body[data-theme="dark"] .subject-create-form select,
body[data-theme="dark"] .subject-filter-form input,
body[data-theme="dark"] .subject-filter-form select,
body[data-theme="dark"] .subject-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .subject-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

body[data-theme="dark"] .subject-row-actions .danger-link {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ff7b7d;
}

body[data-theme="dark"] .flow-config-table textarea,
body[data-theme="dark"] .flow-config-table input,
body[data-theme="dark"] .flow-config-table select,
body[data-theme="dark"] .flow-config-row-actions .link-button {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .system-settings-summary div,
body[data-theme="dark"] .system-settings-form input,
body[data-theme="dark"] .system-settings-form select {
  background: #151922;
  border-color: var(--line-dark);
  color: var(--ink);
}

body[data-theme="dark"] .flow-config-row-actions .link-button:hover {
  border-color: #2f6fb6;
  background: var(--hover);
  color: var(--blue);
}

.todo-summary-grid,
.smart-reminder-summary-grid,
.message-summary-grid,
.collaboration-summary-grid,
.data-summary-grid,
.flow-summary-grid,
.archive-summary-grid,
.recycle-summary-grid,
.audit-summary-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

body[data-theme="dark"] .todo-summary-grid,
body[data-theme="dark"] .smart-reminder-summary-grid,
body[data-theme="dark"] .message-summary-grid,
body[data-theme="dark"] .collaboration-summary-grid,
body[data-theme="dark"] .data-summary-grid,
body[data-theme="dark"] .flow-summary-grid,
body[data-theme="dark"] .archive-summary-grid,
body[data-theme="dark"] .recycle-summary-grid,
body[data-theme="dark"] .audit-summary-grid {
  border-color: var(--line-dark);
  background: #151922;
}

.todo-summary-grid div,
.smart-reminder-summary-grid div,
.message-summary-grid div,
.collaboration-summary-grid div,
.data-summary-grid div,
.flow-summary-grid div,
.archive-summary-grid div,
.recycle-summary-grid div,
.audit-summary-grid div {
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

body[data-theme="dark"] .todo-summary-grid div,
body[data-theme="dark"] .smart-reminder-summary-grid div,
body[data-theme="dark"] .message-summary-grid div,
body[data-theme="dark"] .collaboration-summary-grid div,
body[data-theme="dark"] .data-summary-grid div,
body[data-theme="dark"] .flow-summary-grid div,
body[data-theme="dark"] .archive-summary-grid div,
body[data-theme="dark"] .recycle-summary-grid div,
body[data-theme="dark"] .audit-summary-grid div {
  border-color: var(--line-dark);
  background: transparent;
}

.todo-summary-grid div:nth-child(4n),
.smart-reminder-summary-grid div:nth-child(4n),
.message-summary-grid div:nth-child(4n),
.collaboration-summary-grid div:nth-child(4n),
.data-summary-grid div:nth-child(4n),
.archive-summary-grid div:nth-child(4n),
.audit-summary-grid div:nth-child(4n),
.flow-summary-grid div:nth-child(3n),
.recycle-summary-grid div:nth-child(3n) {
  border-right: 0;
}

.todo-summary-grid div:nth-last-child(-n + 4),
.smart-reminder-summary-grid div:nth-last-child(-n + 4),
.message-summary-grid div:nth-last-child(-n + 4),
.collaboration-summary-grid div:nth-last-child(-n + 4),
.data-summary-grid div:nth-last-child(-n + 4),
.archive-summary-grid div:nth-last-child(-n + 4),
.audit-summary-grid div:nth-last-child(-n + 4),
.flow-summary-grid div:nth-last-child(-n + 3),
.recycle-summary-grid div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.todo-summary-grid strong,
.smart-reminder-summary-grid strong,
.message-summary-grid strong,
.collaboration-summary-grid strong,
.data-summary-grid strong,
.flow-summary-grid strong,
.archive-summary-grid strong,
.recycle-summary-grid strong,
.audit-summary-grid strong {
  font-size: 21px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: 360px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  padding: 12px 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-open {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 821px) {
  body.is-company-page {
    overflow: hidden;
  }

  body.is-company-page .content {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 18px;
    overflow: hidden;
  }

  body.is-company-page .management-head,
  body.is-company-page .content > .panel {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  body.is-company-page .content > .account-table-panel,
  body.is-company-page .content > .org-table-panel,
  body.is-company-page .content > .employee-table-panel,
  body.is-company-page .content > .role-table-panel,
  body.is-company-page .content > .partner-table-panel,
  body.is-company-page .content > .material-table-panel,
  body.is-company-page .content > .warehouse-table-panel,
  body.is-company-page .content > .fund-table-panel,
  body.is-company-page .content > .subject-table-panel,
  body.is-company-page .content > .flow-config-panel,
  body.is-company-page .content > .system-settings-panel {
    flex: 1 1 auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.is-company-page .account-table,
  body.is-company-page .org-table,
  body.is-company-page .employee-table,
  body.is-company-page .role-table,
  body.is-company-page .partner-table,
  body.is-company-page .material-table,
  body.is-company-page .warehouse-table,
  body.is-company-page .fund-table,
  body.is-company-page .subject-table {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }
}

@media (max-width: 1280px) {
  .app-shell {
    --sidebar-width: 232px;
  }

  .brand {
    padding-inline: 14px;
  }

  .management-head.has-switcher {
    grid-template-columns: 1fr auto;
  }

  .management-head.has-switcher .company-management-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .home-brief,
  .home-brief-stats,
  .dashboard-columns,
  .dashboard-columns.two,
  .filter-row,
  .approval-summary,
  .approval-flow,
  .archive-confirm-summary,
  .file-register-grid,
  .import-report-summary,
  .danger-confirm-summary,
  .account-create-form,
  .account-filter-form,
  .org-create-form,
  .org-filter-form,
  .employee-create-form,
  .employee-filter-form,
  .role-create-form,
  .role-filter-form,
  .partner-create-form,
  .partner-filter-form,
  .material-create-form,
  .material-filter-form,
  .warehouse-create-form,
  .warehouse-filter-form,
  .fund-create-form,
  .fund-filter-form,
  .subject-create-form,
  .subject-filter-form,
  .system-settings-form {
    grid-template-columns: 1fr;
  }

  .stage-board,
  .coverage-grid,
  .home-operating-strip,
  .finance-insight-stack,
  .project-overview-strip,
  .site-overview-strip,
  .project-progress-list,
  .file-cabinet-list,
  .team-ledger-list,
  .invoice-ledger-list,
  .bookkeeping-list,
  .contract-ledger-list,
  .contract-lifecycle-list,
  .signing-platform-list,
  .material-ledger-list,
  .price-list-list,
  .visa-summary-list,
  .debt-summary-list,
  .legal-risk-list,
  .contract-warning-list,
  .finance-overview-grid,
  .system-settings-summary,
  .data-summary,
  .module-actions,
  .process-strip,
  .process-strip.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    --topbar-height: auto;
  }

  .sidebar,
  .topbar {
    position: relative;
  }

  .sidebar {
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    height: auto;
    left: auto;
    right: auto;
  }

  .topbar > div:first-child {
    min-width: 0;
    width: 100%;
  }

  .content {
    padding-top: 18px;
  }

  body.is-home-page {
    overflow: hidden;
  }

  body.is-business-page {
    overflow: auto;
  }

  body.is-home-page .content {
    height: auto;
    min-height: 0;
    padding: 8px 10px 10px;
    overflow: hidden;
  }

  body.is-business-page .content {
    height: auto;
    min-height: 100vh;
    padding: 18px;
    overflow: visible;
  }

  body.is-company-page .content {
    display: flex;
    flex-direction: column;
  }

  body.is-company-page .management-head {
    order: 1;
  }

  body.is-company-page .employee-workload-panel {
    order: 2;
  }

  body.is-company-page .team-ledger-panel {
    order: 2;
  }

  body.is-company-page .account-filter-panel,
  body.is-company-page .org-filter-panel,
  body.is-company-page .employee-filter-panel,
  body.is-company-page .role-filter-panel,
  body.is-company-page .partner-filter-panel,
  body.is-company-page .material-filter-panel,
  body.is-company-page .warehouse-filter-panel,
  body.is-company-page .fund-filter-panel,
  body.is-company-page .subject-filter-panel {
    order: 2;
  }

  body.is-company-page .account-table-panel,
  body.is-company-page .org-table-panel,
  body.is-company-page .employee-table-panel,
  body.is-company-page .role-table-panel,
  body.is-company-page .partner-table-panel,
  body.is-company-page .material-table-panel,
  body.is-company-page .warehouse-table-panel,
  body.is-company-page .fund-table-panel,
  body.is-company-page .subject-table-panel,
  body.is-company-page .flow-config-panel,
  body.is-company-page .system-settings-panel {
    order: 3;
  }

  body.is-company-page .account-create-panel,
  body.is-company-page .org-create-panel,
  body.is-company-page .employee-create-panel,
  body.is-company-page .role-create-panel,
  body.is-company-page .partner-create-panel,
  body.is-company-page .material-create-panel,
  body.is-company-page .warehouse-create-panel,
  body.is-company-page .fund-create-panel,
  body.is-company-page .subject-create-panel {
    order: 4;
  }

  body.is-home-page .app-shell {
    height: 100dvh;
    overflow: hidden;
  }

  body.is-home-page .sidebar {
    height: 122px;
    flex: 0 0 122px;
    overflow: hidden;
  }

  body.is-home-page .brand {
    height: 58px;
    flex-basis: 58px;
    padding: 9px 14px;
  }

  body.is-home-page .nav {
    flex: 0 0 64px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
  }

  body.is-home-page .nav-link {
    min-height: 44px;
  }

  body.is-home-page .workspace {
    height: calc(100dvh - 122px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.is-home-page .topbar {
    min-height: 80px;
    gap: 8px;
    padding: 8px 14px;
  }

  body.is-home-page h1 {
    font-size: 19px;
  }

  body.is-home-page .top-actions {
    gap: 6px;
  }

  body.is-home-page .global-user-status {
    min-height: 32px;
    padding-inline: 7px;
  }

  body.is-home-page .global-user-status em {
    display: none;
  }

  .home-dashboard {
    height: 100%;
    grid-template-rows: 104px auto minmax(0, 1fr) 44px;
    gap: 8px;
    overflow: hidden;
  }

  .home-kpi-bar,
  .home-dashboard-main,
  .home-module-strip {
    grid-template-columns: 1fr;
  }

  .home-kpi-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-user-line {
    grid-column: auto;
  }

  .home-user-line,
  .home-kpi-cell {
    min-height: 52px;
    gap: 1px;
    padding: 4px 8px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .home-user-line:nth-child(-n + 3),
  .home-kpi-cell:nth-child(-n + 3) {
    border-top: 0;
  }

  .home-user-line:nth-child(3n),
  .home-kpi-cell:nth-child(3n) {
    border-right: 0;
  }

  .home-user-line strong {
    font-size: 14px;
  }

  .home-kpi-cell strong {
    font-size: 15px;
  }

  .home-user-line span,
  .home-kpi-cell span,
  .home-kpi-cell em {
    font-size: 10px;
  }

  .home-kpi-cell {
    border-top: 1px solid var(--line);
  }

  .home-kpi-cell:nth-child(2n + 1) {
    border-right: 1px solid var(--line);
  }

  .home-kpi-cell:last-child {
    grid-column: auto;
    border-right: 0;
  }

  .home-dashboard-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 8px;
  }

  .home-work-panel,
  .home-ops-panel {
    padding: 8px;
    gap: 6px;
  }

  .home-panel-head {
    gap: 8px;
  }

  .home-panel-head strong {
    font-size: 14px;
  }

  .home-panel-head span {
    font-size: 11px;
  }

  .home-panel-head .ghost-button,
  .home-panel-actions .ghost-button {
    min-height: 28px;
    padding-inline: 8px;
  }

  .home-work-list,
  .home-project-list,
  .home-risk-list {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .home-work-item,
  .home-project-item,
  .home-risk-item {
    min-height: 38px;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .home-work-item:last-child,
  .home-project-item:last-child,
  .home-risk-item:last-child {
    border-bottom: 0;
  }

  .home-work-item:nth-child(n + 4),
  .home-project-item:nth-child(n + 3),
  .home-risk-item:nth-child(n + 2) {
    display: none;
  }

  .home-work-item em,
  .home-project-item em,
  .home-risk-item em {
    font-size: 11px;
  }

  .home-ops-panel {
    grid-template-rows: auto 76px minmax(0, 1fr);
  }

  .home-ops-grid div {
    min-height: 38px;
    padding: 4px 7px;
  }

  .home-ops-grid strong {
    font-size: 15px;
  }

  .home-ops-grid em {
    display: none;
  }

  .home-section-title strong {
    font-size: 12px;
  }

  .home-section-title span {
    display: none;
  }

  .home-ops-section.is-risk {
    display: none;
  }

  .home-risk-item {
    min-height: 36px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .home-module-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .home-module-strip .quick-entry {
    flex: 0 0 130px;
    min-height: 42px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 6px 8px;
  }

  .home-module-strip .quick-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .home-module-strip .quick-copy strong {
    font-size: 13px;
  }

  .home-module-strip .quick-copy em {
    font-size: 10px;
  }

  .home-work-panel {
    grid-row: auto;
  }

  .nav {
    display: flex;
    align-items: center;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    padding: 8px 10px 10px;
  }

  .nav::after {
    content: "";
    flex: 0 0 112px;
  }

  .nav-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
  }

  .nav-section-title {
    display: none;
  }

  .nav-link {
    width: auto;
    flex: 0 0 auto;
    min-width: 132px;
    min-height: 48px;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 7px 10px;
  }

  .topbar,
  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .management-head,
  .management-head.has-switcher {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .management-head.has-switcher .company-management-switcher {
    grid-column: auto;
    grid-row: auto;
  }

  .management-metrics,
  .management-head-actions {
    width: 100%;
  }

  .management-head-actions .ghost-button,
  .management-head-actions .primary-button {
    flex: 1 1 120px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .top-actions .icon-button {
    flex: 0 0 34px;
  }

  .top-actions .ghost-button,
  .top-actions .primary-button {
    flex: 0 0 auto;
    min-width: 0;
    padding-inline: 10px;
  }

  .top-work-button {
    flex-basis: 64px;
    padding-left: 10px;
    padding-right: 18px;
    font-size: 13px;
  }

  .top-work-label {
    font-size: 0;
  }

  .top-work-label::after {
    content: "待办";
    font-size: 13px;
  }

  .top-tool-button {
    flex-basis: 58px;
    min-width: 58px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .module-command-track {
    grid-template-columns: 1fr;
  }

  .module-command-bar {
    position: static;
    top: auto;
    overflow: hidden;
    padding: 8px;
  }

  .module-maintenance-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex-wrap: nowrap;
    gap: 6px;
    padding-right: 0;
    padding-bottom: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .module-maintenance-actions > .ghost-button,
  .module-maintenance-actions > .primary-button {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .module-import-scope {
    width: 100%;
    margin-left: 0;
    display: flex;
    overflow: hidden;
  }

  .module-actions {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 1px;
  }

  .action-step {
    width: auto;
    flex: 0 0 auto;
    min-height: 32px;
    justify-content: flex-start;
    padding-inline: 8px;
  }

  .action-step strong {
    max-width: 84px;
  }

  .employee-workload-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .employee-workload-summary {
    width: 100%;
    margin-right: 0;
    padding: 8px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .employee-workload-item {
    width: 100%;
    flex: none;
    padding: 7px 0;
  }

  .employee-workload-open {
    width: 100%;
    margin-left: 0;
  }

  .employee-workload-item:nth-of-type(n + 4) {
    display: none;
  }

  .team-ledger-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .team-ledger-list > article:nth-of-type(n + 2) {
    display: none;
  }

  .team-ledger-item:last-child {
    border-bottom: 0;
  }

  .global-user-status {
    flex: 0 1 142px;
    justify-content: flex-start;
    min-width: 0;
    padding-inline: 7px;
  }

  .global-user-status strong,
  .global-user-status em {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .global-user-status em {
    display: none;
  }

  .global-user-status strong {
    max-width: 54px;
  }

  .global-user-status .link-button {
    margin-left: auto;
    white-space: nowrap;
  }

  .login-top {
    grid-template-columns: auto 1fr;
    padding: 0 20px;
  }

  .login-top em {
    display: none;
  }

  .login-card {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .login-visual {
    padding: 34px;
  }

  .login-form {
    padding: 28px;
  }

  .proto-form,
  .form-grid,
  .search-panel,
  .home-operating-main,
  .home-operating-projects,
  .filter-row,
  .finance-insight-stack,
  .finance-workbench-layout,
  .smart-reminder-summary-grid,
  .message-summary-grid,
  .collaboration-summary-grid,
  .dashboard-side-column .data-summary,
  .dashboard-side-column .process-strip,
  .stage-board,
  .coverage-grid,
  .data-summary,
  .process-strip,
  .process-strip.compact {
    grid-template-columns: 1fr;
  }

  body.is-company-page .account-filter-form,
  body.is-company-page .org-filter-form,
  body.is-company-page .employee-filter-form,
  body.is-company-page .role-filter-form,
  body.is-company-page .partner-filter-form,
  body.is-company-page .material-filter-form,
  body.is-company-page .warehouse-filter-form,
  body.is-company-page .fund-filter-form,
  body.is-company-page .subject-filter-form,
  body.is-company-page .account-create-form,
  body.is-company-page .org-create-form,
  body.is-company-page .employee-create-form,
  body.is-company-page .role-create-form,
  body.is-company-page .partner-create-form,
  body.is-company-page .material-create-form,
  body.is-company-page .warehouse-create-form,
  body.is-company-page .fund-create-form,
  body.is-company-page .subject-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.is-company-page .account-filter-form label:first-child,
  body.is-company-page .org-filter-form label:first-child,
  body.is-company-page .employee-filter-form label:first-child,
  body.is-company-page .role-filter-form label:first-child,
  body.is-company-page .partner-filter-form label:first-child,
  body.is-company-page .material-filter-form label:first-child,
  body.is-company-page .warehouse-filter-form label:first-child,
  body.is-company-page .fund-filter-form label:first-child,
  body.is-company-page .subject-filter-form label:first-child,
  body.is-company-page .role-menu-field {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-company-page .role-menu-field label:nth-of-type(6n) {
    border-right: 1px solid var(--line);
  }

  body.is-company-page .role-menu-field label:nth-of-type(2n) {
    border-right: 0;
  }

  body.is-company-page .role-menu-field label:nth-last-of-type(-n + 6) {
    border-bottom: 1px solid var(--line);
  }

  body.is-company-page .role-menu-field label:nth-last-of-type(-n + 2) {
    border-bottom: 0;
  }

  body.is-company-page .system-settings-panel {
    gap: 8px;
    padding: 10px 12px;
  }

  body.is-company-page .system-settings-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  body.is-company-page .system-settings-summary div {
    min-height: 50px;
    padding: 7px 9px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  body.is-company-page .system-settings-summary div:nth-child(2n) {
    border-right: 0;
  }

  body.is-company-page .system-settings-summary div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  body.is-company-page .system-settings-summary span {
    font-size: 11px;
  }

  body.is-company-page .system-settings-summary strong {
    font-size: 14px;
  }

  body.is-company-page .system-settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.is-company-page .system-settings-form label {
    min-width: 0;
    gap: 4px;
    font-size: 12px;
  }

  body.is-company-page .system-settings-form input,
  body.is-company-page .system-settings-form select {
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
  }

  body[data-theme="dark"].is-company-page .system-settings-summary,
  body[data-theme="dark"].is-company-page .system-settings-summary div {
    border-color: var(--line-dark);
  }

  body.is-company-page .account-create-form > button,
  body.is-company-page .account-filter-form > button,
  body.is-company-page .org-create-form > button,
  body.is-company-page .org-filter-form > button,
  body.is-company-page .employee-create-form > button,
  body.is-company-page .employee-filter-form > button,
  body.is-company-page .role-create-form > button,
  body.is-company-page .role-filter-form > button,
  body.is-company-page .partner-create-form > button,
  body.is-company-page .partner-filter-form > button,
  body.is-company-page .material-create-form > button,
  body.is-company-page .material-filter-form > button,
  body.is-company-page .warehouse-create-form > button,
  body.is-company-page .warehouse-filter-form > button,
  body.is-company-page .fund-create-form > button,
  body.is-company-page .fund-filter-form > button,
  body.is-company-page .subject-create-form > button,
  body.is-company-page .subject-filter-form > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .finance-workbench-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  body[data-theme="dark"] .finance-workbench-nav {
    border-color: var(--line-dark);
  }

  .site-budget-workbench,
  .business-workbench {
    height: auto;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  body.is-business-page .site-budget-main,
  body.is-business-page .business-main {
    height: auto;
    display: block;
    overflow: visible;
  }

  .site-budget-metrics,
  .business-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-budget-metrics div:nth-child(2n),
  .business-metrics div:nth-child(2n) {
    border-right: 0;
  }

  .site-budget-metrics div:nth-last-child(-n + 2),
  .business-metrics div:nth-last-child(-n + 2) {
    border-top: 1px solid var(--line);
  }

  .site-budget-filter,
  .business-filter {
    grid-template-columns: 1fr;
  }

  .site-budget-inspector,
  .business-inspector {
    position: static;
    width: 100%;
    max-height: none;
  }

  .inspector-actions {
    position: static;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .action-step {
    flex-basis: auto;
  }

  .project-overview-strip div,
  .site-overview-strip div {
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-overview-strip div:last-child,
  .site-overview-strip div:last-child {
    border-bottom: 0;
  }

  body[data-theme="dark"] .project-overview-strip div,
  body[data-theme="dark"] .site-overview-strip div {
    border-color: var(--line-dark);
  }

  .assistant-chip-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-operating-actions {
    flex-wrap: wrap;
  }

  .home-operating-actions .ghost-button,
  .home-operating-actions .primary-button {
    flex: 1 1 120px;
  }

  .project-progress-list,
  .project-progress-item,
  .project-overview-strip,
  .site-overview-strip,
  .site-focus-list,
  .site-focus-item,
  .file-register-grid,
  .file-cabinet-list,
  .file-cabinet-entry,
  .team-ledger-list,
  .team-ledger-item,
  .invoice-ledger-list,
  .invoice-ledger-item,
  .bookkeeping-list,
  .bookkeeping-item,
  .contract-ledger-list,
  .contract-ledger-item,
  .contract-lifecycle-list,
  .contract-lifecycle-item,
  .signing-platform-list,
  .signing-platform-item,
  .payment-schedule-list,
  .payment-schedule-item,
  .material-ledger-list,
  .material-ledger-item,
  .price-list-list,
  .price-list-item,
  .visa-summary-list,
  .visa-summary-item,
  .debt-summary-list,
  .debt-summary-item,
  .legal-risk-list,
  .legal-risk-item,
  .contract-warning-list,
  .contract-warning-item,
  .related-item {
    grid-template-columns: 1fr;
  }

  .smart-reminder-item,
  .message-item {
    grid-template-columns: 1fr;
  }

  .collaboration-item {
    grid-template-columns: 1fr;
  }

  .smart-reminder-item-side,
  .message-item-side {
    justify-items: start;
  }

  .collaboration-item-side {
    justify-items: start;
  }

  .smart-reminder-item-main span,
  .smart-reminder-item-main strong,
  .smart-reminder-item-main em,
  .smart-reminder-item-main p,
  .message-item-main span,
  .message-item-main strong,
  .message-item-main em,
  .message-item-main p {
    white-space: normal;
  }

  .collaboration-item-main span,
  .collaboration-item-main strong,
  .collaboration-item-main em,
  .collaboration-item-main p {
    white-space: normal;
  }

  .smart-reminder-item,
  .message-item,
  .collaboration-item,
  .todo-item {
    padding: 9px 10px;
  }

  .smart-reminder-item-main span,
  .smart-reminder-item-main strong,
  .smart-reminder-item-main em,
  .smart-reminder-item-main p,
  .message-item-main span,
  .message-item-main strong,
  .message-item-main em,
  .message-item-main p,
  .collaboration-item-main span,
  .collaboration-item-main strong,
  .collaboration-item-main em,
  .collaboration-item-main p,
  .todo-item-main span,
  .todo-item-main strong,
  .todo-item-main em,
  .todo-item-main p {
    white-space: nowrap;
  }

  .invoice-ledger-side,
  .bookkeeping-side,
  .file-cabinet-side,
  .team-ledger-side,
  .contract-ledger-side,
  .contract-lifecycle-side,
  .signing-platform-side,
  .payment-schedule-side,
  .material-ledger-side,
  .price-list-side,
  .visa-summary-side,
  .debt-summary-side,
  .legal-risk-side,
  .contract-warning-side,
  .related-side {
    justify-items: start;
  }

  .related-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .related-summary span,
  .related-summary em {
    white-space: normal;
  }

  .related-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 0;
  }

  .related-side {
    justify-items: end;
  }

  .collab-summary,
  .collab-form {
    grid-template-columns: 1fr;
  }

  .collab-summary strong,
  .collab-summary em {
    white-space: normal;
  }

  .related-side .row-actions {
    justify-content: flex-end;
  }

  .invoice-ledger-list > article:nth-of-type(n + 3),
  .bookkeeping-list > article:nth-of-type(n + 3),
  .contract-ledger-list > article:nth-of-type(n + 3),
  .contract-lifecycle-list > article:nth-of-type(n + 3),
  .signing-platform-list > article:nth-of-type(n + 3),
  .payment-schedule-list > article:nth-of-type(n + 3),
  .price-list-list > article:nth-of-type(n + 3),
  .debt-summary-list > article:nth-of-type(n + 3),
  .legal-risk-list > article:nth-of-type(n + 3),
  .contract-warning-list > article:nth-of-type(n + 3) {
    display: none;
  }

  .team-ledger-list > article:nth-of-type(n + 3) {
    display: none;
  }

  .operating-project-list button:nth-of-type(n + 4) {
    display: none;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .todo-summary-grid,
  .todo-item,
  .data-summary-grid,
  .data-bar,
  .operating-project-list button,
  .status-grid,
  .flow-summary-grid,
  .flow-stage,
  .archive-summary-grid,
  .archive-filter,
  .archive-entry,
  .file-cabinet-entry,
  .recycle-summary-grid,
  .recycle-filter,
  .recycle-entry,
  .audit-summary-grid,
  .audit-filter,
  .audit-entry {
    grid-template-columns: 1fr;
  }

  .todo-summary-grid,
  .smart-reminder-summary-grid,
  .message-summary-grid,
  .collaboration-summary-grid,
  .data-summary-grid,
  .flow-summary-grid,
  .archive-summary-grid,
  .recycle-summary-grid,
  .audit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-summary-grid div,
  .smart-reminder-summary-grid div,
  .message-summary-grid div,
  .collaboration-summary-grid div,
  .data-summary-grid div,
  .flow-summary-grid div,
  .archive-summary-grid div,
  .recycle-summary-grid div,
  .audit-summary-grid div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  body[data-theme="dark"] .todo-summary-grid div,
  body[data-theme="dark"] .smart-reminder-summary-grid div,
  body[data-theme="dark"] .message-summary-grid div,
  body[data-theme="dark"] .collaboration-summary-grid div,
  body[data-theme="dark"] .data-summary-grid div,
  body[data-theme="dark"] .flow-summary-grid div,
  body[data-theme="dark"] .archive-summary-grid div,
  body[data-theme="dark"] .recycle-summary-grid div,
  body[data-theme="dark"] .audit-summary-grid div {
    border-color: var(--line-dark);
  }

  .todo-summary-grid div:nth-child(2n),
  .smart-reminder-summary-grid div:nth-child(2n),
  .message-summary-grid div:nth-child(2n),
  .collaboration-summary-grid div:nth-child(2n),
  .data-summary-grid div:nth-child(2n),
  .flow-summary-grid div:nth-child(2n),
  .archive-summary-grid div:nth-child(2n),
  .recycle-summary-grid div:nth-child(2n),
  .audit-summary-grid div:nth-child(2n) {
    border-right: 0;
  }

  .todo-summary-grid div:nth-last-child(-n + 2),
  .smart-reminder-summary-grid div:nth-last-child(-n + 2),
  .message-summary-grid div:nth-last-child(-n + 2),
  .collaboration-summary-grid div:nth-last-child(-n + 2),
  .data-summary-grid div:nth-last-child(-n + 2),
  .flow-summary-grid div:nth-last-child(-n + 2),
  .archive-summary-grid div:nth-last-child(-n + 2),
  .recycle-summary-grid div:nth-last-child(-n + 2),
  .audit-summary-grid div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .system-recovery,
  .permission-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .system-recovery-actions,
  .permission-actions {
    justify-content: flex-start;
  }

  .todo-item-side,
  .archive-entry-side,
  .file-cabinet-side,
  .recycle-entry-side {
    justify-items: start;
  }

  .audit-detail,
  .audit-change {
    grid-column: auto;
  }

  .audit-actor,
  .audit-change-count {
    justify-self: start;
    text-align: left;
  }

  .todo-item-side .row-actions,
  .archive-entry-side .row-actions,
  .file-cabinet-side .row-actions,
  .recycle-entry-side .row-actions {
    justify-content: flex-start;
  }

  .audit-actor {
    text-align: left;
  }

  .audit-detail {
    grid-column: auto;
  }

  .smart-reminder-item,
  .message-item,
  .collaboration-item,
  .todo-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 76px;
  }

  .smart-reminder-item-main,
  .message-item-main,
  .collaboration-item-main,
  .todo-item-main {
    gap: 2px;
  }

  .smart-reminder-item-main p,
  .message-item-main p,
  .collaboration-item-main p,
  .todo-item-main p {
    display: none;
  }

  .smart-reminder-item-side,
  .message-item-side,
  .collaboration-item-side,
  .todo-item-side {
    min-width: 54px;
    justify-items: end;
    align-content: center;
    gap: 5px;
  }

  .smart-reminder-item-side .row-actions,
  .message-item-side .row-actions,
  .collaboration-item-side .row-actions,
  .todo-item-side .row-actions {
    justify-content: flex-end;
    gap: 5px;
  }

  .smart-reminder-item-side .link-button,
  .message-item-side .link-button,
  .collaboration-item-side .link-button,
  .todo-item-side .link-button {
    font-size: 12px;
  }

  .smart-reminder-item-side .link-button + .link-button,
  .message-item-side .link-button + .link-button,
  .collaboration-item-side .link-button + .link-button,
  .todo-item-side .link-button + .link-button {
    padding-left: 6px;
  }

  .flow-stage-stats {
    grid-column: auto;
  }

  .flow-stage-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  table {
    min-width: 620px;
  }

  .drawer.card-mode {
    align-items: flex-start;
    padding: 12px;
  }

  .drawer.card-mode .drawer-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

/* Final visual normalization: make the shipped layer win over legacy rules. */
:root {
  --ink: #172033;
  --muted: #5f6f86;
  --weak: #8a97aa;
  --line: #dbe4f0;
  --line-dark: #c8d4e5;
  --canvas: #f1f5f9;
  --soft: #f8fafc;
  --hover: #eef6ff;
  --panel-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body[data-theme="dark"] {
  --ink: #f3f7fb;
  --muted: #b8c4d6;
  --weak: #8391a6;
  --line: #263244;
  --line-dark: #344257;
  --canvas: #0b1017;
  --panel: #121923;
  --soft: #0f1620;
  --hover: #17253a;
  --panel-shadow: none;
}

.sidebar,
body[data-theme="dark"] .sidebar {
  background: color-mix(in srgb, var(--panel) 90%, var(--canvas));
  backdrop-filter: none;
}

.topbar,
body[data-theme="dark"] .topbar {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: none;
}

.brand {
  padding-inline: 16px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #1264d8;
  font-size: 15px;
}

.nav {
  padding-inline: 12px;
}

.nav-module {
  min-height: 48px;
  padding: 8px 10px;
}

.nav-module .nav-icon {
  background: transparent;
  color: #6b7a90;
}

body[data-theme="dark"] .nav-module .nav-icon {
  color: #9aa8bc;
}

.nav-module.is-active {
  border-color: #b7d4ff;
  background: #e6f0ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

body[data-theme="dark"] .nav-module.is-active {
  border-color: #2f6fb6;
  background: #10243d;
}

.nav-module.is-active .nav-icon {
  background: var(--blue);
  color: #fff;
}

.panel,
.module-command-bar,
.business-inspector,
.site-budget-inspector {
  box-shadow: var(--panel-shadow);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.text-button,
.link-button {
  transform: none !important;
}

.primary-button {
  box-shadow: none;
}

.module-command-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

body[data-theme="dark"] .module-command-bar {
  border-color: var(--line-dark);
}

.module-maintenance-actions {
  border-color: color-mix(in srgb, var(--line) 76%, transparent);
}

.action-step {
  border-color: color-mix(in srgb, var(--blue) 26%, var(--line));
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

.action-step:hover,
.action-step:focus-visible,
.action-step.is-active {
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
}

.home-work-list,
.home-project-list,
.home-risk-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

body[data-theme="dark"] .home-work-list,
body[data-theme="dark"] .home-project-list,
body[data-theme="dark"] .home-risk-list {
  border-color: var(--line-dark);
  background: var(--panel);
}

.home-work-item,
.home-project-item,
.home-risk-item,
.home-finance-grid div {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.home-work-item:last-child,
.home-project-item:last-child,
.home-risk-item:last-child {
  border-bottom: 0;
}

.home-work-item:hover,
.home-work-item:focus-visible,
.home-project-item:hover,
.home-project-item:focus-visible,
.home-risk-item:hover,
.home-risk-item:focus-visible,
.quick-entry:hover,
.quick-entry:focus-visible {
  background: color-mix(in srgb, var(--blue) 6%, var(--panel));
}

.home-ops-grid,
.home-finance-grid,
body[data-theme="dark"] .home-ops-grid,
body[data-theme="dark"] .home-finance-grid {
  background: var(--panel);
}

.home-module-strip.panel {
  padding: 0;
}

.quick-entry {
  min-height: 58px;
  background: var(--panel);
}

.quick-icon {
  background: transparent;
  color: var(--blue);
}

.business-main,
.site-budget-main {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.business-head,
.site-budget-head {
  margin-bottom: 8px;
}

.head-filter-form {
  max-width: none;
}

.filter-row.business-filter,
.filter-row.site-budget-filter {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.business-metrics,
.site-budget-metrics {
  margin-bottom: 8px;
  background: var(--panel);
}

.business-metrics div,
.site-budget-metrics div {
  background: transparent;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  border-color: var(--line);
  box-shadow: var(--panel-shadow);
}

body[data-theme="dark"] .business-table.table-shell,
body[data-theme="dark"] .site-budget-table.table-shell,
body[data-theme="dark"] .business-inspector,
body[data-theme="dark"] .site-budget-inspector {
  border-color: var(--line-dark);
}

th {
  background: #f6f8fb;
  color: #334155;
}

body[data-theme="dark"] th {
  background: #0f1620;
  color: #c7d2e4;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

.table-shell .row-actions {
  gap: 6px;
}

.table-shell .row-actions .link-button,
.account-row-actions .link-button,
.org-row-actions .link-button,
.employee-row-actions .link-button,
.role-row-actions .link-button,
.partner-row-actions .link-button,
.material-row-actions .link-button,
.warehouse-row-actions .link-button,
.fund-row-actions .link-button,
.subject-row-actions .link-button,
.flow-config-row-actions .link-button {
  min-height: 28px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

.table-shell .row-actions .link-button:hover,
.table-shell .row-actions .link-button:focus-visible,
.account-row-actions .link-button:hover,
.org-row-actions .link-button:hover,
.employee-row-actions .link-button:hover,
.role-row-actions .link-button:hover,
.partner-row-actions .link-button:hover,
.material-row-actions .link-button:hover,
.warehouse-row-actions .link-button:hover,
.fund-row-actions .link-button:hover,
.subject-row-actions .link-button:hover,
.flow-config-row-actions .link-button:hover {
  border-color: color-mix(in srgb, var(--blue) 32%, var(--line));
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
  color: var(--blue);
}

.table-shell .row-actions .danger-link,
.account-row-actions .danger-link,
.org-row-actions .danger-link,
.employee-row-actions .danger-link,
.role-row-actions .danger-link,
.partner-row-actions .danger-link,
.material-row-actions .danger-link,
.warehouse-row-actions .danger-link,
.fund-row-actions .danger-link,
.subject-row-actions .danger-link {
  color: var(--red);
}

.business-inspector,
.site-budget-inspector {
  border-color: var(--line);
}

.inspector-kv,
.inspector-next,
body[data-theme="dark"] .inspector-kv,
body[data-theme="dark"] .inspector-next {
  background: var(--panel);
}

.inspector-note {
  background: color-mix(in srgb, var(--canvas) 54%, var(--panel));
}

.account-create-panel,
.account-filter-panel,
.org-create-panel,
.org-filter-panel,
.employee-create-panel,
.employee-filter-panel,
.role-create-panel,
.role-filter-panel,
.partner-create-panel,
.partner-filter-panel,
.material-create-panel,
.material-filter-panel,
.warehouse-create-panel,
.warehouse-filter-panel,
.fund-create-panel,
.fund-filter-panel,
.subject-create-panel,
.subject-filter-panel {
  box-shadow: none;
}

.account-table-panel,
.org-table-panel,
.employee-table-panel,
.role-table-panel,
.partner-table-panel,
.material-table-panel,
.warehouse-table-panel,
.fund-table-panel,
.subject-table-panel,
.flow-config-panel,
.system-settings-panel {
  box-shadow: var(--panel-shadow);
}

.management-metrics span {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

@media (min-width: 821px) {
  body.is-home-page .content {
    padding-inline: 16px;
  }

  body.is-business-page .business-workbench,
  body.is-business-page .site-budget-workbench {
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    background: var(--panel);
  }

  .nav {
    padding-inline: 10px;
    scroll-padding-inline: 10px;
    scroll-snap-type: x proximity;
  }

  .nav::after {
    flex-basis: 220px;
  }

  .nav-section,
  .nav-link {
    scroll-snap-align: start;
  }

  .module-command-bar {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .home-work-item,
  .home-project-item,
  .home-risk-item {
    min-height: 44px;
    padding-block: 7px;
  }

  body.is-company-page .management-head {
    gap: 6px;
    margin-bottom: 6px;
  }

  body.is-company-page .company-management-switcher {
    gap: 3px;
    padding-bottom: 2px;
  }

  body.is-company-page .company-management-switcher button {
    min-height: 28px;
    padding-inline: 8px;
  }

  body.is-company-page .account-create-panel,
  body.is-company-page .account-filter-panel,
  body.is-company-page .org-create-panel,
  body.is-company-page .org-filter-panel,
  body.is-company-page .employee-create-panel,
  body.is-company-page .employee-filter-panel,
  body.is-company-page .role-create-panel,
  body.is-company-page .role-filter-panel,
  body.is-company-page .partner-create-panel,
  body.is-company-page .partner-filter-panel,
  body.is-company-page .material-create-panel,
  body.is-company-page .material-filter-panel,
  body.is-company-page .warehouse-create-panel,
  body.is-company-page .warehouse-filter-panel,
  body.is-company-page .fund-create-panel,
  body.is-company-page .fund-filter-panel,
  body.is-company-page .subject-create-panel,
  body.is-company-page .subject-filter-panel {
    padding: 6px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.is-company-page .account-table-panel,
  body.is-company-page .org-table-panel,
  body.is-company-page .employee-table-panel,
  body.is-company-page .role-table-panel,
  body.is-company-page .partner-table-panel,
  body.is-company-page .material-table-panel,
  body.is-company-page .warehouse-table-panel,
  body.is-company-page .fund-table-panel,
  body.is-company-page .subject-table-panel,
  body.is-company-page .flow-config-panel,
  body.is-company-page .system-settings-panel {
    padding: 8px;
  }

  body.is-company-page .account-create-form,
  body.is-company-page .org-create-form,
  body.is-company-page .employee-create-form,
  body.is-company-page .role-create-form,
  body.is-company-page .partner-create-form,
  body.is-company-page .material-create-form,
  body.is-company-page .warehouse-create-form,
  body.is-company-page .fund-create-form,
  body.is-company-page .subject-create-form,
  body.is-company-page .account-filter-form,
  body.is-company-page .org-filter-form,
  body.is-company-page .employee-filter-form,
  body.is-company-page .role-filter-form,
  body.is-company-page .partner-filter-form,
  body.is-company-page .material-filter-form,
  body.is-company-page .warehouse-filter-form,
  body.is-company-page .fund-filter-form,
  body.is-company-page .subject-filter-form {
    gap: 6px;
  }

  body.is-company-page .account-create-form label,
  body.is-company-page .account-filter-form label,
  body.is-company-page .org-create-form label,
  body.is-company-page .org-filter-form label,
  body.is-company-page .employee-create-form label,
  body.is-company-page .employee-filter-form label,
  body.is-company-page .role-create-form label,
  body.is-company-page .role-filter-form label,
  body.is-company-page .partner-create-form label,
  body.is-company-page .partner-filter-form label,
  body.is-company-page .material-create-form label,
  body.is-company-page .material-filter-form label,
  body.is-company-page .warehouse-create-form label,
  body.is-company-page .warehouse-filter-form label,
  body.is-company-page .fund-create-form label,
  body.is-company-page .fund-filter-form label,
  body.is-company-page .subject-create-form label,
  body.is-company-page .subject-filter-form label {
    gap: 3px;
    font-size: 12px;
  }

  body.is-company-page .account-create-form input,
  body.is-company-page .account-create-form select,
  body.is-company-page .account-filter-form input,
  body.is-company-page .account-filter-form select,
  body.is-company-page .org-create-form input,
  body.is-company-page .org-create-form select,
  body.is-company-page .org-filter-form input,
  body.is-company-page .org-filter-form select,
  body.is-company-page .employee-create-form input,
  body.is-company-page .employee-create-form select,
  body.is-company-page .employee-filter-form input,
  body.is-company-page .employee-filter-form select,
  body.is-company-page .role-create-form input,
  body.is-company-page .role-create-form select,
  body.is-company-page .role-filter-form input,
  body.is-company-page .role-filter-form select,
  body.is-company-page .partner-create-form input,
  body.is-company-page .partner-create-form select,
  body.is-company-page .partner-filter-form input,
  body.is-company-page .partner-filter-form select,
  body.is-company-page .material-create-form input,
  body.is-company-page .material-create-form select,
  body.is-company-page .material-filter-form input,
  body.is-company-page .material-filter-form select,
  body.is-company-page .warehouse-create-form input,
  body.is-company-page .warehouse-create-form select,
  body.is-company-page .warehouse-filter-form input,
  body.is-company-page .warehouse-filter-form select,
  body.is-company-page .fund-create-form input,
  body.is-company-page .fund-create-form select,
  body.is-company-page .fund-filter-form input,
  body.is-company-page .fund-filter-form select,
  body.is-company-page .subject-create-form input,
  body.is-company-page .subject-create-form select,
  body.is-company-page .subject-filter-form input,
  body.is-company-page .subject-filter-form select {
    min-height: 32px;
    padding-block: 5px;
  }
}
/* EOF business layout fix: restore spacing and remove horizontal drag bars. */
:root {
  --sticky-command-height: 72px;
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-height) + 16px);
}

body.is-business-page .content {
  padding: calc(var(--topbar-height) + var(--sticky-command-height) + 16px) 24px 20px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - 36px);
  gap: 16px;
}

.module-command-bar {
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  min-height: var(--sticky-command-height);
  padding: 10px 14px;
}

.module-command-track {
  gap: 14px;
}

.module-maintenance-actions {
  gap: 8px;
  padding-right: 14px;
}

.module-import-scope {
  gap: 10px;
}

.business-head,
.site-budget-head,
.business-metrics,
.site-budget-metrics {
  margin-bottom: 12px;
}

.business-table.table-shell,
.site-budget-table.table-shell {
  overflow-x: hidden;
  overflow-y: auto;
}

.business-table table,
.site-budget-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.business-table th,
.business-table td,
.site-budget-table th,
.site-budget-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table th:nth-child(1),
.business-table td:nth-child(1),
.site-budget-table th:nth-child(1),
.site-budget-table td:nth-child(1) {
  width: 42px;
}

.business-table th:nth-child(2),
.business-table td:nth-child(2),
.site-budget-table th:nth-child(2),
.site-budget-table td:nth-child(2) {
  width: 96px;
}

.business-table th:nth-child(3),
.business-table td:nth-child(3),
.site-budget-table th:nth-child(3),
.site-budget-table td:nth-child(3) {
  width: 32%;
}

.business-table th:nth-child(4),
.business-table td:nth-child(4),
.site-budget-table th:nth-child(4),
.site-budget-table td:nth-child(4) {
  width: 22%;
}

.business-table th:nth-child(5),
.business-table td:nth-child(5),
.site-budget-table th:nth-child(5),
.site-budget-table td:nth-child(5) {
  width: 92px;
}

.business-table th:nth-child(6),
.business-table td:nth-child(6),
.site-budget-table th:nth-child(6),
.site-budget-table td:nth-child(6) {
  width: 76px;
}

.business-table th:nth-child(7),
.business-table td:nth-child(7),
.site-budget-table th:nth-child(7),
.site-budget-table td:nth-child(7) {
  width: 92px;
}

.business-table th:nth-child(8),
.business-table td:nth-child(8),
.site-budget-table th:nth-child(8),
.site-budget-table td:nth-child(8) {
  width: 118px;
}

.site-budget-table td:nth-child(3) strong,
.site-budget-table td:nth-child(3) em,
.business-table td:nth-child(3) strong,
.business-table td:nth-child(3) em {
  max-width: 100%;
}

@media (max-width: 820px) {
  :root {
    --sticky-command-height: 0px;
  }

  body.is-business-page .content {
    padding: 10px 12px 16px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    gap: 10px;
  }

  .module-command-bar {
    left: auto;
    right: auto;
    min-height: 0;
    padding: 8px 12px;
  }

  .business-table.table-shell,
  .site-budget-table.table-shell {
    overflow-x: hidden;
  }

  .business-table table,
  .site-budget-table table {
    min-width: 0;
  }

  .business-table th,
  .business-table td,
  .site-budget-table th,
  .site-budget-table td {
    padding-inline: 8px;
  }

  .business-table th:nth-child(4),
  .business-table td:nth-child(4),
  .site-budget-table th:nth-child(4),
  .site-budget-table td:nth-child(4),
  .business-table th:nth-child(5),
  .business-table td:nth-child(5),
  .site-budget-table th:nth-child(5),
  .site-budget-table td:nth-child(5) {
    display: none;
  }

  .business-table th:nth-child(3),
  .business-table td:nth-child(3),
  .site-budget-table th:nth-child(3),
  .site-budget-table td:nth-child(3) {
    width: auto;
  }
}
/* EOF mobile business tables: no horizontal drag bars. */
@media (max-width: 820px) {
  .business-table th:nth-child(1),
  .business-table td:nth-child(1),
  .site-budget-table th:nth-child(1),
  .site-budget-table td:nth-child(1),
  .business-table th:nth-child(4),
  .business-table td:nth-child(4),
  .site-budget-table th:nth-child(4),
  .site-budget-table td:nth-child(4),
  .business-table th:nth-child(5),
  .business-table td:nth-child(5),
  .site-budget-table th:nth-child(5),
  .site-budget-table td:nth-child(5),
  .business-table th:nth-child(6),
  .business-table td:nth-child(6),
  .site-budget-table th:nth-child(6),
  .site-budget-table td:nth-child(6),
  .business-table th:nth-child(8),
  .business-table td:nth-child(8),
  .site-budget-table th:nth-child(8),
  .site-budget-table td:nth-child(8) {
    display: none;
  }

  .business-table th:nth-child(2),
  .business-table td:nth-child(2),
  .site-budget-table th:nth-child(2),
  .site-budget-table td:nth-child(2) {
    width: 82px;
  }

  .business-table th:nth-child(3),
  .business-table td:nth-child(3),
  .site-budget-table th:nth-child(3),
  .site-budget-table td:nth-child(3) {
    width: auto;
  }

  .business-table th:nth-child(7),
  .business-table td:nth-child(7),
  .site-budget-table th:nth-child(7),
  .site-budget-table td:nth-child(7) {
    width: 76px;
  }
}
/* EOF business command spacing. */
:root {
  --sticky-command-gap: 8px;
  --sticky-command-top: calc(var(--topbar-height) + var(--sticky-command-gap));
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-gap) + var(--sticky-command-height) + 16px);
}

body.is-business-page .content {
  padding-top: calc(var(--topbar-height) + var(--sticky-command-gap) + var(--sticky-command-height) + 16px);
}

@media (max-width: 820px) {
  :root {
    --sticky-command-gap: 0px;
  }
}
/* EOF mobile command actions: wrap instead of horizontal dragging. */
@media (max-width: 820px) {
  .module-import-scope {
    display: block;
    overflow: visible;
  }

  .module-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 0;
  }

  .action-step {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .action-step strong {
    max-width: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* EOF paged business tables: rows change by pager, not by inner vertical scroll. */
body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  align-items: stretch;
  overflow: hidden;
}

body.is-business-page .site-budget-main,
body.is-business-page .business-main {
  grid-template-rows: auto auto auto auto;
  align-content: start;
}

body.is-business-page .business-table.table-shell,
body.is-business-page .site-budget-table.table-shell {
  align-self: start;
  min-height: 390px;
  overflow: hidden;
}

body.is-business-page .business-table table,
body.is-business-page .site-budget-table table {
  border-collapse: separate;
  border-spacing: 0;
}

body.is-business-page .business-table th,
body.is-business-page .business-table td,
body.is-business-page .site-budget-table th,
body.is-business-page .site-budget-table td {
  height: 58px;
}

body.is-business-page .business-table th,
body.is-business-page .site-budget-table th {
  height: 42px;
}

body.is-business-page .business-pager,
body.is-business-page .site-budget-pager {
  min-height: 34px;
  margin-top: 10px;
  justify-content: flex-end;
}

body.is-business-page .business-pager button,
body.is-business-page .site-budget-pager button {
  border-radius: 8px;
}

@media (max-width: 820px) {
  body.is-business-page .business-table th,
  body.is-business-page .business-table td,
  body.is-business-page .site-budget-table th,
  body.is-business-page .site-budget-table td {
    height: 54px;
  }

  body.is-business-page .business-pager,
  body.is-business-page .site-budget-pager {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .pager {
    justify-content: flex-start;
  }

  .pager-summary,
  .pagination-control {
    width: 100%;
  }

  .pagination-control {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .pagination-edge {
    min-width: 62px;
  }
}

/* EOF business proportion pass: compact toolbar, wider ledger, lighter inspector. */
:root {
  --sticky-command-height: 52px;
  --sticky-inspector-top: calc(var(--topbar-height) + var(--sticky-command-gap) + var(--sticky-command-height) + 12px);
}

body.is-business-page .content {
  padding-top: calc(var(--topbar-height) + var(--sticky-command-gap) + var(--sticky-command-height) + 12px);
}

body.is-business-page .module-command-bar {
  min-height: var(--sticky-command-height);
  padding: 6px 12px;
}

body.is-business-page .module-command-track {
  min-height: 40px;
  gap: 12px;
}

body.is-business-page .module-maintenance-actions {
  gap: 7px;
  padding-right: 12px;
}

body.is-business-page .module-maintenance-actions > .ghost-button,
body.is-business-page .module-maintenance-actions > .primary-button {
  min-height: 34px;
  padding-inline: 12px;
}

body.is-business-page .module-actions {
  gap: 6px;
}

body.is-business-page .action-step {
  min-height: 34px;
  padding: 4px 9px;
}

body.is-business-page .action-step strong {
  max-width: 78px;
}

body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 21vw, 300px);
  gap: 12px;
  height: calc(100vh - var(--topbar-height) - var(--sticky-command-height) - var(--sticky-command-gap) - 28px);
}

body.is-business-page .site-budget-inspector,
body.is-business-page .business-inspector {
  width: clamp(280px, 21vw, 300px);
  top: var(--sticky-inspector-top);
  padding: 10px 12px;
}

body.is-business-page .business-head,
body.is-business-page .site-budget-head {
  margin-bottom: 8px;
}

body.is-business-page .business-head-actions {
  gap: 7px;
}

body.is-business-page .business-metrics,
body.is-business-page .site-budget-metrics {
  margin-bottom: 8px;
}

body.is-business-page .business-metrics div,
body.is-business-page .site-budget-metrics div {
  padding: 8px 12px;
}

body.is-business-page .business-metrics strong,
body.is-business-page .site-budget-metrics strong {
  margin: 2px 0;
  font-size: 18px;
}

body.is-business-page .business-table.table-shell,
body.is-business-page .site-budget-table.table-shell {
  min-height: 378px;
}

body.is-business-page .business-table th,
body.is-business-page .business-table td,
body.is-business-page .site-budget-table th,
body.is-business-page .site-budget-table td {
  height: 55px;
}

body.is-business-page .business-table th,
body.is-business-page .site-budget-table th {
  height: 40px;
}

@media (max-width: 820px) {
  :root {
    --sticky-command-height: 0px;
  }

  body.is-business-page .module-command-bar {
    padding: 8px 12px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    grid-template-columns: 1fr;
    height: auto;
  }

  body.is-business-page .business-table.table-shell,
  body.is-business-page .site-budget-table.table-shell {
    min-height: 0;
  }
}

/* EOF fixed pager row: pagination stays at the bottom of the ledger pane. */
@media (min-width: 821px) {
  body.is-business-page .site-budget-main,
  body.is-business-page .business-main {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-content: stretch;
  }

  body.is-business-page .business-pager,
  body.is-business-page .site-budget-pager {
    align-self: end;
    margin-top: 10px;
  }
}

/* EOF ledger footer polish: fixed six-row table with attached pager. */
@media (min-width: 821px) {
  body.is-business-page .site-budget-main,
  body.is-business-page .business-main {
    grid-template-rows: auto auto auto auto;
    align-content: start;
  }

  body.is-business-page .business-table.table-shell,
  body.is-business-page .site-budget-table.table-shell {
    min-height: 0;
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  body.is-business-page .business-pager,
  body.is-business-page .site-budget-pager {
    align-self: stretch;
    min-height: 42px;
    margin-top: 0;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--panel);
  }

  body[data-theme="dark"].is-business-page .business-pager,
  body[data-theme="dark"].is-business-page .site-budget-pager {
    border-color: var(--line-dark);
    background: var(--panel);
  }

  body.is-business-page .business-table tbody tr.table-filler-row,
  body.is-business-page .site-budget-table tbody tr.table-filler-row {
    cursor: default;
    pointer-events: none;
  }

  body.is-business-page .business-table .table-filler-row td,
  body.is-business-page .site-budget-table .table-filler-row td {
    height: 55px;
    background: var(--panel);
    color: transparent;
  }

  body.is-business-page .business-table tbody tr,
  body.is-business-page .site-budget-table tbody tr {
    height: 55px;
  }

  body.is-business-page .business-table tbody td,
  body.is-business-page .site-budget-table tbody td {
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.25;
  }
}

@media (max-width: 820px) {
  body.is-business-page .business-table .table-filler-row,
  body.is-business-page .site-budget-table .table-filler-row {
    display: none;
  }
}

/* EOF inspector trim: keep current item fixed without stretching empty space. */
@media (min-width: 821px) {
  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    bottom: auto;
    height: auto;
    max-height: calc(100vh - var(--sticky-inspector-top) - 18px);
    overflow: auto;
  }
}

/* EOF workbench fill: use the available height instead of leaving dead canvas. */
@media (min-width: 821px) {
  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    min-height: min(var(--business-ledger-height, 704px), calc(100vh - var(--sticky-inspector-top) - 18px));
    display: flex;
    flex-direction: column;
  }

  body.is-business-page .business-inspector .inspector-actions,
  body.is-business-page .site-budget-inspector .inspector-actions {
    margin-top: auto;
  }
}

/* EOF exact-height ledger: distribute leftover height into rows instead of canvas. */
@media (min-width: 821px) {
  body.is-business-page .business-table tbody tr,
  body.is-business-page .site-budget-table tbody tr,
  body.is-business-page .business-table tbody td,
  body.is-business-page .site-budget-table tbody td,
  body.is-business-page .business-table .table-filler-row td,
  body.is-business-page .site-budget-table .table-filler-row td {
    height: var(--business-row-height, 55px);
  }
}

/* EOF login replacement: adapted from the supplied animated split login page. */
body.is-login {
  overflow: hidden;
  background: #f7f9fc;
}

body[data-theme="dark"].is-login {
  background: #0d1117;
}

.login-shell {
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  background: #0d1117;
  color: #f5f7fb;
}

body[data-theme="dark"] .login-screen {
  background: #0d1117;
  color: #f5f7fb;
}

/* Silk 整页固定背景(桌面/手机一致),登录卡片居中浮在上面 */
.login-art-panel {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  padding: 0;
  background: #4f5564;
  color: #172033;
}

.login-brand-row,
.login-mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.login-brand-row {
  position: relative;
  z-index: 2;
}

.login-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.login-art-panel .login-brand-mark {
  background: rgba(22, 119, 255, 0.1);
  color: var(--blue);
}

.login-brand-mark .app-icon {
  width: 18px;
  height: 18px;
}

.login-brand-row strong,
.login-mobile-brand strong {
  display: block;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.login-brand-row span,
.login-mobile-brand span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
}

.login-brand-row span {
  color: #667085;
}

.login-art-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  width: min(520px, 100%);
}

.login-art-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: 0;
  text-wrap: balance;
}

.login-art-copy p {
  width: min(430px, 100%);
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.75;
}

.login-visual-stage {
  position: relative;
  z-index: 1;
  width: min(820px, 98%);
  aspect-ratio: 550 / 400;
  transform: translateY(18px);
}

/* Silk 流动着色器视觉:铺满整个登录左侧面板、到边不留白 */
.login-silk-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  transform: none;
  border-radius: 0;
  overflow: hidden;
  background: #4f5564;
  box-shadow: none;
  z-index: 0;
}
.login-silk-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.login-character {
  --look-x: 0px;
  --look-y: 0px;
  --face-x: 0px;
  --face-y: 0px;
  --lean: 0deg;
  position: absolute;
  bottom: 0;
  transform: skewX(var(--lean));
  transform-origin: bottom center;
  transition:
    height 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.login-character-purple {
  left: 12.727%;
  z-index: 1;
  width: 32.727%;
  height: 100%;
  border-radius: 10px 10px 0 0;
  background: #6c3ff5;
}

.login-screen.is-typing .login-character-purple,
.login-screen.has-login-secret:not(.is-password-visible) .login-character-purple {
  height: 110%;
  transform: skewX(calc(var(--lean) - 15deg)) translateX(28%);
}

.login-character-black {
  left: 43.636%;
  z-index: 2;
  width: 21.818%;
  height: 77.5%;
  border-radius: 8px 8px 0 0;
  background: #252833;
}

.login-screen.is-looking-each-other .login-character-black {
  transform: skewX(calc(var(--lean) + 13deg)) translateX(22%);
}

.login-screen.is-typing:not(.is-looking-each-other) .login-character-black,
.login-screen.has-login-secret:not(.is-password-visible) .login-character-black {
  transform: skewX(var(--lean));
}

.login-screen.is-password-visible .login-character-purple,
.login-screen.is-password-visible .login-character-black,
.login-screen.is-password-visible .login-character-orange,
.login-screen.is-password-visible .login-character-yellow {
  transform: skewX(0deg);
}

.login-character-orange {
  left: 0;
  z-index: 3;
  width: 43.636%;
  height: 50%;
  border-radius: 999px 999px 0 0;
  background: #ff9b6b;
}

.login-character-yellow {
  left: 56.364%;
  z-index: 4;
  width: 25.455%;
  height: 57.5%;
  border-radius: 999px 999px 0 0;
  background: #e8d754;
}

.login-eyes {
  position: absolute;
  display: flex;
  align-items: center;
  transform: translate(var(--face-x), var(--face-y));
  transition:
    left 650ms cubic-bezier(0.22, 1, 0.36, 1),
    top 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms ease-out;
}

.login-eyes-purple {
  left: 25%;
  top: 10%;
  gap: 32px;
}

.login-eyes-black {
  left: 21.667%;
  top: 10.323%;
  gap: 24px;
}

.login-eyes-orange {
  left: 34.167%;
  top: 45%;
  gap: 32px;
}

.login-eyes-yellow {
  left: 37.143%;
  top: 17.391%;
  gap: 24px;
}

.login-screen.is-looking-each-other .login-eyes-purple {
  left: 30.556%;
  top: 16.25%;
  transform: none;
}

.login-screen.is-looking-each-other .login-eyes-black {
  left: 26.667%;
  top: 3.871%;
  transform: none;
}

.login-screen.is-password-visible .login-eyes-purple {
  left: 11.111%;
  top: 8.75%;
  transform: none;
}

.login-screen.is-password-visible .login-eyes-black {
  left: 8.333%;
  top: 9.032%;
  transform: none;
}

.login-screen.is-password-visible .login-eyes-orange {
  left: 20.833%;
  top: 42.5%;
  transform: none;
}

.login-screen.is-password-visible .login-eyes-yellow {
  left: 14.286%;
  top: 15.217%;
  transform: none;
}

.login-eye {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  transition: height 150ms ease;
}

.login-eyes-black .login-eye {
  width: 16px;
  height: 16px;
}

.login-screen.is-purple-blinking .login-eyes-purple .login-eye,
.login-screen.is-black-blinking .login-eyes-black .login-eye {
  height: 2px;
}

.login-screen.is-purple-blinking .login-eyes-purple .login-pupil,
.login-screen.is-black-blinking .login-eyes-black .login-pupil {
  opacity: 0;
}

.login-pupil,
.login-dot-eye {
  display: block;
  border-radius: 50%;
  background: #252833;
}

.login-pupil {
  width: 7px;
  height: 7px;
  transform: translate(calc(var(--look-x) * 0.55), calc(var(--look-y) * 0.55));
  transition: transform 100ms ease-out, opacity 100ms ease;
}

.login-dot-eye {
  width: 12px;
  height: 12px;
  transform: translate(calc(var(--look-x) * 0.6), calc(var(--look-y) * 0.6));
  transition: transform 100ms ease-out;
}

.login-screen.is-looking-each-other .login-eyes-purple .login-pupil {
  transform: translate(3px, 4px);
}

.login-screen.is-looking-each-other .login-eyes-black .login-pupil {
  transform: translate(0, -4px);
}

.login-screen.is-password-visible .login-eyes-purple .login-pupil {
  transform: translate(-4px, -4px);
}

.login-screen.is-password-visible.is-purple-peeking .login-eyes-purple .login-pupil {
  transform: translate(4px, 5px);
}

.login-screen.is-password-visible .login-eyes-black .login-pupil,
.login-screen.is-password-visible .login-dot-eye {
  transform: translate(-5px, -4px);
}

.login-mouth {
  position: absolute;
  left: 28.571%;
  top: 38.261%;
  width: 57.143%;
  height: 4px;
  border-radius: 999px;
  background: #252833;
  transform: translate(var(--face-x), var(--face-y));
  transition: transform 180ms ease-out;
}

.login-screen.is-password-visible .login-mouth {
  left: 7.143%;
  top: 38.261%;
  transform: none;
}

.login-art-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-art-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.login-form-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 34px;
  background: transparent;
}

body[data-theme="dark"] .login-form-panel {
  background: transparent;
}

.login-mobile-brand {
  display: none;
  width: min(420px, 100%);
  margin-bottom: 34px;
  color: #f5f7fb;
}

.login-mobile-brand .login-brand-mark {
  background: rgba(255, 255, 255, 0.08);
  color: #69b1ff;
}

.login-mobile-brand span {
  color: #aab4c5;
}

body[data-theme="dark"] .login-mobile-brand {
  color: #f5f7fb;
}

body[data-theme="dark"] .login-mobile-brand span {
  color: #aab4c5;
}

.login-auth-card {
  position: relative;
  width: min(440px, 100%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 100%);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  padding: clamp(26px, 4vw, 38px) clamp(22px, 3.5vw, 34px);
  box-shadow:
    0 40px 100px -36px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 0 60px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
/* 顶部一道流光高光,强化液态玻璃质感 */
.login-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* GlassSurface(SVG 位移滤镜)真·液态玻璃:折射 + 色散边缘,覆盖上面的简单模糊 */
.login-auth-card.glass-svg {
  background: hsl(0 0% 100% / var(--glass-frost, 0));
  -webkit-backdrop-filter: var(--filter-id, none) saturate(var(--glass-sat, 1));
  backdrop-filter: var(--filter-id, none) saturate(var(--glass-sat, 1));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 2px 1px rgba(255, 255, 255, 0.4) inset,
    0 0 14px 4px rgba(255, 255, 255, 0.12) inset,
    0 24px 70px -28px rgba(0, 0, 0, 0.55);
}
.login-auth-card.glass-svg::before {
  display: none;
}
.login-auth-card > * {
  position: relative;
  z-index: 1;
}

.login-auth-head {
  margin-bottom: 28px;
  text-align: center;
}

.login-auth-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.login-auth-head h2 {
  margin: 14px 0 8px;
  color: #f7f9fc;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-auth-head p {
  margin: 0;
  color: #98a2b3;
  font-size: 14px;
}

body[data-theme="dark"] .login-auth-head h2 {
  color: #f5f7fb;
}

body[data-theme="dark"] .login-auth-head p {
  color: #aab4c5;
}

.login-auth-card .login-form {
  display: grid;
  align-content: stretch;
  gap: 15px;
  padding: 0;
}

.login-auth-card .login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid #263044;
  border-radius: 10px;
  background: #111827;
}

.login-auth-card .login-tabs button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aab4c5;
  font-weight: 800;
  cursor: pointer;
}

.login-auth-card .login-tabs button.is-active {
  color: #fff;
  border-bottom: 0;
  background: var(--blue);
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field > span,
.login-options,
.login-options .text-button {
  font-size: 13px;
}

.login-field > span {
  color: #d8deea;
  font-weight: 750;
}

.login-input-frame {
  position: relative;
}

.login-auth-card .login-input-frame input,
.login-auth-card .login-input-frame select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  color: #f5f7fb;
  font-size: 15px;
  box-shadow: none;
}

.login-auth-card .login-input-frame input::placeholder {
  color: #aab4c5;
  opacity: 1;
}

.login-auth-card .login-input-frame input:focus,
.login-auth-card .login-input-frame select:focus {
  outline: 3px solid rgba(22, 119, 255, 0.16);
  border-color: var(--blue);
}

.login-auth-card #loginSecretRow input {
  padding-right: 46px;
}

.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aab4c5;
  transform: translateY(-50%);
  cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: var(--blue);
  background: rgba(22, 119, 255, 0.08);
  outline: none;
}

.login-password-toggle .app-icon {
  width: 18px;
  height: 18px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d8deea;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.login-options input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.login-options .text-button {
  color: var(--blue);
  font-weight: 800;
}

.login-submit.primary-button,
.login-wechat.ghost-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 850;
}

.login-submit.primary-button {
  box-shadow: 0 4px 8px rgba(22, 119, 255, 0.18);
}

.login-wechat.ghost-button {
  justify-content: center;
  border-color: #293141;
  background: #0c111b;
  color: #f5f7fb;
}

.login-auth-card .login-or {
  margin: 0;
  color: #788399;
}

.login-auth-card .login-notice {
  margin-bottom: 16px;
  border-radius: 8px;
  border-color: rgba(255, 159, 10, 0.38);
  background: rgba(255, 159, 10, 0.12);
}

.login-auth-card .login-notice,
.login-auth-card .login-notice strong,
.login-auth-card .login-notice span {
  color: #ffd79a;
}

.login-footer {
  width: min(420px, 100%);
  margin: 30px 0 0;
  color: #788399;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

body[data-theme="dark"] .login-auth-card .login-tabs {
  border-color: #293141;
  background: #151b24;
}

body[data-theme="dark"] .login-auth-card .login-tabs button {
  color: #aab4c5;
}

body[data-theme="dark"] .login-auth-card .login-tabs button.is-active {
  color: #fff;
}

body[data-theme="dark"] .login-field > span,
body[data-theme="dark"] .login-options {
  color: #d8deea;
}

body[data-theme="dark"] .login-auth-card .login-input-frame input,
body[data-theme="dark"] .login-auth-card .login-input-frame select {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  color: #f5f7fb;
}
body[data-theme="dark"] .login-wechat.ghost-button {
  border-color: #293141;
  background: #11151d;
  color: #f5f7fb;
}

body[data-theme="dark"] .login-auth-card .login-input-frame input::placeholder {
  color: #aab4c5;
}

body[data-theme="dark"] .login-footer,
body[data-theme="dark"] .login-auth-card .login-or {
  color: #8792a5;
}

.login-reference-form {
  gap: 18px;
}

.login-reference-form + * {
  display: none;
}

.login-auth-card:has(.login-reference-form) {
  width: min(480px, 100%);
}

.login-auth-card:has(.login-reference-form) .login-auth-head {
  margin-bottom: 42px;
  text-align: center;
}

.login-auth-card:has(.login-reference-form) .login-auth-head h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.login-auth-card:has(.login-reference-form) .login-auth-head p {
  color: #a6a8ad;
  font-size: 15px;
  font-weight: 650;
}

.login-reference-form .login-field {
  gap: 8px;
}

.login-reference-form .login-field > span {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.login-reference-form .login-input-frame input,
.login-reference-form .login-input-frame select {
  height: 50px;
  min-height: 50px;
  border-color: #202227;
  border-radius: 8px;
  padding: 0 16px;
  background: #090a0c;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 650;
}

.login-reference-form .login-input-frame input::placeholder {
  color: #a6a8ad;
}

.login-reference-form #loginSecretRow input {
  padding-right: 50px;
}

.login-reference-form .login-password-toggle {
  right: 8px;
  width: 36px;
  height: 36px;
  color: #a6a8ad;
}

.login-reference-form .login-password-toggle .app-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.4px;
}

.login-reference-form .login-options {
  margin-top: 2px;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 750;
}

.login-reference-form .login-options label {
  gap: 9px;
}

.login-reference-form .login-options input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: #f4f4f5;
}

.login-reference-form .login-options .text-button {
  color: #f4f4f5;
  font-size: 15px;
  font-weight: 850;
}

.login-reference-form .login-submit.primary-button {
  min-height: 52px;
  margin-top: 8px;
  border: 1px solid #f4f4f5;
  border-radius: 8px;
  background: #f4f4f5;
  color: #111;
  font-size: 16px;
  font-weight: 850;
  box-shadow: none;
}

.login-reference-form .login-submit.primary-button:hover,
.login-reference-form .login-submit.primary-button:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: #111;
}

.login-reference-form .login-wechat.ghost-button {
  min-height: 52px;
  gap: 10px;
  border-color: #202227;
  border-radius: 8px;
  background: #090a0c;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 850;
}

.login-reference-form .login-wechat .app-icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.4px;
}

.login-signup {
  margin: 14px 0 0;
  color: #a6a8ad;
  font-size: 15px;
  font-weight: 650;
  text-align: center;
}

.login-signup span {
  color: #f8fafc;
  font-weight: 900;
}

@keyframes loginBlink {
  0%,
  46%,
  50%,
  100% {
    transform: scaleY(1);
  }

  48% {
    transform: scaleY(0.12);
  }
}

@media (max-width: 980px) {
  body.is-login {
    overflow: auto;
  }

  .login-screen {
    width: 100%;
    grid-template-columns: 1fr;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* 手机端:Silk 整页背景由基础样式提供,这里只调表单内边距 */
  .login-form-panel {
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    padding: 28px 18px;
  }

  .login-mobile-brand,
  .login-auth-card,
  .login-footer {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .login-mobile-brand {
    display: flex;
  }

  .login-auth-card .login-tabs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .login-auth-card .login-tabs button {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 460px) {
  .login-auth-head {
    margin-bottom: 22px;
    text-align: left;
  }

  .login-auth-head h2 {
    font-size: 26px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-character,
  .login-eyes,
  .login-pupil,
  .login-dot-eye,
  .login-mouth,
  .login-eye {
    animation: none !important;
    transition: none !important;
  }
}

/* Sidebar reference pass: dark detail navigation. */
:root {
  --sidebar-width: 218px;
}

.sidebar.prototype-sidebar,
body[data-theme="dark"] .sidebar.prototype-sidebar {
  width: var(--sidebar-width);
  display: flex;
  padding: 0;
  overflow: hidden;
  border-right: 1px solid #151b25;
  background: #050608;
  color: #f8fafc;
  backdrop-filter: none;
}

/* 日间模式:浅色磨砂玻璃侧栏(白玻璃 + 文字/图标转深色,激活蓝项不变) */
body:not([data-theme="dark"]) .sidebar.prototype-sidebar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.18) 100%);
  -webkit-backdrop-filter: blur(40px) saturate(185%);
  backdrop-filter: blur(40px) saturate(185%);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset -1px 0 0 rgba(255, 255, 255, 0.25),
    0 12px 44px -22px rgba(15, 23, 42, 0.22);
  color: #1d2433;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .sidebar-panel {
  background: transparent;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .brand {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
/* 导航文字 / 图标转深色 */
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-module:not(.is-active) {
  color: #2a3340;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-module:not(.is-active) strong {
  color: #1d2433;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-module:not(.is-active) em {
  color: #6b7486;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-module:not(.is-active) .nav-icon {
  color: #5b6472;
  background: rgba(15, 23, 42, 0.05);
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-section-title {
  color: #6b7486;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .nav-module:not(.is-active):hover {
  background: rgba(15, 23, 42, 0.05);
}
/* 顶部用户区转浅色 */
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .global-user-status {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .global-user-status strong {
  color: #1d2433;
}
body:not([data-theme="dark"]) .sidebar.prototype-sidebar .global-user-status em {
  color: #6b7486;
}

.sidebar-panel {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #07080b;
}

.sidebar.prototype-sidebar .brand {
  height: auto;
  flex: 0 0 auto;
  gap: 11px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #171d27;
  color: #f8fafc;
}

.sidebar.prototype-sidebar .brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid #242b38;
  border-radius: 10px;
  background: #111722;
  color: #f8fafc;
  font-size: 16px;
}

.sidebar.prototype-sidebar .brand-name {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
}

.sidebar.prototype-sidebar .brand-sub {
  color: #7b8496;
  font-size: 12px;
}

.sidebar.prototype-sidebar .nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 12px 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar.prototype-sidebar .nav::-webkit-scrollbar {
  display: none;
}

.sidebar-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 9px;
  border: 1px solid #202838;
  border-radius: 12px;
  background: #0b0e14;
}

.sidebar-search-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #8792a6;
}

.sidebar-search-icon .app-icon {
  width: 17px;
  height: 17px;
}

.sidebar-search input {
  min-width: 0;
  height: 26px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 13px;
}

.sidebar-search input::placeholder {
  color: #697386;
  opacity: 1;
}

.sidebar-search button {
  min-width: 42px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #080b10;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-search:focus-within {
  border-color: #3b82f6;
  background: #0e1420;
}

.sidebar.prototype-sidebar .nav-section {
  margin-bottom: 18px;
}

.sidebar.prototype-sidebar .nav-section-title {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #697386;
  font-size: 12px;
  font-weight: 750;
}

.sidebar.prototype-sidebar .nav-module {
  min-height: 42px;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  gap: 10px;
  margin-bottom: 6px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #d9dee8;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sidebar.prototype-sidebar .nav-module:hover,
.sidebar.prototype-sidebar .nav-module:focus-visible {
  outline: none;
  background: #121720;
}

.sidebar.prototype-sidebar .nav-module .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #111722;
  color: #a3aec1;
}

.sidebar.prototype-sidebar .nav-module strong {
  overflow: hidden;
  color: #f3f6fb;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.prototype-sidebar .nav-module em {
  margin-top: 2px;
  color: #687386;
  font-size: 11px;
  line-height: 1.2;
}

.sidebar.prototype-sidebar .nav-module.is-active,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active {
  border-color: #2b3342;
  background: #171c25;
  box-shadow: none;
  color: #fff;
}

.sidebar.prototype-sidebar .nav-module.is-active .nav-icon,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active .nav-icon {
  background: #f8fafc;
  color: #090b10;
}

@media (max-width: 1280px) {
  .app-shell {
    --sidebar-width: 252px;
  }
}

@media (max-width: 820px) {
  .sidebar.prototype-sidebar,
  body[data-theme="dark"] .sidebar.prototype-sidebar,
  body.is-home-page .sidebar.prototype-sidebar {
    width: auto;
    height: auto;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #07080b;
  }

  .sidebar-panel {
    background: #07080b;
  }

  .sidebar.prototype-sidebar .brand {
    padding: 10px 14px;
  }

  .sidebar.prototype-sidebar .nav {
    display: flex;
    gap: 8px;
    padding: 8px 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar.prototype-sidebar .nav-section {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
  }

  .sidebar.prototype-sidebar .nav-section-title {
    display: none;
  }

  .sidebar.prototype-sidebar .nav-module {
    width: auto;
    min-width: 156px;
    grid-template-columns: 32px minmax(0, 1fr);
  }

}

/* Right inspector: adapted from the supplied tabbed feature component. */
body.is-business-page .site-budget-workbench,
body.is-business-page .business-workbench {
  grid-template-columns: minmax(0, 1fr) clamp(318px, 23vw, 360px);
}

body.is-business-page .site-budget-inspector,
body.is-business-page .business-inspector {
  width: clamp(318px, 23vw, 360px);
}

.feature-inspector {
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
}

.inspector-tabs {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px;
  border-radius: 10px;
  background: var(--soft);
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.inspector-tab {
  min-width: 0;
  min-height: 32px;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  outline-offset: 2px;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.inspector-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tab:hover,
.inspector-tab:focus-visible {
  color: var(--ink);
}

.inspector-tab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 70%, transparent);
}

.inspector-tab.is-active {
  border-color: transparent;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.inspector-feature-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--soft) 82%, var(--panel));
}

.feature-inspector .inspector-head {
  padding: 0 0 8px;
}

.inspector-hero {
  display: grid;
  gap: 6px;
}

.inspector-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feature-inspector .inspector-hero h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
  text-wrap: balance;
}

.feature-inspector .inspector-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.inspector-kv-feature {
  background: var(--panel);
}

.inspector-kv-feature div {
  padding: 10px;
}

.inspector-kv-feature strong {
  font-size: 14px;
}

.inspector-process-feature {
  display: grid;
  gap: 10px;
}

.inspector-step-list {
  display: grid;
  gap: 6px;
}

.inspector-step-list span {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.inspector-step-list em {
  width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--blue) 8%, var(--soft));
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.inspector-step-list .is-done,
.inspector-step-list .is-current {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  color: var(--ink);
}

.inspector-step-list .is-current {
  background: color-mix(in srgb, var(--blue) 7%, var(--panel));
}

.inspector-note-feature {
  min-height: 112px;
  padding: 12px;
  background: var(--panel);
}

.feature-inspector .inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feature-inspector .inspector-actions .primary-button {
  grid-column: 1 / -1;
}

@media (min-width: 821px) {
  body.is-business-page .site-budget-inspector.feature-inspector,
  body.is-business-page .business-inspector.feature-inspector {
    min-height: 0;
    align-self: start;
  }

  body.is-business-page .feature-inspector .inspector-actions {
    margin-top: 0;
  }
}

body[data-theme="dark"] .inspector-feature-card,
body[data-theme="dark"] .inspector-badge,
body[data-theme="dark"] .inspector-step-list span,
body[data-theme="dark"] .inspector-kv-feature,
body[data-theme="dark"] .inspector-note-feature {
  border-color: var(--line-dark);
}

body[data-theme="dark"] .inspector-tabs {
  background: #0b111a;
}

body[data-theme="dark"] .inspector-tab.is-active {
  background: #151d29;
  color: #f3f7fb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1280px) {
  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    grid-template-columns: minmax(0, 1fr) 318px;
  }

  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    width: 318px;
  }
}

@media (max-width: 820px) {
  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    grid-template-columns: 1fr;
  }

  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    width: 100%;
  }
}

/* Sidebar compact pass: narrower width and quieter menu markers. */
:root {
  --sidebar-width: 220px;
}

.sidebar.prototype-sidebar .brand {
  gap: 10px;
  padding: 14px 14px 12px;
}

.sidebar.prototype-sidebar .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 15px;
}

.sidebar.prototype-sidebar .brand-name {
  font-size: 14px;
}

.sidebar.prototype-sidebar .nav {
  padding: 10px 10px 14px;
}

.sidebar.prototype-sidebar .nav-section {
  margin-bottom: 14px;
}

.sidebar.prototype-sidebar .nav-section-title {
  height: 24px;
  padding-inline: 8px;
  font-size: 11px;
}

.sidebar.prototype-sidebar .nav-module {
  min-height: 36px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 4px;
  padding: 6px 8px;
  border-radius: 9px;
}

.sidebar.prototype-sidebar .nav-module .nav-icon,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module .nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: #7c8798;
}

.sidebar-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar.prototype-sidebar .nav-module strong {
  font-size: 13px;
  line-height: 1.25;
}

.sidebar.prototype-sidebar .nav-module em {
  margin-top: 1px;
  font-size: 10.5px;
}

.sidebar.prototype-sidebar .nav-module.is-active,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active {
  background: #171c25;
}

.sidebar.prototype-sidebar .nav-module.is-active .nav-icon,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active .nav-icon {
  background: transparent;
  color: var(--blue);
}

@media (max-width: 1280px) {
  .app-shell {
    --sidebar-width: 216px;
  }
}

@media (max-width: 820px) {
  .sidebar.prototype-sidebar .nav-module {
    min-width: 132px;
    grid-template-columns: 22px minmax(0, 1fr);
  }
}

/* Shadcn-style workflow tabs for the top action row. */
.module-actions {
  width: 100%;
  gap: 0;
  padding: 2px;
  border-radius: 10px;
  background: var(--soft);
}

.action-step,
body.is-business-page .action-step {
  min-height: 32px;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: none !important;
}

body[data-theme="dark"] .action-step {
  border-color: transparent;
  background: transparent;
}

.action-step:hover,
.action-step:focus-visible {
  outline: none;
  border-color: transparent;
  background: color-mix(in srgb, var(--panel) 90%, var(--soft));
  color: var(--ink);
  box-shadow: none;
  transform: none !important;
}

.action-step:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 70%, transparent);
  outline-offset: 2px;
}

.action-step.is-default {
  background: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

.action-step-index b {
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--blue) 8%, var(--soft));
  color: var(--blue);
}

.action-step strong,
body.is-business-page .action-step strong {
  max-width: none;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.action-step span:not(.action-step-index) {
  display: none;
}

body[data-theme="dark"] .module-actions {
  background: #0b111a;
}

body[data-theme="dark"] .action-step:hover,
body[data-theme="dark"] .action-step:focus-visible,
body[data-theme="dark"] .action-step.is-default {
  background: #151d29 !important;
  color: #f3f7fb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28) !important;
}

body[data-theme="dark"] .action-step-index b {
  background: #10243d;
  color: #5ca2ff;
}

@media (max-width: 820px) {
  .module-actions {
    display: flex;
    overflow-x: auto;
  }

  .action-step {
    width: auto;
  }
}

/* Material Dashboard 3 reference pass: light workspace, elevated sheets, calmer hierarchy. */
:root {
  --blue: #1a73e8;
  --blue-strong: #1558b0;
  --green: #2e7d32;
  --red: #d32f2f;
  --amber: #f57c00;
  --ink: #344767;
  --muted: #67748e;
  --weak: #8b97aa;
  --line: #e1e7ef;
  --line-dark: #d6dee9;
  --canvas: #f0f2f5;
  --panel: #ffffff;
  --soft: #f8f9fa;
  --hover: #eef4ff;
  --radius: 12px;
  --radius-sm: 10px;
  --sidebar-width: 220px;
  --material-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  --material-shadow-raised: 0 8px 18px rgba(15, 23, 42, 0.1);
}

body[data-theme="dark"] {
  --blue: #49a3f1;
  --blue-strong: #6bb6ff;
  --green: #66bb6a;
  --red: #ef5350;
  --amber: #ffa726;
  --ink: #f5f7fb;
  --muted: #b9c4d3;
  --weak: #8a97aa;
  --line: #2a3444;
  --line-dark: #364458;
  --canvas: #111827;
  --panel: #172033;
  --soft: #202b3d;
  --hover: #22344f;
  --material-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  --material-shadow-raised: 0 10px 22px rgba(0, 0, 0, 0.32);
}

html,
body {
  background: var(--canvas);
  color: var(--ink);
}

body:not(.is-login) {
  background:
    radial-gradient(circle at 74% -120px, rgba(26, 115, 232, 0.08), transparent 330px),
    var(--canvas);
}

h1 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0;
}

.breadcrumb,
.brand-sub,
.nav-module em,
.global-user-status em,
.panel-head p,
.management-subtitle,
.business-metrics span,
.site-budget-metrics span,
.inspector-hero p,
.inspector-kv span,
.inspector-next span,
.pager,
.table-meta {
  color: var(--muted);
}

.primary-button {
  border: 0;
  background: linear-gradient(195deg, #49a3f1, var(--blue));
  color: #fff;
  box-shadow: 0 3px 7px rgba(26, 115, 232, 0.26);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(195deg, #5aaff7, var(--blue-strong));
  box-shadow: 0 4px 9px rgba(26, 115, 232, 0.3);
}

.ghost-button,
.danger-button,
.icon-button,
.text-button,
.link-button,
.pager button,
.tabs button {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.ghost-button:hover,
.ghost-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.pager button:hover,
.pager button:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: color-mix(in srgb, var(--blue) 6%, var(--panel));
  color: var(--blue);
}

input,
select,
textarea,
.head-filter-form input,
.head-filter-form select,
.filter-row input,
.filter-row select,
.login-form input,
.login-form select,
.search-panel input,
.menu-search input {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--blue) 28%, transparent);
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line));
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
}

.panel,
.module-command-bar,
.table-shell,
.business-inspector,
.site-budget-inspector,
.account-table-panel,
.org-table-panel,
.employee-table-panel,
.role-table-panel,
.partner-table-panel,
.material-table-panel,
.warehouse-table-panel,
.fund-table-panel,
.subject-table-panel,
.flow-config-panel,
.system-settings-panel,
.account-create-panel,
.account-filter-panel,
.org-create-panel,
.org-filter-panel,
.employee-create-panel,
.employee-filter-panel,
.role-create-panel,
.role-filter-panel,
.partner-create-panel,
.partner-filter-panel,
.material-create-panel,
.material-filter-panel,
.warehouse-create-panel,
.warehouse-filter-panel,
.fund-create-panel,
.fund-filter-panel,
.subject-create-panel,
.subject-filter-panel,
.home-work-list,
.home-project-list,
.home-risk-list,
.home-ops-grid,
.home-finance-grid,
.project-overview-strip,
.site-overview-strip,
.finance-workbench-panel .finance-overview,
.finance-workbench-nav,
.invoice-ledger-list,
.bookkeeping-list,
.contract-ledger-list,
.contract-lifecycle-list,
.signing-platform-list,
.payment-schedule-list,
.material-ledger-list,
.price-list-list,
.visa-summary-list,
.debt-summary-list,
.legal-risk-list,
.contract-warning-list,
.todo-summary-grid,
.smart-reminder-summary-grid,
.message-summary-grid,
.collaboration-summary-grid,
.data-summary-grid,
.flow-summary-grid,
.archive-summary-grid,
.recycle-summary-grid,
.audit-summary-grid,
.drawer-panel {
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--material-shadow);
}

.panel,
.account-create-panel,
.account-filter-panel,
.org-create-panel,
.org-filter-panel,
.employee-create-panel,
.employee-filter-panel,
.role-create-panel,
.role-filter-panel,
.partner-create-panel,
.partner-filter-panel,
.material-create-panel,
.material-filter-panel,
.warehouse-create-panel,
.warehouse-filter-panel,
.fund-create-panel,
.fund-filter-panel,
.subject-create-panel,
.subject-filter-panel {
  padding: 14px;
}

.module-command-bar {
  box-shadow: var(--material-shadow-raised);
}

.module-actions {
  background: #f3f6fb;
  border-radius: 12px;
}

.action-step,
body.is-business-page .action-step {
  border-radius: 10px;
  color: var(--muted);
}

.action-step:hover,
.action-step:focus-visible {
  background: var(--panel);
  color: var(--ink);
}

.action-step.is-default {
  background: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1) !important;
}

.action-step-index b {
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 10%, #eef4ff);
  color: var(--blue);
}

.module-maintenance-actions {
  border-right-color: var(--line);
}

.business-metrics,
.site-budget-metrics {
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--material-shadow);
  overflow: hidden;
}

.business-metrics div,
.site-budget-metrics div {
  border-color: var(--line);
  background: transparent;
}

.business-metrics strong,
.site-budget-metrics strong,
.management-metrics strong,
.home-kpi-cell strong {
  color: var(--ink);
  letter-spacing: 0;
}

th {
  background: #f8f9fa;
  color: var(--muted);
  font-weight: 800;
}

td {
  color: var(--ink);
}

tbody tr {
  background: var(--panel);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}

.business-table tbody tr.is-selected,
.site-budget-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
}

.table-shell .row-actions .link-button,
.account-row-actions .link-button,
.org-row-actions .link-button,
.employee-row-actions .link-button,
.role-row-actions .link-button,
.partner-row-actions .link-button,
.material-row-actions .link-button,
.warehouse-row-actions .link-button,
.fund-row-actions .link-button,
.subject-row-actions .link-button,
.flow-config-row-actions .link-button {
  background: transparent;
  color: var(--blue);
}

.status-tag {
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
}

.status-tag.is-success,
.status-tag.success,
.status-tag.done {
  background: #e7f5ec;
  color: #1b7f3a;
}

.status-tag.is-warning,
.status-tag.warning,
.status-tag.pending {
  background: #fff3e0;
  color: #b55b00;
}

.status-tag.is-danger,
.status-tag.danger,
.status-tag.risk {
  background: #ffebee;
  color: #c62828;
}

.inspector-tabs {
  background: #f3f6fb;
  border-radius: 12px;
}

.inspector-tab {
  border-radius: 10px;
}

.inspector-tab.is-active {
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.inspector-kv,
.inspector-next,
.inspector-note,
.inspector-kv-feature,
.inspector-note-feature,
.inspector-step-list span {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
}

body[data-theme="dark"] .module-actions,
body[data-theme="dark"] .inspector-tabs {
  background: #202b3d;
}

body[data-theme="dark"] th {
  background: #202b3d;
  color: #c8d3e4;
}

body[data-theme="dark"] .status-tag {
  background: #263244;
  color: #c8d3e4;
}

body[data-theme="dark"] .status-tag.is-success,
body[data-theme="dark"] .status-tag.success,
body[data-theme="dark"] .status-tag.done {
  background: rgba(102, 187, 106, 0.16);
  color: #9de29f;
}

body[data-theme="dark"] .status-tag.is-warning,
body[data-theme="dark"] .status-tag.warning,
body[data-theme="dark"] .status-tag.pending {
  background: rgba(255, 167, 38, 0.16);
  color: #ffc36b;
}

body[data-theme="dark"] .status-tag.is-danger,
body[data-theme="dark"] .status-tag.danger,
body[data-theme="dark"] .status-tag.risk {
  background: rgba(239, 83, 80, 0.16);
  color: #ffaaa8;
}

@media (min-width: 821px) {
  .sidebar.prototype-sidebar,
  body[data-theme="dark"] .sidebar.prototype-sidebar {
    left: 8px;
    top: 8px;
    bottom: 8px;
    height: calc(100vh - 16px);
    width: var(--sidebar-width);
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: var(--material-shadow-raised);
  }

  body[data-theme="dark"] .sidebar.prototype-sidebar {
    background: #111827;
  }

  .sidebar-panel,
  body[data-theme="dark"] .sidebar-panel {
    border-radius: inherit;
    background: transparent;
  }

  .sidebar.prototype-sidebar .brand {
    padding: 16px 14px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  body[data-theme="dark"] .sidebar.prototype-sidebar .brand {
    border-bottom-color: var(--line-dark);
    color: var(--ink);
  }

  .sidebar.prototype-sidebar .brand-mark {
    border: 0;
    background: linear-gradient(195deg, #49a3f1, var(--blue));
    color: #fff;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.22);
  }

  .sidebar.prototype-sidebar .brand-name,
  .sidebar.prototype-sidebar .nav-module strong {
    color: var(--ink);
  }

  .sidebar.prototype-sidebar .brand-sub,
  .sidebar.prototype-sidebar .nav-section-title,
  .sidebar.prototype-sidebar .nav-module em {
    color: var(--muted);
  }

  .sidebar.prototype-sidebar .nav {
    padding: 14px 10px 16px;
  }

  .sidebar.prototype-sidebar .nav-module {
    min-height: 38px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 5px;
    padding: 7px 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
  }

  .sidebar.prototype-sidebar .nav-module:hover,
  .sidebar.prototype-sidebar .nav-module:focus-visible {
    background: color-mix(in srgb, var(--ink) 5%, var(--panel));
  }

  .sidebar.prototype-sidebar .nav-module .nav-icon,
  body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module .nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
  }

  .sidebar.prototype-sidebar .nav-module.is-active,
  body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active {
    background: linear-gradient(195deg, #49a3f1, var(--blue));
    color: #fff;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.24);
  }

  .sidebar.prototype-sidebar .nav-module.is-active strong,
  .sidebar.prototype-sidebar .nav-module.is-active em,
  .sidebar.prototype-sidebar .nav-module.is-active .nav-icon,
  body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active strong,
  body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active em,
  body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active .nav-icon {
    color: #fff;
  }

  .workspace {
    margin-left: calc(var(--sidebar-width) + 24px);
  }

  .topbar,
  body[data-theme="dark"] .topbar {
    left: calc(var(--sidebar-width) + 24px);
    right: 14px;
    border-bottom: 0;
    background: color-mix(in srgb, var(--canvas) 86%, transparent);
    backdrop-filter: blur(14px);
  }

  .top-actions .icon-button,
  .top-actions .ghost-button,
  .global-user-status {
    border: 0;
    background: var(--panel);
    box-shadow: var(--material-shadow);
  }

  .content {
    padding: calc(var(--topbar-height) + 16px) 24px 28px 16px;
  }

  body.is-home-page .content {
    padding: calc(var(--topbar-height) + 16px) 24px 18px 16px;
  }

  .home-dashboard {
    grid-template-rows: 86px auto minmax(0, 1fr) 66px;
  }

  .home-user-line,
  .home-kpi-cell {
    gap: 4px;
    padding: 12px 12px;
  }

  body.is-business-page .content {
    padding: calc(var(--topbar-height) + var(--sticky-command-gap) + var(--sticky-command-height) + 18px) 24px 18px 16px;
  }

  body.is-business-page .module-command-bar,
  .module-command-bar {
    left: calc(var(--sidebar-width) + 40px);
    right: 24px;
    border-radius: 14px;
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 330px);
    gap: 14px;
  }

  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    width: clamp(300px, 22vw, 330px);
  }

  body.is-business-page .business-table .table-filler-row,
  body.is-business-page .site-budget-table .table-filler-row {
    display: none !important;
  }

  body.is-business-page .business-table.table-shell,
  body.is-business-page .site-budget-table.table-shell {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .sidebar.prototype-sidebar,
  body[data-theme="dark"] .sidebar.prototype-sidebar {
    border-radius: 0;
    box-shadow: none;
  }

  .module-command-bar,
  body.is-business-page .module-command-bar {
    border-radius: 0;
    box-shadow: var(--material-shadow);
  }
}

/* Header removal pass: global tools live at the lower-left sidebar. */
:root {
  --topbar-height: 0px;
  --sticky-command-top: var(--sticky-command-gap);
  --sticky-inspector-top: calc(var(--sticky-command-gap) + var(--sticky-command-height) + 12px);
}

body:not(.is-login) .topbar {
  display: none !important;
}

.sidebar-tools {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.sidebar-panel {
  min-height: 100%;
  height: 100%;
}

body[data-theme="dark"] .sidebar-tools {
  border-top-color: var(--line-dark);
}

.sidebar-tools .top-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: stretch;
}
.sidebar-tools .theme-row { display: flex; justify-content: center; margin-top: 10px; }

.sidebar-tools .top-actions .icon-button,
.sidebar-tools .top-actions .ghost-button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, var(--panel));
  color: var(--ink);
  box-shadow: none;
  transform: none !important;
}

.sidebar-tools .top-actions .icon-button:hover,
.sidebar-tools .top-actions .icon-button:focus-visible,
.sidebar-tools .top-actions .ghost-button:hover,
.sidebar-tools .top-actions .ghost-button:focus-visible {
  background: color-mix(in srgb, var(--blue) 11%, var(--panel));
  color: var(--blue);
}

.sidebar-tools .top-work-button {
  grid-column: 1 / -1;
  justify-content: center;
  padding: 0 22px 0 10px;
}

.sidebar-tools .top-work-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tools .top-tool-button {
  padding: 0 10px;
}

.sidebar-tools .theme-toggle {
  grid-column: 2;
  grid-row: 2;
}

.sidebar-tools .top-tool-button {
  grid-column: 1;
  grid-row: 2;
}

.sidebar-tools .global-user-status {
  width: 100%;
  min-height: 42px;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 5%, var(--panel));
  box-shadow: none;
}

.sidebar-tools .global-user-status strong,
.sidebar-tools .global-user-status em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tools .global-user-status strong {
  max-width: 58px;
}

.sidebar-tools .global-user-status em {
  max-width: 54px;
}

.sidebar-tools .global-user-status .link-button {
  margin-left: auto;
  padding-inline: 6px;
}

body[data-theme="dark"] .sidebar-tools .top-actions .icon-button,
body[data-theme="dark"] .sidebar-tools .top-actions .ghost-button,
body[data-theme="dark"] .sidebar-tools .global-user-status {
  background: #202b3d;
  color: var(--ink);
}

@media (min-width: 821px) {
  .content {
    padding: 16px 24px 28px 16px;
  }

  body.is-home-page .content {
    padding: 16px 24px 18px 16px;
  }

  body.is-business-page .content {
    padding: calc(var(--sticky-command-gap) + var(--sticky-command-height) + 18px) 24px 18px 16px;
  }

  body.is-business-page .module-command-bar,
  .module-command-bar {
    top: var(--sticky-command-top);
  }

  body.is-business-page .site-budget-workbench,
  body.is-business-page .business-workbench {
    height: calc(100vh - var(--sticky-command-height) - var(--sticky-command-gap) - 28px);
  }

  body.is-business-page .site-budget-inspector,
  body.is-business-page .business-inspector {
    top: var(--sticky-inspector-top);
    max-height: calc(100vh - var(--sticky-inspector-top) - 18px);
  }
}

@media (max-width: 820px) {
  .app-shell {
    --topbar-height: 0px !important;
  }

  .sidebar-panel {
    min-height: 0;
    height: auto;
  }

  .sidebar-tools {
    padding: 8px 10px 10px;
  }

  .sidebar-tools .top-actions {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .sidebar-tools .top-actions .icon-button,
  .sidebar-tools .top-actions .ghost-button {
    min-height: 36px;
    height: 36px;
  }

  .sidebar-tools .top-work-button {
    grid-column: 1 / -1;
  }

  .sidebar-tools .top-tool-button {
    grid-column: 1;
    grid-row: 2;
  }

  .sidebar-tools .theme-toggle {
    grid-column: 2;
    grid-row: 2;
  }

  .sidebar-tools .global-user-status {
    min-height: 36px;
  }

  .nav::after {
    display: none;
    content: none;
  }

  body.is-home-page .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  body.is-home-page .sidebar {
    height: auto;
    flex: 0 0 auto;
    overflow: visible;
  }

  body.is-home-page .workspace {
    height: auto;
    display: block;
    overflow: visible;
  }

  body.is-home-page .content {
    height: auto;
    min-height: 0;
    padding: 12px 10px 10px;
    overflow: visible;
  }

  body.is-business-page .content,
  body.is-company-page .content {
    padding-top: 12px;
  }
}

/* Final workflow-page command bar override. */
.module-command-bar.is-flow-first .module-command-track {
  grid-template-columns: minmax(0, 1fr) auto;
}

.module-command-bar.is-flow-first .module-maintenance-actions {
  justify-content: flex-end;
  padding-right: 0;
  padding-left: 10px;
  border-right: 0;
  border-left: 1px solid var(--line);
}

body[data-theme="dark"] .module-command-bar.is-flow-first .module-maintenance-actions {
  border-left-color: var(--line-dark);
}

.module-command-bar.is-flow-first .module-import-scope,
.module-command-bar.is-flow-first .module-actions {
  min-width: 0;
}

.module-command-bar.is-flow-first .module-actions {
  justify-content: flex-start;
}

.module-command-bar.is-flow-first .action-step.is-active {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  background: var(--panel) !important;
  color: var(--ink) !important;
}

body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active {
  border-color: color-mix(in srgb, var(--blue) 46%, var(--line-dark));
  background: #151d29 !important;
  color: #f3f7fb !important;
}

@media (max-width: 980px) {
  .module-command-bar.is-flow-first .module-command-track {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-command-bar.is-flow-first .module-maintenance-actions {
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
  }
}

/* Final dark theme pass: use the supplied #181818 swatch and remove blue chrome. */
.sidebar.prototype-sidebar .brand.brand-empty {
  min-height: 72px;
  padding: 0;
}

.sidebar.prototype-sidebar .brand.brand-empty::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
}

body[data-theme="dark"] {
  --blue: #f0f0f0;
  --blue-strong: #ffffff;
  --ink: #f4f4f4;
  --muted: #b9b9b9;
  --weak: #8a8a8a;
  --line: #303030;
  --line-dark: #303030;
  --canvas: #181818;
  --panel: #202020;
  --soft: #242424;
  --hover: #2a2a2a;
  --panel-shadow: none;
  --material-shadow: none;
  --material-shadow-raised: none;
  background: #181818;
  color: #f4f4f4;
}

body[data-theme="dark"]:not(.is-login) {
  background: #181818;
}

body[data-theme="dark"] .app-shell,
body[data-theme="dark"] .workspace,
body[data-theme="dark"] .content {
  background: #181818;
}

body[data-theme="dark"] .sidebar.prototype-sidebar,
body[data-theme="dark"] .sidebar-panel {
  background: #181818 !important;
  border-color: #303030;
  color: #f4f4f4;
  box-shadow: none;
}

body[data-theme="dark"] .sidebar.prototype-sidebar .brand,
body[data-theme="dark"] .sidebar.prototype-sidebar .brand.brand-empty {
  background: #181818;
  border-bottom-color: #303030;
}

body[data-theme="dark"] .topbar {
  background: #181818;
  border-bottom-color: #303030;
  box-shadow: none;
}

body[data-theme="dark"] .module-command-bar,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .business-main,
body[data-theme="dark"] .business-inspector,
body[data-theme="dark"] .site-budget-main,
body[data-theme="dark"] .site-budget-inspector,
body[data-theme="dark"] .table-shell,
body[data-theme="dark"] .drawer-panel,
body[data-theme="dark"] .account-create-panel,
body[data-theme="dark"] .account-filter-panel,
body[data-theme="dark"] .account-table-panel,
body[data-theme="dark"] .org-create-panel,
body[data-theme="dark"] .org-filter-panel,
body[data-theme="dark"] .org-table-panel,
body[data-theme="dark"] .employee-create-panel,
body[data-theme="dark"] .employee-filter-panel,
body[data-theme="dark"] .employee-table-panel,
body[data-theme="dark"] .role-create-panel,
body[data-theme="dark"] .role-filter-panel,
body[data-theme="dark"] .role-table-panel,
body[data-theme="dark"] .partner-create-panel,
body[data-theme="dark"] .partner-filter-panel,
body[data-theme="dark"] .partner-table-panel,
body[data-theme="dark"] .material-create-panel,
body[data-theme="dark"] .material-filter-panel,
body[data-theme="dark"] .material-table-panel,
body[data-theme="dark"] .warehouse-create-panel,
body[data-theme="dark"] .warehouse-filter-panel,
body[data-theme="dark"] .warehouse-table-panel,
body[data-theme="dark"] .fund-create-panel,
body[data-theme="dark"] .fund-filter-panel,
body[data-theme="dark"] .fund-table-panel,
body[data-theme="dark"] .subject-create-panel,
body[data-theme="dark"] .subject-filter-panel,
body[data-theme="dark"] .subject-table-panel,
body[data-theme="dark"] .flow-config-panel,
body[data-theme="dark"] .system-settings-panel,
body[data-theme="dark"] .home-work-list,
body[data-theme="dark"] .home-project-list,
body[data-theme="dark"] .home-risk-list,
body[data-theme="dark"] .home-ops-grid,
body[data-theme="dark"] .home-finance-grid,
body[data-theme="dark"] .finance-workbench-panel .finance-overview,
body[data-theme="dark"] .finance-workbench-nav,
body[data-theme="dark"] .invoice-ledger-list,
body[data-theme="dark"] .bookkeeping-list,
body[data-theme="dark"] .contract-ledger-list,
body[data-theme="dark"] .contract-lifecycle-list,
body[data-theme="dark"] .signing-platform-list,
body[data-theme="dark"] .payment-schedule-list,
body[data-theme="dark"] .material-ledger-list,
body[data-theme="dark"] .price-list-list,
body[data-theme="dark"] .visa-summary-list,
body[data-theme="dark"] .debt-summary-list,
body[data-theme="dark"] .legal-risk-list,
body[data-theme="dark"] .contract-warning-list,
body[data-theme="dark"] .todo-summary-grid,
body[data-theme="dark"] .smart-reminder-summary-grid,
body[data-theme="dark"] .message-summary-grid,
body[data-theme="dark"] .collaboration-summary-grid,
body[data-theme="dark"] .data-summary-grid,
body[data-theme="dark"] .flow-summary-grid,
body[data-theme="dark"] .archive-summary-grid,
body[data-theme="dark"] .recycle-summary-grid,
body[data-theme="dark"] .audit-summary-grid {
  background: #202020;
  border-color: #303030;
  color: #f4f4f4;
  box-shadow: none;
}

body[data-theme="dark"] .module-actions,
body[data-theme="dark"] .inspector-tabs,
body[data-theme="dark"] th {
  background: #242424;
  color: #b9b9b9;
}

body[data-theme="dark"] tbody tr,
body[data-theme="dark"] td {
  background: #202020;
  color: #f4f4f4;
}

body[data-theme="dark"] tbody tr:hover,
body[data-theme="dark"] .business-table tbody tr.is-selected,
body[data-theme="dark"] .site-budget-table tbody tr.is-selected {
  background: #2a2a2a;
}

body[data-theme="dark"] .business-metrics,
body[data-theme="dark"] .site-budget-metrics,
body[data-theme="dark"] .business-metrics div,
body[data-theme="dark"] .site-budget-metrics div,
body[data-theme="dark"] .inspector-kv,
body[data-theme="dark"] .inspector-next,
body[data-theme="dark"] .inspector-note,
body[data-theme="dark"] .inspector-kv-feature,
body[data-theme="dark"] .inspector-note-feature,
body[data-theme="dark"] .inspector-step-list span,
body[data-theme="dark"] .project-overview-strip,
body[data-theme="dark"] .site-overview-strip {
  background: #202020;
  border-color: #303030;
  color: #f4f4f4;
  box-shadow: none;
}

body[data-theme="dark"] .primary-button {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #181818;
  box-shadow: none;
}

body[data-theme="dark"] .primary-button:hover,
body[data-theme="dark"] .primary-button:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: #181818;
  box-shadow: none;
}

body[data-theme="dark"] .ghost-button,
body[data-theme="dark"] .danger-button,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .text-button,
body[data-theme="dark"] .pager button,
body[data-theme="dark"] .tabs button,
body[data-theme="dark"] .sidebar-tools .top-actions .icon-button,
body[data-theme="dark"] .sidebar-tools .top-actions .ghost-button,
body[data-theme="dark"] .sidebar-tools .global-user-status {
  background: #202020;
  border-color: #303030;
  color: #f4f4f4;
  box-shadow: none;
}

body[data-theme="dark"] .ghost-button:hover,
body[data-theme="dark"] .ghost-button:focus-visible,
body[data-theme="dark"] .icon-button:hover,
body[data-theme="dark"] .icon-button:focus-visible,
body[data-theme="dark"] .text-button:hover,
body[data-theme="dark"] .text-button:focus-visible,
body[data-theme="dark"] .pager button:hover,
body[data-theme="dark"] .pager button:focus-visible,
body[data-theme="dark"] .tabs button:hover,
body[data-theme="dark"] .tabs button:focus-visible {
  background: #2a2a2a;
  border-color: #505050;
  color: #ffffff;
}

.pager button.is-active,
.pager button.is-active:hover,
.pager button.is-active:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
  box-shadow: none;
}

body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active,
body[data-theme="dark"] .action-step.is-active,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active,
body[data-theme="dark"] .tabs button.is-active,
body[data-theme="dark"] .todo-scope-tabs button.is-active,
body[data-theme="dark"] .inspector-tab.is-active,
body[data-theme="dark"] .pager button.is-active {
  background: #f0f0f0 !important;
  border-color: #f0f0f0 !important;
  color: #181818 !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active strong,
body[data-theme="dark"] .action-step.is-active strong,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active strong,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active em,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active .nav-icon,
body[data-theme="dark"] .tabs button.is-active,
body[data-theme="dark"] .todo-scope-tabs button.is-active,
body[data-theme="dark"] .pager button.is-active {
  color: #181818 !important;
}

body[data-theme="dark"] .action-step-index b,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step-index b {
  background: #303030;
  color: #f0f0f0;
}

body[data-theme="dark"] .action-step.is-active .action-step-index b,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active .action-step-index b,
body[data-theme="dark"] .sidebar.prototype-sidebar .nav-module.is-active .nav-icon {
  background: #ffffff !important;
  color: #181818 !important;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .head-filter-form input,
body[data-theme="dark"] .head-filter-form select,
body[data-theme="dark"] .filter-row input,
body[data-theme="dark"] .filter-row select,
body[data-theme="dark"] .search-panel input,
body[data-theme="dark"] .menu-search input,
body[data-theme="dark"] .sidebar-search {
  background: #202020;
  border-color: #303030;
  color: #f4f4f4;
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] .sidebar-search:focus-within {
  border-color: #f0f0f0;
  box-shadow: 0 0 0 3px rgba(240, 240, 240, 0.12);
  outline-color: rgba(240, 240, 240, 0.28);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #9c9c9c;
}

body[data-theme="dark"] .sidebar-search button {
  background: #f0f0f0;
  color: #181818;
}

body[data-theme="dark"] a,
body[data-theme="dark"] .link-button,
body[data-theme="dark"] .table-record-link,
body[data-theme="dark"] .table-shell .row-actions .link-button,
body[data-theme="dark"] .account-row-actions .link-button,
body[data-theme="dark"] .org-row-actions .link-button,
body[data-theme="dark"] .employee-row-actions .link-button,
body[data-theme="dark"] .role-row-actions .link-button,
body[data-theme="dark"] .partner-row-actions .link-button,
body[data-theme="dark"] .material-row-actions .link-button,
body[data-theme="dark"] .warehouse-row-actions .link-button,
body[data-theme="dark"] .fund-row-actions .link-button,
body[data-theme="dark"] .subject-row-actions .link-button,
body[data-theme="dark"] .flow-config-row-actions .link-button {
  color: #f0f0f0;
}

body[data-theme="dark"] .login-brand-mark,
body[data-theme="dark"] .login-auth-card .login-tabs button.is-active {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #181818;
}

body[data-theme="dark"].is-login,
body[data-theme="dark"] .login-screen {
  background: #181818;
}
/* 表单面板保持透明,露出 Silk 整页背景 */
body[data-theme="dark"] .login-form-panel {
  background: transparent !important;
}

body[data-theme="dark"] .login-art-panel {
  background: #4f5564;
}

body[data-theme="dark"] .login-auth-head span,
body[data-theme="dark"] .login-auth-card .login-tabs {
  background: #202020;
  border-color: #303030;
  color: #f0f0f0;
}

body[data-theme="dark"] .login-auth-card .login-tabs button {
  color: #b9b9b9;
}

body[data-theme="dark"] .login-auth-card .login-tabs button.is-active {
  background: #f0f0f0;
  color: #181818;
}

/* Final home dashboard sizing: keep the KPI row readable. */
body.is-home-page .home-dashboard {
  grid-template-rows: minmax(104px, auto) auto minmax(0, 1fr) 66px;
}

body.is-home-page .home-kpi-bar {
  min-height: 104px;
}

body.is-home-page .home-user-line,
body.is-home-page .home-kpi-cell {
  gap: 6px;
  padding: 16px 18px;
}

/* User profile now lives in the reserved top-left sidebar area. */
.sidebar.prototype-sidebar .brand.user-brand {
  min-height: 76px;
  display: flex;
  align-items: stretch;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

body[data-theme="dark"] .sidebar.prototype-sidebar .brand.user-brand {
  border-bottom-color: #303030;
  background: #181818;
}

.user-brand .global-user-status {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  color: var(--ink);
}

body[data-theme="dark"] .user-brand .global-user-status {
  background: transparent;
  border: 0;
  color: #f4f4f4;
}

.user-status-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-status-copy strong,
.user-status-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status-copy strong {
  font-size: 14px;
  font-weight: 850;
}

.user-status-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.user-brand .global-user-status .link-button {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

body[data-theme="dark"] .user-brand .global-user-status .link-button {
  background: #181818;
  color: #f4f4f4;
}

.user-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: 850 16px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  box-shadow: none;
}

button.user-avatar {
  padding: 0;
  appearance: none;
  cursor: pointer;
}

button.user-avatar:hover,
button.user-avatar:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ink) 24%, transparent);
  outline-offset: 2px;
}

.user-avatar::after {
  content: none;
}

.avatar-emoji {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 39px;
  line-height: 1;
  transform: translateY(1px);
  filter: saturate(1.08);
}

.user-avatar.is-preview .avatar-emoji {
  font-size: 62px;
}

.avatar-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 8px;
  border: 0;
  background: transparent;
}

body[data-theme="dark"] .avatar-profile {
  background: transparent;
}

.user-avatar.is-preview {
  width: 72px;
  height: 72px;
  font-size: 20px;
}

.avatar-profile div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.avatar-profile strong {
  font-size: 18px;
}

.avatar-profile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.avatar-choice {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 104px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease;
}

body[data-theme="dark"] .avatar-choice {
  background: transparent;
  color: #f4f4f4;
}

.avatar-choice:hover,
.avatar-choice:focus-visible,
.avatar-choice.is-active {
  background: transparent;
  outline: none;
}

body[data-theme="dark"] .avatar-choice:hover,
body[data-theme="dark"] .avatar-choice:focus-visible,
body[data-theme="dark"] .avatar-choice.is-active {
  background: transparent;
}

.avatar-choice strong {
  font-size: 13px;
}

.avatar-choice:hover,
.avatar-choice.is-active {
  transform: translateY(-1px);
}

.avatar-choice.is-active .avatar-emoji {
  transform: translateY(1px) scale(1.12);
}

.avatar-choice.is-active strong {
  color: var(--ink);
  font-weight: 850;
}

body[data-theme="dark"] .avatar-choice.is-active strong {
  color: #f4f4f4;
}

@media (max-width: 520px) {
  .avatar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final business ledger fit: rows are capped by viewport and pager stays pinned. */
@media (min-width: 821px) {
  body.is-business-page {
    overflow: hidden;
  }

  body.is-business-page .content {
    overflow: hidden;
  }

  body.is-business-page .business-workbench,
  body.is-business-page .site-budget-workbench {
    height: var(--business-ledger-height, calc(100vh - 112px));
    min-height: 0;
    overflow: hidden;
  }

  body.is-business-page .business-main,
  body.is-business-page .site-budget-main {
    height: var(--business-ledger-height, calc(100vh - 112px));
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto var(--business-table-height, 536px) 42px;
    align-content: start;
    overflow: hidden;
  }

  body.is-business-page .business-table.table-shell,
  body.is-business-page .site-budget-table.table-shell {
    height: var(--business-table-height, 536px);
    min-height: 0 !important;
    max-height: var(--business-table-height, 536px);
    overflow: hidden !important;
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  body.is-business-page .business-table table,
  body.is-business-page .site-budget-table table {
    height: calc(100% - 1px);
  }

  body.is-business-page .business-table thead,
  body.is-business-page .site-budget-table thead {
    height: 40px;
  }

  body.is-business-page .business-table tbody tr,
  body.is-business-page .site-budget-table tbody tr,
  body.is-business-page .business-table tbody td,
  body.is-business-page .site-budget-table tbody td,
  body.is-business-page .business-table .table-filler-row td,
  body.is-business-page .site-budget-table .table-filler-row td {
    height: var(--business-row-height, 55px) !important;
  }

  body.is-business-page .business-table .table-filler-row,
  body.is-business-page .site-budget-table .table-filler-row {
    display: table-row !important;
  }

  body.is-business-page .business-table .table-filler-row td,
  body.is-business-page .site-budget-table .table-filler-row td {
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    color: transparent;
  }

  body.is-business-page .business-pager,
  body.is-business-page .site-budget-pager {
    height: 42px;
    min-height: 42px;
    align-self: stretch;
    margin-top: 1px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--panel);
    overflow: hidden;
  }

  body[data-theme="dark"].is-business-page .business-table .table-filler-row td,
  body[data-theme="dark"].is-business-page .site-budget-table .table-filler-row td,
  body[data-theme="dark"].is-business-page .business-pager,
  body[data-theme="dark"].is-business-page .site-budget-pager {
    border-color: #303030;
    background: var(--panel);
  }
}

/* Ledger selection pass: remove code column, keep sequence readable, add bulk actions. */
.ledger-checkline,
.ledger-row-select {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.ledger-checkline input,
.ledger-row-select input {
  appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, var(--line));
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ledger-checkline input:checked,
.ledger-row-select input:checked,
.ledger-checkline input:indeterminate {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--panel);
}

.ledger-checkline input:focus-visible,
.ledger-row-select input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ink) 36%, transparent);
  outline-offset: 2px;
}

.ledger-row-select span {
  min-width: 22px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.ledger-bulk-delete {
  min-width: 0 !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-color: color-mix(in srgb, var(--red) 46%, var(--line)) !important;
  background: color-mix(in srgb, var(--red) 9%, var(--panel)) !important;
  color: var(--red) !important;
  font-weight: 800;
}

.ledger-bulk-delete:hover,
.ledger-bulk-delete:focus-visible {
  background: color-mix(in srgb, var(--red) 16%, var(--panel)) !important;
}

body[data-theme="dark"] .ledger-bulk-delete {
  border-color: color-mix(in srgb, var(--red) 38%, #303030) !important;
  background: color-mix(in srgb, var(--red) 12%, #181818) !important;
}

body.is-business-page .business-table th:nth-child(1),
body.is-business-page .business-table td:nth-child(1),
body.is-business-page .site-budget-table th:nth-child(1),
body.is-business-page .site-budget-table td:nth-child(1) {
  width: 86px !important;
  padding-left: 14px;
  overflow: visible;
  text-overflow: clip;
}

body.is-business-page .business-table th:nth-child(2),
body.is-business-page .business-table td:nth-child(2),
body.is-business-page .site-budget-table th:nth-child(2),
body.is-business-page .site-budget-table td:nth-child(2) {
  width: auto !important;
}

body.is-business-page .business-table th:nth-child(3),
body.is-business-page .business-table td:nth-child(3),
body.is-business-page .site-budget-table th:nth-child(3),
body.is-business-page .site-budget-table td:nth-child(3) {
  width: 22% !important;
}

body.is-business-page .business-table th:nth-child(4),
body.is-business-page .business-table td:nth-child(4),
body.is-business-page .site-budget-table th:nth-child(4),
body.is-business-page .site-budget-table td:nth-child(4),
body.is-business-page .site-budget-table th:nth-child(5),
body.is-business-page .site-budget-table td:nth-child(5) {
  width: 112px !important;
}

body.is-business-page .business-table th:nth-child(5),
body.is-business-page .business-table td:nth-child(5),
body.is-business-page .business-table th:nth-child(6),
body.is-business-page .business-table td:nth-child(6),
body.is-business-page .site-budget-table th:nth-child(6),
body.is-business-page .site-budget-table td:nth-child(6),
body.is-business-page .site-budget-table th:nth-child(7),
body.is-business-page .site-budget-table td:nth-child(7) {
  width: 96px !important;
}

body.is-business-page .business-table th:nth-child(7),
body.is-business-page .business-table td:nth-child(7) {
  width: 124px !important;
}

body.is-business-page .business-table th:nth-child(n + 8),
body.is-business-page .business-table td:nth-child(n + 8),
body.is-business-page .site-budget-table th:nth-child(n + 8),
body.is-business-page .site-budget-table td:nth-child(n + 8) {
  display: none !important;
}

@media (max-width: 820px) {
  body.is-business-page .business-table th:nth-child(1),
  body.is-business-page .business-table td:nth-child(1),
  body.is-business-page .site-budget-table th:nth-child(1),
  body.is-business-page .site-budget-table td:nth-child(1) {
    display: table-cell !important;
    width: 78px !important;
  }

  body.is-business-page .business-table th:nth-child(2),
  body.is-business-page .business-table td:nth-child(2),
  body.is-business-page .site-budget-table th:nth-child(2),
  body.is-business-page .site-budget-table td:nth-child(2) {
    display: table-cell !important;
    width: auto !important;
  }
}

/* Fixed workbench chrome should not text-select during clicks or drags. */
.module-command-bar,
.module-command-bar *,
.business-metrics,
.business-metrics *,
.site-budget-metrics,
.site-budget-metrics *,
.business-pager,
.business-pager *,
.site-budget-pager,
.site-budget-pager *,
.feature-inspector,
.feature-inspector *,
.inspector-tabs,
.inspector-tabs * {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select,
[contenteditable="true"],
.table-shell tbody,
.table-shell tbody * {
  -webkit-user-select: text;
  user-select: text;
}

.table-shell tbody button,
.table-shell tbody label,
.table-shell tbody input,
.table-shell tbody .badge,
.table-shell tbody .status-badge {
  -webkit-user-select: none;
  user-select: none;
}

/* Neutral dark drawer controls: no blue-grey focus or browser autofill color. */
body[data-theme="dark"] .drawer input,
body[data-theme="dark"] .drawer textarea,
body[data-theme="dark"] .drawer select,
body[data-theme="dark"] .drawer .custom-select-trigger,
body[data-theme="dark"] .drawer .chrono-trigger {
  background: #111111 !important;
  border-color: #303030 !important;
  color: #f4f4f4 !important;
  caret-color: #f4f4f4;
}

body[data-theme="dark"] .drawer input:focus,
body[data-theme="dark"] .drawer textarea:focus,
body[data-theme="dark"] .drawer select:focus,
body[data-theme="dark"] .drawer .custom-select-trigger:focus-visible,
body[data-theme="dark"] .drawer .custom-select.is-open .custom-select-trigger,
body[data-theme="dark"] .drawer .chrono-trigger:focus-visible,
body[data-theme="dark"] .drawer .chrono-select.is-open .chrono-trigger {
  background: #181818 !important;
  border-color: #d8d8d8 !important;
  box-shadow: 0 0 0 3px rgba(244, 244, 244, 0.12) !important;
  outline: 0 !important;
}

body[data-theme="dark"] .drawer input:-webkit-autofill,
body[data-theme="dark"] .drawer input:-webkit-autofill:hover,
body[data-theme="dark"] .drawer input:-webkit-autofill:focus,
body[data-theme="dark"] .drawer textarea:-webkit-autofill,
body[data-theme="dark"] .drawer textarea:-webkit-autofill:hover,
body[data-theme="dark"] .drawer textarea:-webkit-autofill:focus,
body[data-theme="dark"] .drawer select:-webkit-autofill,
body[data-theme="dark"] .drawer select:-webkit-autofill:hover,
body[data-theme="dark"] .drawer select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #181818 inset !important;
  -webkit-text-fill-color: #f4f4f4 !important;
  caret-color: #f4f4f4 !important;
  border-color: #d8d8d8 !important;
  transition: background-color 99999s ease-out 0s;
}

body[data-theme="dark"] .drawer input::placeholder,
body[data-theme="dark"] .drawer textarea::placeholder {
  color: #9c9c9c !important;
}

/* Ledger title subtitles moved after removing the code column; keep them upright. */
body.is-business-page .business-table td:nth-child(2) strong,
body.is-business-page .business-table td:nth-child(2) em,
body.is-business-page .site-budget-table td:nth-child(2) strong,
body.is-business-page .site-budget-table td:nth-child(2) em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-business-page .business-table td:nth-child(2) em,
body.is-business-page .site-budget-table td:nth-child(2) em,
body.is-business-page .business-table tbody td em,
body.is-business-page .site-budget-table tbody td em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal !important;
}

.business-table.full-cells {
  overflow-x: auto !important;
}
.business-table.full-cells table {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
}
.business-table.full-cells th,
.business-table.full-cells td {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
}

/* 自定义列表格:等分固定布局,每列等宽铺满整行。
   用 body.is-business-page .business-table.clean-cols + 逐列 nth-child 提高优先级,
   压过那组 body.is-business-page .business-table th:nth-child(N){width:..!important} 规则。 */
body.is-business-page .business-table.clean-cols table,
.business-table.clean-cols table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.is-business-page .business-table.clean-cols th:nth-child(2),
body.is-business-page .business-table.clean-cols td:nth-child(2),
body.is-business-page .business-table.clean-cols th:nth-child(3),
body.is-business-page .business-table.clean-cols td:nth-child(3),
body.is-business-page .business-table.clean-cols th:nth-child(4),
body.is-business-page .business-table.clean-cols td:nth-child(4),
body.is-business-page .business-table.clean-cols th:nth-child(5),
body.is-business-page .business-table.clean-cols td:nth-child(5),
body.is-business-page .business-table.clean-cols th:nth-child(6),
body.is-business-page .business-table.clean-cols td:nth-child(6),
body.is-business-page .business-table.clean-cols th:nth-child(7),
body.is-business-page .business-table.clean-cols td:nth-child(7),
body.is-business-page .business-table.clean-cols th:nth-child(8),
body.is-business-page .business-table.clean-cols td:nth-child(8),
.business-table.clean-cols th,
.business-table.clean-cols td {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
body.is-business-page .business-table.clean-cols th:nth-child(1),
body.is-business-page .business-table.clean-cols td:nth-child(1),
.business-table.clean-cols th:first-child,
.business-table.clean-cols td:first-child {
  width: 64px !important;
}

/* 全局去掉数字/日期输入框的原生上下步进箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* 记账面板头:仅放右对齐的保存按钮 */
.bk-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

/* 记账表单:强制单行,各字段按比例自适应宽度、可压缩 */
.bk-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
  align-items: end;
}
.bk-form .bk-field { min-width: 0; }
.bk-form .bk-field:nth-child(1) { flex: 1.5 1 0; }   /* 日期 */
.bk-form .bk-field:nth-child(2) { flex: 0.8 1 0; }   /* 方向 */
.bk-form .bk-field:nth-child(3) { flex: 1 1 0; }     /* 类目 */
.bk-form .bk-field:nth-child(4) { flex: 0.9 1 0; }   /* 金额 */
.bk-form .bk-field:nth-child(5) { flex: 1.1 1 0; }   /* 项目 */
.bk-form .bk-field:nth-child(6) { flex: 1.1 1 0; }   /* 班组 */
.bk-form .bk-field:nth-child(7) { flex: 1.2 1 0; }   /* 往来单位 */
.bk-form .bk-field:nth-child(8) { flex: 1.1 1 0; }   /* 支付方式 */
.bk-form .bk-field:nth-child(9) { flex: 1 1 0; }     /* 人工费发票 */
.bk-form .bk-field:nth-child(10) { flex: 1.2 1 0; }  /* 备注 */
.bk-form .bk-actions { display: flex; flex-direction: row; align-items: end; gap: 6px; flex: 0 0 auto; }
.bk-form .bk-actions button { min-height: 40px; white-space: nowrap; padding-inline: 12px; }
.bk-form .chrono-trigger { white-space: nowrap; }
.bk-form .chrono-trigger [data-date-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.bk-field > span {
  color: var(--muted);
  font-size: 12px;
}
.bk-form input {
  width: 100%;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
/* 统一三类控件背景/边框,避免日期框、下拉、输入框颜色不一致 */
.bk-form input,
.bk-form .custom-select-trigger,
.bk-form .chrono-trigger {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  color: var(--ink) !important;
}
body[data-theme="dark"] .bk-form input,
body[data-theme="dark"] .bk-form .custom-select-trigger,
body[data-theme="dark"] .bk-form .chrono-trigger {
  background: #111 !important;
  border-color: #303030 !important;
  color: #f4f4f4 !important;
}
.bk-form .custom-select,
.bk-form .chrono-select {
  width: 100%;
}
/* 统一高度:输入框、下拉、日期框一致 */
.bk-form input,
.bk-form .custom-select-trigger,
.bk-form .chrono-trigger {
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
}
.bk-submit {
  display: flex;
  align-items: end;
}
.bk-submit button {
  min-height: 40px;
}

/* 签证汇总页:独立堆叠布局,避免与两栏工作台样式冲突 */
.sig-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sig-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.sig-metrics > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sig-metrics span {
  color: var(--muted);
  font-size: 12px;
}
.sig-metrics strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
/* 记账指标卡:数字放大到大号金额尺寸 */
.sig-metrics.bk-metrics strong {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
}
.sig-metrics em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.sig-table-panel {
  padding: 6px 6px 4px;
  overflow: hidden;
}

/* 签证汇总表格:与系统风格统一 */
.signature-summary-table {
  width: 100%;
  overflow-x: auto;
}
.signature-summary-table table {
  width: 100%;
  border-collapse: collapse;
}
.signature-summary-table th {
  padding: 11px 14px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.signature-summary-table td {
  padding: 13px 14px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.signature-summary-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.signature-summary-table tbody tr:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.signature-summary-table .sig-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
  cursor: default;
}

/* 考勤表 网格 */
.att-table-wrap {
  overflow: hidden;
  border: 0.5px solid var(--line);
  border-radius: var(--border-radius-md, 10px);
}
.att-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
  table-layout: fixed;
}
.att-table th,
.att-table td {
  border: 0.5px solid var(--line);
  padding: 6px 2px;
  text-align: center;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
.att-table thead th {
  color: var(--muted);
  font-weight: 600;
  background: var(--panel);
}
.att-table .att-idx { width: 34px; }
.att-table .att-name {
  width: 58px;
  text-align: center;
  font-weight: 600;
}
.att-table .att-day { width: auto; padding: 6px 1px; }
.att-table td.att-cell { padding: 6px 1px; }
.att-table .att-sum { width: 36px; font-weight: 600; }
.att-table .att-pay {
  width: 74px;
  text-align: right;
  padding-right: 6px;
  font-weight: 700;
  color: #37b26a;
}
.att-filter {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: #111;
  color: #f4f4f4;
}

/* 考勤页:整页不滚动,表格区域自适应填满剩余高度 */
.att-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.att-page .att-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.att-metrics { margin: 0 0 12px; flex: 0 0 auto; }
.att-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 8px;
  flex: 0 0 auto;
}
.att-bar .att-bar-spacer { flex: 1 1 auto; min-width: 8px; }
.att-bar .att-filter {
  width: 200px !important;
  min-width: 130px;
  flex: 0 0 auto;
}
.att-bar .custom-select { flex: 0 0 auto; width: 200px; }
.att-bar .att-filter-month + .custom-select { width: 160px; }
.att-bar .ghost-button,
.att-bar .primary-button { flex: 0 0 auto; white-space: nowrap; }

/* ===== 成本页重设计 ===== */
.cost-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - var(--topbar-height) - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}
.cost-metrics { margin: 0; }
.cost-card {
  background: var(--panel);
  border: 0.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.cost-card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cost-card-head strong { font-size: 15px; }
.cost-card-head span { font-size: 12px; color: var(--muted); }
.cost-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}
.cost-bar .seg { transition: flex 0.3s; min-width: 2px; }
.cost-sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 880px) { .cost-sources { grid-template-columns: 1fr; } }
.cost-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0.5px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.cost-source > i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.cost-source .cs-main { display: flex; flex-direction: column; gap: 2px; }
.cost-source .cs-main span { font-size: 12px; color: var(--muted); }
.cost-source .cs-main strong { font-size: 18px; font-weight: 700; }
.cost-source .cs-meta { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.cost-source .cs-meta em { font-size: 13px; font-style: normal; font-weight: 600; color: var(--ink); }
.cost-source .cs-from { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cost-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid var(--line);
}
.cost-total span { font-size: 13px; color: var(--muted); }
.cost-total strong { font-size: 20px; font-weight: 700; color: #e0a020; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-table th, .cost-table td { padding: 9px 10px; border-bottom: 0.5px solid var(--line); }
.cost-table thead th { color: var(--muted); font-weight: 600; }
.cost-table th.l, .cost-table td.l { text-align: left; }
.cost-table th.r, .cost-table td.r { text-align: right; }
.cost-table tbody tr:last-child td { border-bottom: none; }
.cost-table .cost-empty { text-align: center; color: var(--muted); padding: 22px; }

/* ===== 工作台:快捷入口 + 项目预算看板 ===== */
.home-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
}
.home-quick-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.home-quick-btn {
  border: 0.5px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.home-quick-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25); }
.home-budget-table { margin-top: 4px; }
.home-budget-table .home-click-row { cursor: pointer; transition: background 0.15s; }
.home-budget-table .home-click-row:hover { background: rgba(255, 255, 255, 0.04); }

/* ===== 新工作台:流程管线综合看板 ===== */
.wb { display: flex; flex-direction: column; gap: 14px; }
.wb-kpi { display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.wb-kpi-user { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 14px 18px; min-width: 150px; border-right: 0.5px solid var(--line); }
.wb-kpi-user strong { font-size: 15px; }
.wb-kpi-user span { font-size: 12px; color: var(--muted); }
.wb-kpi-cell { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-right: 0.5px solid var(--line); }
.wb-kpi-cell:last-child { border-right: none; }
.wb-kpi-cell span { font-size: 12px; color: var(--muted); }
.wb-kpi-cell strong { font-size: 21px; font-weight: 700; line-height: 1.1; }
.wb-kpi-cell em { font-size: 11px; color: var(--muted); font-style: normal; }
.wb-kpi-cell.done strong { color: #37b26a; }
.wb-kpi-cell.warning strong { color: #e0a020; }
.wb-kpi-cell.risk strong { color: #e2504a; }
.wb-kpi-cell.info strong { color: var(--ink); }

.wb-pipe { padding: 14px 16px; }
.wb-pipe-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.wb-pipe-head strong { font-size: 14px; }
.wb-pipe-head span { font-size: 12px; color: var(--muted); }
.wb-pipe-track { display: flex; align-items: stretch; gap: 0; overflow-x: auto; }
.wb-stage {
  flex: 1; min-width: 116px; display: flex; flex-direction: column; gap: 3px;
  text-align: left; padding: 12px 12px; border: 0.5px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,0.02); color: var(--ink); cursor: pointer; position: relative;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.wb-stage:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.28); transform: translateY(-1px); }
.wb-stage.is-risk { border-color: rgba(226,80,74,0.4); }
.wb-stage.is-done { border-color: rgba(55,178,106,0.35); }
.wb-stage-top { display: flex; align-items: center; gap: 6px; }
.wb-stage-no { width: 17px; height: 17px; border-radius: 50%; background: rgba(255,255,255,0.1); color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wb-stage-name { font-size: 13px; font-weight: 600; }
.wb-stage-alert { margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: #e2504a; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wb-stage-val { font-size: 17px; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.wb-stage.is-risk .wb-stage-val { color: #e2504a; }
.wb-stage.is-done .wb-stage-val { color: #37b26a; }
.wb-stage-lab { font-size: 11px; color: var(--muted); font-style: normal; }
.wb-stage-note { font-size: 11px; color: var(--muted); font-style: normal; margin-top: 1px; }
.wb-stage-arrow { display: flex; align-items: center; color: var(--muted); font-size: 22px; padding: 0 4px; flex-shrink: 0; opacity: 0.5; }

.wb-main { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.wb-col { display: flex; flex-direction: column; gap: 14px; }
.wb-table { margin-top: 4px; }
.wb-table .home-click-row { cursor: pointer; transition: background 0.15s; }
.wb-table .home-click-row:hover { background: rgba(255,255,255,0.05); }

.wb-profit { display: flex; gap: 0; margin: 6px 0 12px; }
.wb-profit div { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 4px 0; border-right: 0.5px solid var(--line); }
.wb-profit div:last-child { border-right: none; }
.wb-profit span { font-size: 12px; color: var(--muted); }
.wb-profit strong { font-size: 18px; font-weight: 700; }
.wb-cost-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,0.06); }
.wb-cost-bar i { display: block; height: 100%; }
.wb-cost-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.wb-cost-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.wb-cost-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* 覆盖 .home-panel-head div{display:grid} 对操作区的影响,保持横排 */
.home-panel-head div.home-panel-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.home-panel-head div.wb-period { display: inline-flex; gap: 0; flex: 0 0 auto; align-self: flex-start; }
.wb-period { display: inline-flex; border: 0.5px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.wb-period-btn { border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 0; min-width: 52px; text-align: center; cursor: pointer; border-right: 0.5px solid var(--line); transition: background 0.15s, color 0.15s; }
.wb-period-btn:last-child { border-right: none; }
.wb-period-btn:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.wb-period-btn.is-active { background: #1677ff; color: #fff; }

@media (max-width: 980px) {
  .wb-main { grid-template-columns: 1fr; }
  .wb-kpi { flex-wrap: wrap; }
  .wb-kpi-cell { min-width: 33%; }
}

#globalRecycleButton { position: relative; }

/* 移除顶部日期/天气显示 */
#topbarMeta, .topbar-meta { display: none !important; }

/* 应用内确认弹窗 */
.ui-confirm-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.ui-confirm-box { width: min(420px, calc(100vw - 48px)); background: var(--surface, #1a1a1a); border: 0.5px solid var(--line); border-radius: 14px; padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
body[data-theme="dark"] .ui-confirm-box { background: #1c1c1e; }
.ui-confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.ui-confirm-msg { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 20px; }
.ui-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ui-confirm-actions button { min-height: 38px; padding-inline: 18px; }
.ui-confirm-danger { background: #e2504a !important; border-color: #e2504a !important; color: #fff !important; }

/* 价格清单 BOQ 表(查看/编辑) */
.pl-boq-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.pl-boq-table th, .pl-boq-table td { padding: 6px 8px; border: 0.5px solid var(--line); overflow: hidden; word-break: break-word; }
/* 每条目行高写死至少 5 行;全部单元格上下左右居中 */
.pl-boq-table tbody td {
  height: 7.6em;
  text-align: center !important;
  vertical-align: middle !important;
}
/* 项目名称、工程量计算规则、综合单价说明 长文本换行成多行 */
.pl-boq-table tbody td:nth-child(2),
.pl-boq-table tbody td:nth-child(12),
.pl-boq-table tbody td:nth-child(13) { white-space: normal; line-height: 1.5; }
/* 数字列(序号/暂估数量/税率/各单价合价)放大加粗 */
.pl-boq-table tbody td:nth-child(1),
.pl-boq-table tbody td:nth-child(4),
.pl-boq-table tbody td:nth-child(5),
.pl-boq-table tbody td:nth-child(6),
.pl-boq-table tbody td:nth-child(7),
.pl-boq-table tbody td:nth-child(8),
.pl-boq-table tbody td:nth-child(9),
.pl-boq-table tbody td:nth-child(10),
.pl-boq-table tbody td:nth-child(11) { font-size: 17px; font-weight: 700; }
.pl-boq-table thead th { color: var(--muted); font-weight: 600; text-align: center; background: rgba(255, 255, 255, 0.03); }
.pl-boq-table td.l, .pl-boq-table th.l { text-align: left; }
.pl-boq-table td.r, .pl-boq-table th.r { text-align: right; }
.pl-boq-table input { width: 100%; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-size: 12px; }
body[data-theme="dark"] .pl-boq-table input { background: #111; border-color: #303030; color: #f4f4f4; }

/* 价格清单编辑表:定宽列、不横向滚动 */
.pl-edit-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.pl-edit-table th, .pl-edit-table td { padding: 6px 6px; border: 0.5px solid var(--line); overflow: hidden; }
.pl-edit-table thead th { color: var(--muted); font-weight: 600; background: rgba(255, 255, 255, 0.03); }
.pl-edit-table th.l, .pl-edit-table td.l { text-align: left; }
.pl-edit-table th.r, .pl-edit-table td.r { text-align: right; }
.pl-edit-table input, .pl-edit-table select { width: 100% !important; box-sizing: border-box; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-size: 12px; }
body[data-theme="dark"] .pl-edit-table input, body[data-theme="dark"] .pl-edit-table select { background: #111; border-color: #303030; color: #f4f4f4; }
.pl-edit-table col.c-name { width: 19%; }
.pl-edit-table col.c-unit { width: 11%; }
.pl-edit-table col.c-qty { width: 11%; }
.pl-edit-table col.c-price { width: 13%; }
.pl-edit-table col.c-p5 { width: 11%; }
.pl-edit-table col.c-amt { width: 11%; }
.pl-edit-table col.c-desc { width: 18%; }
.pl-edit-table col.c-del { width: 6%; }

/* 考勤汇总表:对齐标准业务列表的清爽行距风格 */
.att-summary-table { font-size: 14px; }
.att-summary-table thead th {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.att-summary-table tbody td {
  padding: 18px 16px;
  border-bottom: 0.5px solid var(--line);
}
.att-summary-table tbody tr { transition: background 0.15s; }
.att-summary-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
.att-summary-table tbody td.l:nth-child(1),
.att-summary-table tbody td.l:nth-child(2),
.att-summary-table tbody td.l:nth-child(3) { font-weight: 600; }

/* 考勤汇总表 操作列:多个按钮紧凑排列 */
.att-summary-table td.att-row-ops { white-space: nowrap; text-align: right; }
.att-summary-table td.att-row-ops .ghost-button {
  padding: 6px 10px;
  font-size: 12px;
  min-height: 30px;
  margin-left: 6px;
}
.att-summary-table td.att-row-ops .ghost-button:first-child { margin-left: 0; }

/* 考勤表预览弹窗 */
.att-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.att-preview-box {
  background: var(--panel);
  border: 0.5px solid var(--line);
  border-radius: 14px;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.att-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--line);
}
.att-preview-head strong { font-size: 15px; }
.att-preview-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  padding: 8px 18px 0;
}
.att-prev-search {
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: #111;
  color: #f4f4f4;
  font-size: 13px;
  min-width: 160px;
}
.att-preview-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 18px;
  border-top: 0.5px solid var(--line);
}
.att-preview-foot #attPrevInfo { font-size: 13px; color: var(--muted); min-width: 160px; text-align: center; }
.att-preview-foot .ghost-button[disabled] { opacity: 0.4; cursor: not-allowed; }
.att-preview-body {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 18px 18px;
}
.att-grid-table {
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.att-grid-table th,
.att-grid-table td {
  border: 0.5px solid var(--line);
  padding: 6px 4px;
  text-align: center;
}
.att-grid-table thead th {
  color: var(--muted);
  font-weight: 600;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
.att-grid-table .att-idx { width: 42px; }
.att-grid-table .att-name { width: 76px; text-align: left; padding-left: 10px; font-weight: 600; }
.att-grid-table .att-day { width: 26px; padding: 6px 2px; }
.att-grid-table td.att-cell { width: 26px; }
.att-grid-table .att-sum { width: 44px; font-weight: 600; }

/* 班组结算:展示型 tab 栏 + 流式页面 */
.settlement-tabbar {
  padding: 8px 12px;
  margin-bottom: 12px;
}
.settlement-tabbar .module-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settlement-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 24px;
}

/* 付款组成弹窗 */
.pay-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pay-detail-metrics > div {
  border: 0.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.pay-detail-metrics span { font-size: 12px; color: var(--muted); }
.pay-detail-metrics strong { font-size: 17px; font-weight: 700; }
.pay-detail-sec { margin-bottom: 18px; }
.pay-detail-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pay-detail-sec-head strong { font-size: 14px; }
.pay-detail-sec-head span { font-size: 12px; color: var(--muted); }
.pay-detail-sec table { width: 100%; }
.pay-detail-empty { font-size: 13px; color: var(--muted); padding: 10px 2px; }
@media (max-width: 640px) { .pay-detail-metrics { grid-template-columns: repeat(2, 1fr); } }

/* 在线结算单表单 */
.jss-head { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.jss-head label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.jss-head input {
  height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #111; color: #f4f4f4; font-size: 13px; min-width: 180px;
}
.jss-table { width: 100%; font-size: 12px; }
.jss-table th, .jss-table td { padding: 5px 6px; }
.jss-table input {
  width: 100%; height: 30px; padding: 0 6px; border: 1px solid var(--line);
  border-radius: 6px; background: #111; color: #f4f4f4; font-size: 12px;
}
.jss-table tfoot td { font-weight: 600; padding-top: 8px; }
.jss-block { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.jss-block textarea {
  display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #111; color: #f4f4f4;
  resize: vertical; font-size: 13px; font-family: inherit;
}
.jss-block input[type="file"] { color: var(--ink); font-size: 12px; }
.jss-table .link-button.jss-del { color: #e2504a; }

/* 侧栏顶部待办提醒 */
.nav-todo-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 0.5px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.nav-todo-alert:hover { background: rgba(255, 255, 255, 0.06); }
.nav-todo-alert .nav-todo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3f47;
  flex: 0 0 auto;
}
.nav-todo-alert .nav-todo-text { flex: 1; text-align: left; }
.nav-todo-alert .nav-todo-count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #2a2f37;
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-todo-alert.has-todo {
  border-color: rgba(226, 80, 74, 0.5);
  background: rgba(226, 80, 74, 0.08);
}
.nav-todo-alert.has-todo .nav-todo-dot {
  background: #e2504a;
  box-shadow: 0 0 0 0 rgba(226, 80, 74, 0.6);
  animation: navTodoPulse 1.2s infinite;
}
.nav-todo-alert.has-todo .nav-todo-count { background: #e2504a; color: #fff; }
@keyframes navTodoPulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 80, 74, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(226, 80, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 80, 74, 0); }
}

/* ===== 渐变胶囊页面标签(参考 gradient-menu) ===== */
.module-actions .action-step {
  position: relative;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.25s ease !important;
}
.module-actions .action-step:nth-child(1) { --gfrom: #a955ff; --gto: #ea51ff; }
.module-actions .action-step:nth-child(2) { --gfrom: #56ccf2; --gto: #2f80ed; }
.module-actions .action-step:nth-child(3) { --gfrom: #ff9966; --gto: #ff5e62; }
.module-actions .action-step:nth-child(4) { --gfrom: #80ff72; --gto: #7ee8fa; }
.module-actions .action-step:nth-child(5) { --gfrom: #ffa9c6; --gto: #f434e2; }
.module-actions .action-step:nth-child(6) { --gfrom: #f6d365; --gto: #fda085; }
.module-actions .action-step:nth-child(n + 7) { --gfrom: #1677ff; --gto: #56ccf2; }

/* 标签切换:新激活白胶囊带方向滑入的过渡动画(用 left,避开 active 的 transform:none !important) */
@keyframes actionPillSlide {
  from { left: var(--pill-from, 0px); opacity: 0.4; }
  to   { left: 0; opacity: 1; }
}
.module-command-bar .module-actions .action-step.is-active.pill-anim {
  animation: none;
}

/* 仅「选中」标签为白胶囊；hover 用柔和灰，避免看着像两个同时选中 */
.module-command-bar.is-flow-first .action-step.is-active,
.module-command-bar .module-actions .action-step.is-active,
.module-command-bar .module-actions .action-step.is-default,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active,
body[data-theme="dark"] .module-command-bar .module-actions .action-step.is-active,
body[data-theme="dark"] .module-command-bar .module-actions .action-step.is-default {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #181818 !important;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35) !important;
  transform: none !important;
}
/* hover（非选中）：柔和灰底，不抢选中态 */
.module-command-bar .module-actions .action-step:not(.is-active):hover,
.module-command-bar .module-actions .action-step:not(.is-active):focus-visible,
body[data-theme="dark"] .module-command-bar .module-actions .action-step:not(.is-active):hover,
body[data-theme="dark"] .module-command-bar .module-actions .action-step:not(.is-active):focus-visible {
  background: color-mix(in srgb, var(--ink) 12%, transparent) !important;
  border-color: transparent !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  transform: none !important;
}
/* 仅选中标签白底深字（hover 不再强制深字，保持浅色） */
.module-command-bar .module-actions .action-step.is-active strong,
.module-command-bar .module-actions .action-step.is-default strong,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active strong,
body[data-theme="dark"] .module-command-bar .module-actions .action-step.is-active strong,
body[data-theme="dark"] .module-command-bar .module-actions .action-step.is-default strong {
  color: #181818 !important;
}
/* 序号位置改用图标,无底色,直接显示 */
.module-command-bar .module-actions .action-step .action-step-index,
body[data-theme="dark"] .module-command-bar .module-actions .action-step .action-step-index {
  background: transparent !important;
  box-shadow: none !important;
}
.module-command-bar .module-actions .action-step .action-step-index b,
body[data-theme="dark"] .module-command-bar .module-actions .action-step .action-step-index b,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step .action-step-index b,
.module-command-bar .module-actions .action-step.is-active .action-step-index b,
.module-command-bar .module-actions .action-step:hover .action-step-index b,
body[data-theme="dark"] .module-command-bar.is-flow-first .action-step.is-active .action-step-index b,
body[data-theme="dark"] .module-command-bar .module-actions .action-step.is-active .action-step-index b,
body[data-theme="dark"] .module-command-bar .module-actions .action-step:hover .action-step-index b {
  background: transparent !important;
  box-shadow: none !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: inherit !important;
}
.module-actions .action-step .action-step-index b svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 命令栏:去掉内层容器底色,只保留外层一个底(消除双层) */
.module-command-bar .module-command-track,
.module-command-bar .module-import-scope,
.module-command-bar .module-actions,
body[data-theme="dark"] .module-command-bar .module-command-track,
body[data-theme="dark"] .module-command-bar .module-import-scope,
body[data-theme="dark"] .module-command-bar .module-actions {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* ===== 全局分段 Tab 统一标准:固定高度 + 垂直居中,所有 tab 一致 ===== */
:root { --seg-h: 34px; }

/* 命令栏标签:外层一个底、垂直居中、统一高度 */
body.is-business-page .module-command-bar.is-flow-first { padding-top: 5px !important; padding-bottom: 5px !important; }
body.is-business-page .module-command-bar.is-flow-first .module-command-track,
body.is-business-page .module-command-bar.is-flow-first .module-import-scope,
body.is-business-page .module-command-bar.is-flow-first .module-actions {
  align-items: center !important;
}
body.is-business-page .module-command-bar.is-flow-first .module-actions .action-step {
  height: var(--seg-h) !important;
  min-height: var(--seg-h) !important;
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 14px !important;
}

/* 详情页 tab / 切换器:容器透明无底、垂直居中,消除双层与忽高忽低 */
.inspector-tabs,
body[data-theme="dark"] .inspector-tabs,
.todo-scope-tabs,
.company-management-switcher,
.tabs {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  gap: 8px !important;
  align-items: center !important;
}
.inspector-tab,
.todo-scope-tabs button,
.company-management-switcher button,
.tabs button {
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  height: var(--seg-h) !important;
  min-height: var(--seg-h) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
}
/* 激活项:白色高亮胶囊 + 深色文字 + 轻阴影 */
.inspector-tab.is-active,
.todo-scope-tabs button.is-active,
.company-management-switcher button.is-active,
.tabs button.is-active,
body[data-theme="dark"] .inspector-tab.is-active,
body[data-theme="dark"] .todo-scope-tabs button.is-active,
body[data-theme="dark"] .company-management-switcher button.is-active,
body[data-theme="dark"] .tabs button.is-active {
  background: #ffffff !important;
  color: #181818 !important;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35) !important;
}

/* ===== 命令栏改回文档流,与主面板/详情共用同一内容盒,左右天然对齐 ===== */
@media (min-width: 821px) {
  body.is-business-page .topbar { display: none !important; }
  body.is-business-page .module-command-bar,
  body.is-business-page .module-command-bar.is-flow-first {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: auto !important;
    margin: 0 0 10px 0 !important;
  }
  body.is-business-page .content {
    padding: 14px 24px 18px 16px !important;
  }
  body.is-business-page .business-workbench,
  body.is-business-page .site-budget-workbench {
    margin-top: 0 !important;
    height: calc(100vh - var(--sticky-command-height) - 52px) !important;
  }
  body.is-business-page .business-inspector,
  body.is-business-page .site-budget-inspector {
    position: static !important;
    top: auto !important;
  }
}

/* 物资入库等宽台账:隐藏详情栏,表格整宽 */
body.is-business-page .business-workbench.no-inspector { grid-template-columns: 1fr !important; }
.business-workbench.no-inspector .business-inspector { display: none !important; }

/* 物资入库:未开票/未付款行的红色提示 */
.business-table tr.row-warn td { background: rgba(226, 80, 74, 0.14) !important; }

/* 详情栏 开票/付款 开关:上下堆叠、胶囊圆角、滑块左右动画 */
.inspector-actions .seg2 { flex: 0 0 auto; width: 100%; position: relative; display: flex; height: 42px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 0; background: transparent; }
.seg2-thumb { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 999px; z-index: 0; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease; }
.seg2 .seg2-btn { position: relative; z-index: 1; flex: 1; border: none; background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: color 0.3s ease; }
.seg2[data-seg-yes="0"] .seg2-btn:nth-of-type(1) { color: #fff; }
.seg2[data-seg-yes="1"] .seg2-btn:nth-of-type(2) { color: #fff; }

/* 供货商表:取消"第8列起隐藏"的全局规则,让 序号…节点日期+操作 全部显示 */
body.is-business-page .business-table.supplier-cols th:nth-child(n + 8),
body.is-business-page .business-table.supplier-cols td:nth-child(n + 8) {
  display: table-cell !important;
}
/* 供货商表:表格铺满整宽(消除右侧留白),列宽自适应、不截断省略号 */
body.is-business-page .business-table.supplier-cols table { width: 100% !important; table-layout: auto !important; }
body.is-business-page .business-table.supplier-cols { table-layout: auto; }
body.is-business-page .business-table.supplier-cols th,
body.is-business-page .business-table.supplier-cols td {
  width: auto !important;
  max-width: none !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
/* 操作列吃掉剩余宽度,把右侧留白补满 */
body.is-business-page .business-table.supplier-cols th:last-child,
body.is-business-page .business-table.supplier-cols td:last-child { width: 100% !important; text-align: left; }
/* 物资入库表:全部列显示;固定布局 + 各列等宽,均匀分布、铺满整宽 */
body.is-business-page .business-table.inbound-cols th:nth-child(n + 8),
body.is-business-page .business-table.inbound-cols td:nth-child(n + 8) {
  display: table-cell !important;
}
.business-table.inbound-cols table { table-layout: auto !important; width: 100% !important; }
.business-table.inbound-cols th,
.business-table.inbound-cols td {
  width: 8.7% !important;
  max-width: none !important;
  white-space: nowrap;
  overflow: visible !important;
  text-overflow: clip;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
/* 序号列最窄,其余 11 列大致等宽平分,内容需要时自动撑开(不裁切) */
.business-table.inbound-cols th:first-child,
.business-table.inbound-cols td:first-child { width: 3% !important; }
/* 是否开票 / 是否付款 两列:开关居中 */
.business-table.inbound-cols th:nth-child(10), .business-table.inbound-cols td:nth-child(10),
.business-table.inbound-cols th:nth-child(11), .business-table.inbound-cols td:nth-child(11) { text-align: center; }
/* 操作列:两个按钮整体显示,绝不省略 */
.business-table.inbound-cols .op-cell { white-space: nowrap; overflow: visible !important; }

/* ===== 全局去掉右侧详情后:业务表"操作"列 + 行内状态 ===== */
/* 普通业务表(非入库/供货商)改自适应布局,确保操作列完整显示 */
body.is-business-page .business-table.fw-actions:not(.inbound-cols):not(.supplier-cols) { overflow-x: auto; }
body.is-business-page .business-table.fw-actions:not(.inbound-cols):not(.supplier-cols) table {
  table-layout: auto !important;
  width: 100% !important;
}
body.is-business-page .business-table.fw-actions:not(.inbound-cols):not(.supplier-cols) th,
body.is-business-page .business-table.fw-actions:not(.inbound-cols):not(.supplier-cols) td {
  width: auto !important;
  max-width: none !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  display: table-cell !important;
}
/* 操作列:低调描边按钮(只让开关有色,这里中性,悬停才显蓝/红) */
.business-table .op-cell { white-space: nowrap; text-align: right; }
.business-table.inbound-cols .op-cell { text-align: left; }
.business-table td.op-cell .op-btn {
  min-height: 28px;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  padding: 0 12px;
  cursor: pointer;
  margin: 0 8px 0 0;
  box-shadow: none;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.business-table td.op-cell .op-btn:hover {
  border-color: #1677ff !important;
  color: #1677ff !important;
  background: rgba(22, 119, 255, 0.08) !important;
}
.business-table td.op-cell .op-btn.danger:hover {
  border-color: #e2504a !important;
  color: #e2504a !important;
  background: rgba(226, 80, 74, 0.08) !important;
}
.business-table td.op-cell .op-btn[disabled] {
  border-color: var(--line) !important;
  background: transparent !important;
  color: var(--muted) !important;
  cursor: default;
  opacity: 0.6;
}

/* 物资入库:开票/付款 两个左右滑动开关(左红右绿)横向并排 */
.business-table .inbound-status-row { display: flex; flex-direction: row; gap: 8px; align-items: center; justify-content: flex-start; }
.business-table .seg2 {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 92px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  margin: 0;
}
.business-table .seg2 .seg2-thumb {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  border-radius: 999px;
  z-index: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s ease;
}
.business-table .seg2 .seg2-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 0;
  white-space: nowrap;
  transition: color 0.28s ease;
}
.business-table .seg2[data-seg-yes="0"] .seg2-btn:nth-of-type(1) { color: #fff; }
.business-table .seg2[data-seg-yes="1"] .seg2-btn:nth-of-type(2) { color: #fff; }

/* 物资入库:iOS 风格滑动开关——未=红底钮左,已=绿底钮右 */
.business-table .io-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  border: none;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
  flex: 0 0 auto;
  transition: background 0.25s ease;
}
.business-table .io-switch.off { background: #e2504a; }
.business-table .io-switch.on { background: #37b26a; }
.business-table .io-switch .io-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.business-table .io-switch.on .io-knob { transform: translateX(20px); }

/* ===== 在线表格(类 Excel/WPS) ===== */
.sheet-page { display: flex; flex-direction: column; gap: 8px; height: calc(100vh - var(--topbar-height) - 36px); }
.sheet-hint { font-size: 12px; color: var(--muted); }
/* Luckysheet 在线表格容器 */
.sheet-page-lk { position: relative; width: 100%; height: calc(100vh - var(--topbar-height) - 24px); background: #fff; border-radius: 8px; overflow: hidden; }
body[data-theme="dark"] .sheet-page-lk { background: #f6f8fb; border-radius: 0; }
/* 在线表格编辑器:整页锁满屏,外层不滚动,只让 Univer 内部滚动 */
.content.sheet-fullscreen { height: 100vh !important; overflow: hidden !important; padding: 0 !important; }
.content.sheet-fullscreen .sheet-editor-wrap { height: 100vh; border-top-left-radius: 14px; border-bottom-left-radius: 14px; overflow: hidden; }
/* 编辑器视图:控件浮层叠在 Univer 顶部标签行上,合成一行 */
.sheet-editor-wrap { position: relative; height: calc(100vh - var(--topbar-height) - 24px); }
.sheet-editor-wrap .sheet-page-lk { position: absolute; inset: 0; height: 100%; }
.sheet-ov { position: absolute; top: 7px; z-index: 6; display: flex; align-items: center; gap: 8px; }
.sheet-ov-left { left: 12px; }
.sheet-ov-right { right: 12px; }
.sheet-ov-btn { padding: 5px 12px; font-size: 13px; border: 1px solid #d5dbe5; background: #fff; color: #2b3445; border-radius: 7px; cursor: pointer; line-height: 1.1; }
.sheet-ov-btn:hover { border-color: #1677ff; color: #1677ff; }
.sheet-ov-primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.sheet-ov-primary:hover { background: #0958d9; color: #fff; }
.sheet-ov-name { font-size: 14px; font-weight: 600; color: #1f2937; cursor: pointer; user-select: none; white-space: nowrap; }
.sheet-ov-icon { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d5dbe5; background: #fff; color: #5a6573; border-radius: 6px; cursor: pointer; font-size: 13px; }
.sheet-ov-icon:hover { border-color: #1677ff; color: #1677ff; }
/* 前置页面:表格卡片 */
.sheet-home { padding: 4px 2px; }
.sheet-home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-home-title { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; }
.sheet-home-sub { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.sheet-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sheet-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; text-align: left; }
.sheet-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(22,119,255,.12); transform: translateY(-1px); }
.sheet-card-icon { width: 40px; height: 40px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--panel)); border-radius: 9px; }
.sheet-card-body { min-width: 0; flex: 1; }
.sheet-card-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-card-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sheet-card-del { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border: none; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.sheet-card:hover .sheet-card-del { opacity: 1; }
.sheet-card-del:hover { background: color-mix(in srgb, var(--red) 14%, var(--panel)); color: var(--red); }
/* ===== Office 风格首页 ===== */
.sheet-office { padding: 6px 2px 16px; display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-height) - 56px); }
.so-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.so-title { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0; }
.so-sub { font-size: 13px; color: var(--muted); margin: 5px 0 0; }
.so-tools { display: flex; align-items: center; gap: 10px; }
.so-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 22px 2px 12px; letter-spacing: .5px; }
.so-new-row { display: flex; gap: 14px; flex-wrap: wrap; }
.so-tile { width: 150px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .1s; }
.so-tile:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(22,119,255,.14); transform: translateY(-1px); }
.so-tile-thumb { height: 84px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }
.so-tile-name { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--ink); text-align: left; }
.so-folder-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.so-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.so-row { display: grid; grid-template-columns: 1fr 160px 180px 70px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.so-row:last-child { border-bottom: none; }
.so-row:hover:not(.so-row-head) { background: color-mix(in srgb, var(--blue) 6%, var(--panel)); }
.so-row-head { cursor: default; font-size: 12px; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--canvas) 40%, var(--panel)); }
.so-c { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-c-name { display: flex; align-items: center; gap: 8px; }
.so-ico { font-size: 15px; }
.so-c-loc, .so-c-date { color: var(--muted); }
.so-c-act { display: flex; gap: 6px; justify-content: flex-end; opacity: 0; transition: opacity .12s; }
.so-row:hover .so-c-act { opacity: 1; }
.so-c-act button { width: 24px; height: 24px; border: none; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 12px; }
.so-c-act button:hover { background: color-mix(in srgb, var(--blue) 14%, var(--panel)); color: var(--blue); }
.so-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }
/* 翻页栏固定在页面底部,样式复用系统 .pager */
.so-pager { margin-top: auto; padding-top: 16px; }
.sheet-card-new { flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--blue); border-style: dashed; min-height: 86px; font-weight: 600; }
.sheet-card-new .sheet-card-plus { font-size: 26px; line-height: 1; }
.sheet-card-folder .sheet-card-icon { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, var(--panel)); }
.sheet-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--panel)); border-radius: 5px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.sheet-card-act { position: absolute; top: 8px; right: 32px; width: 22px; height: 22px; border: none; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.sheet-card:hover .sheet-card-act { opacity: 1; }
.sheet-card-act:hover { background: color-mix(in srgb, var(--blue) 14%, var(--panel)); color: var(--blue); }
.sheet-home-actions { display: flex; align-items: center; gap: 10px; }
.sheet-section-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 2px 10px; letter-spacing: .5px; }
.sheet-section-title:first-of-type { margin-top: 4px; }
.sheet-crumb-link { cursor: pointer; color: var(--blue); }
.sheet-crumb-link:hover { text-decoration: underline; }
.sheet-crumb-sep { margin: 0 8px; color: var(--muted); font-weight: 400; }
.sheet-editor-spacer { flex: 1 1 auto; }
.sheet-editor-name { cursor: pointer; user-select: none; }
.sheet-rename-icon { flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; }
.sheet-rename-icon:hover { border-color: var(--blue); color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }
.sheet-editor-bar .ghost-button, .sheet-editor-bar .primary-button { padding: 6px 14px; }
/* 输入弹窗 */
.ui-prompt-input { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 9px 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); outline: none; }
.ui-prompt-input:focus { border-color: var(--blue); }
/* 选择文件夹弹窗 */
.folder-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.folder-opt { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; }
.folder-opt:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 6%, var(--panel)); }
.folder-opt.is-cur { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--panel)); font-weight: 600; }
.sheet-page-lk #luckysheet { position: absolute; inset: 0; }
.sheet-page-lk .sheet-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* Luckysheet 弹层在暗色主题下保持其自身浅色样式,避免被全局样式干扰 */
.luckysheet-modal-dialog, .luckysheet-cols-menu, #luckysheet-rightclick-menu, .luckysheet-input-box { color: #333; }
/* 工具栏 */
.xribbon { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.xribbon .xbtn { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; padding: 0 7px; }
.xribbon .xbtn:hover { background: rgba(255,255,255,0.08); border-color: var(--line); }
.xribbon .xcolorbtn { position: relative; overflow: hidden; }
.xribbon .xcolorbtn input[type="color"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.xribbon .xsize { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); padding: 0 6px; }
body[data-theme="dark"] .xribbon .xsize { background: #111; }
.xribbon .xsep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
/* 公式栏 */
.xformula { display: flex; align-items: center; gap: 8px; }
.xformula .xref { min-width: 64px; text-align: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-weight: 600; font-size: 13px; }
.xformula .xfx-icon { color: var(--muted); font-style: italic; }
.xformula .xfx { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); font-size: 13px; }
body[data-theme="dark"] .xformula .xref, body[data-theme="dark"] .xformula .xfx { background: #111; }
/* 网格 */
.sheet-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.xgrid { border-collapse: collapse; font-size: 13px; width: max-content; }
.xgrid th, .xgrid td { border: 1px solid var(--line); padding: 0; }
.xgrid .xh, .xgrid .xcorner, .xgrid .xrow { background: #eef1f5; color: #475569; text-align: center; font-weight: 600; font-size: 12px; }
body[data-theme="dark"] .xgrid .xh, body[data-theme="dark"] .xgrid .xcorner, body[data-theme="dark"] .xgrid .xrow { background: #20262f; color: #aab3c0; }
.xgrid .xh { position: sticky; top: 0; z-index: 3; height: 24px; min-width: 110px; }
.xgrid .xrow { position: sticky; left: 0; z-index: 2; min-width: 44px; width: 44px; }
.xgrid .xcorner { position: sticky; top: 0; left: 0; z-index: 4; min-width: 44px; }
.xgrid .xc { display: flex; align-items: center; min-height: 30px; padding: 4px 8px; outline: none; color: var(--ink); cursor: cell; white-space: nowrap; overflow: hidden; }
.xgrid .xc.is-sel { background: color-mix(in srgb, var(--blue) 14%, transparent); }
.xgrid .xc.is-active { outline: 2px solid var(--blue); outline-offset: -2px; }
.xribbon .xfont { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); padding: 0 6px; max-width: 130px; }
body[data-theme="dark"] .xribbon .xfont { background: #111; }
.wb-sheet-del { padding: 2px 8px !important; color: var(--muted); }

/* ===== 工作台 v2 内容看板(深灰夜间 + 浅色日间通用) ===== */
.wb2{display:flex;flex-direction:column;gap:14px;margin-top:4px}
.wb2-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.wb2-count{display:flex;align-items:center;gap:13px;padding:14px 18px;cursor:pointer}
.wb2-cic{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--muted)}
.wb2-cic .app-icon{width:20px;height:20px}
.wb2-cv{font-size:26px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.wb2-cv small{font-size:12px;font-weight:400;color:var(--muted);margin-left:3px}
.wb2-cl{font-size:12px;color:var(--muted);margin-top:5px}

.wb2-todo{padding:14px 18px}
.wb2-th{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600}
.wb2-thic{width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--red) 18%,transparent);color:var(--red);display:grid;place-items:center}
.wb2-thic .app-icon{width:16px;height:16px}
.wb2-th .link-button{margin-left:auto;font-size:12px}
.wb2-todos{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}
.wb2-ti{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--ink);background:color-mix(in srgb,var(--ink) 4%,transparent);border:1px solid var(--line);border-radius:10px;padding:10px 13px;cursor:pointer;text-align:left}
.wb2-ti:hover{border-color:var(--line-dark)}
.wb2-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.wb2-dot.r{background:var(--red)}.wb2-dot.a{background:var(--amber)}
.wb2-tt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wb2-ar{color:var(--muted)}

.wb2-fin{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.wb2-fc{padding:15px 17px;cursor:pointer}
.wb2-fl{font-size:12px;color:var(--muted);margin-bottom:10px}
.wb2-fv{font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1}
.wb2-fs{font-size:10.5px;color:var(--muted);margin-top:8px}
.wb2-minibar{height:5px;border-radius:4px;background:color-mix(in srgb,var(--ink) 8%,transparent);overflow:hidden;margin-top:9px}
.wb2-minibar i{display:block;height:100%}
.wb2-fc.wb2-hl{border-color:color-mix(in srgb,var(--green) 38%,var(--line))}

.wb2-board{padding:16px 18px}
.wb2-tabs{display:inline-flex;background:color-mix(in srgb,var(--ink) 5%,transparent);border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px;margin-bottom:12px}
.wb2-tabs span{font-size:12.5px;padding:7px 14px;border-radius:7px;color:var(--muted);cursor:pointer}
.wb2-tabs span.on{background:var(--ink);color:var(--canvas);font-weight:600}
.wb2-tbl{width:100%;border-collapse:separate;border-spacing:0;font-size:13.5px}
.wb2-tbl th{text-align:left;font-size:11.5px;font-weight:600;color:var(--muted);padding:10px 6px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--ink) 4%,transparent)}
.wb2-tbl th.r{text-align:right}
.wb2-tbl td{padding:13px 6px;border-bottom:1px solid color-mix(in srgb,var(--ink) 7%,transparent);color:var(--ink)}
.wb2-tbl td.r{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.wb2-tbl td.m{color:var(--muted);font-weight:400}
.wb2-tbl tr:last-child td{border:none}
.wb2-nm{display:flex;align-items:center;gap:9px}
.wb2-d{width:8px;height:8px;border-radius:3px;flex:0 0 auto}
@media (max-width:1100px){.wb2-counts{grid-template-columns:1fr}.wb2-fin{grid-template-columns:repeat(2,1fr)}.wb2-todos{grid-template-columns:repeat(2,1fr)}}

/* ===== 待办提醒 下级页面 ===== */
.todo-page{gap:14px}
.todo-top{display:flex;align-items:center;gap:14px;padding:16px 20px}
.todo-top .wb2-thic{width:42px;height:42px}
.todo-top .wb2-thic .app-icon{width:20px;height:20px}
.todo-top-v{font-size:28px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.todo-top-l{font-size:12px;color:var(--muted);margin-top:5px}
.todo-sec{padding:14px 18px}
.todo-sec-h{display:flex;align-items:baseline;gap:10px;margin-bottom:6px}
.todo-sec-h strong{font-size:14px;font-weight:600}
.todo-sec-h span{font-size:11.5px;color:var(--muted)}
.todo-sections{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.todo-list{display:flex;flex-direction:column}
.todo-item{display:flex;flex-direction:column;gap:6px;border:none;border-radius:0;background:transparent;border-bottom:1px solid color-mix(in srgb,var(--ink) 7%,transparent);padding:11px 4px;cursor:pointer;color:var(--ink);font-family:inherit;text-align:left;width:100%}
.todo-item:last-child{border-bottom:none}
.todo-item:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}
.todo-r1{display:flex;align-items:center;gap:9px}
.todo-d{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.todo-item.urgent .todo-d{background:var(--red)}
.todo-item:not(.urgent) .todo-d{background:var(--amber)}
.todo-ttl{flex:1;min-width:0;font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.todo-st{margin-left:auto;font-size:11px;font-weight:600;padding:3px 9px;border-radius:20px;white-space:nowrap;background:color-mix(in srgb,var(--amber) 16%,transparent);color:var(--amber)}
.todo-item.urgent .todo-st{background:color-mix(in srgb,var(--red) 16%,transparent);color:var(--red)}
.todo-meta{font-size:11.5px;color:var(--muted)}
.todo-empty{font-size:12.5px;color:var(--muted);padding:14px 4px}
@media (max-width:900px){.todo-sections{grid-template-columns:1fr}}

/* ===== 财务管理：税务管理 / 财务报表 内页 ===== */
.fin2{display:flex;flex-direction:column;gap:14px;margin-top:12px}
.fin2-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.fin2-kpi{padding:14px 16px;border-radius:14px;display:flex;flex-direction:column;gap:7px}
.fin2-kpi span{font-size:12px;color:var(--muted)}
.fin2-kpi strong{font-size:22px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.fin2-kpi em{font-size:11px;color:var(--weak,var(--muted));font-style:normal}
.fin2-card{padding:0;overflow:hidden}
.fin2-h{display:flex;align-items:center;padding:15px 18px;border-bottom:1px solid color-mix(in srgb,var(--ink) 8%,transparent)}
.fin2-h strong{font-size:14px}
.fin2-h span{font-size:11.5px;color:var(--muted);margin-left:10px}
.fin2-tag{margin-left:auto;font-size:11px;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:3px 11px;font-style:normal}
.fin2-tbl{width:100%;border-collapse:separate;border-spacing:0}
.fin2-tbl thead th{font-size:11.5px;font-weight:600;letter-spacing:.3px;color:var(--muted);text-align:left;padding:12px 18px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--ink) 4%,transparent)}
.fin2-tbl thead th.r{text-align:right}
.fin2-tbl tbody td{padding:13px 18px;border-bottom:1px solid color-mix(in srgb,var(--ink) 6%,transparent);font-size:13.5px;color:var(--ink)}
.fin2-tbl tbody td.r{text-align:right;font-variant-numeric:tabular-nums}
.fin2-tbl tbody td.mut{color:var(--muted)}
.fin2-tbl tbody td.b6{font-weight:600}
.fin2-tbl tbody tr:last-child td{border-bottom:none}
.fin2-tbl tbody tr.sub td{font-weight:600}
.fin2-tbl tbody tr.sum td{background:color-mix(in srgb,var(--ink) 5%,transparent);font-weight:700}
.fin2-badge{font-size:11px;padding:2px 9px;border-radius:20px;background:color-mix(in srgb,var(--blue) 16%,transparent);color:var(--blue);border:1px solid color-mix(in srgb,var(--blue) 28%,transparent)}
.fin2-2col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fin2-note{font-size:11.5px;color:var(--muted);line-height:1.7;margin:2px 2px 0}
@media (max-width:900px){.fin2-kpis{grid-template-columns:repeat(2,1fr)}.fin2-2col{grid-template-columns:1fr}}

/* 员工资料：薪酬数字列 + 编号 */
.employee-table th.num,.employee-table td.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.employee-table .emp-code{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.employee-create-form input[inputmode="decimal"]{text-align:left}

/* 自有员工工资页 */
.pay2-bar{display:flex;align-items:flex-end;gap:14px;padding:14px 16px;flex-wrap:wrap}
.pay2-f{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted)}
.pay2-f select,.pay2-f input{height:36px;padding:0 10px;border-radius:9px;border:1px solid var(--line);background:var(--soft);color:var(--ink);font-size:13px;min-width:120px}
.pay2-spacer{flex:1}
.pay2-tbl td,.pay2-tbl th{white-space:nowrap}
.pay2-tbl .pay-sub{font-size:11px;color:var(--muted);margin-top:2px}
.pay2-tbl .pay-input{padding:8px 10px}
.pay2-tbl .pay-in{width:78px;height:32px;padding:0 8px;border-radius:8px;border:1px solid var(--line);background:var(--soft);color:var(--ink);font-size:13px;text-align:right;font-variant-numeric:tabular-nums}
.pay2-tbl .pay-in:focus{outline:none;border-color:color-mix(in srgb,var(--ink) 35%,transparent)}

/* 新建员工：生成账号勾选项 */
.employee-create-form .emp-genacc{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:12.5px;color:var(--muted)}
.employee-create-form .emp-genacc input{flex:0 0 auto;width:16px;height:16px;accent-color:var(--green);margin:0}
.employee-create-form .emp-genacc span{line-height:1.3}
/* 桌面端：姓名/身份证/手机号/项目 + 勾选 + 按钮 全部一行 */
@media (min-width:1000px){
  body.is-company-page .employee-create-form,
  .employee-create-form{
    grid-template-columns:minmax(110px,1fr) minmax(150px,1.1fr) minmax(120px,1fr) minmax(120px,1fr) minmax(190px,250px) auto !important;
    align-items:end !important;
  }
  .employee-create-form .emp-genacc{grid-column:auto !important;align-self:end;white-space:normal;padding-bottom:8px}
  .employee-create-form>button{align-self:end;white-space:nowrap}
}

/* 发票识别弹窗 */
.inv-ocr-box{max-width:480px;width:92vw;text-align:left}
.inv-ocr-drop{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 16px;border:1.5px dashed var(--line);border-radius:14px;background:color-mix(in srgb,var(--ink) 3%,transparent);cursor:pointer;text-align:center;margin:6px 0 12px}
.inv-ocr-drop:hover{border-color:color-mix(in srgb,var(--ink) 30%,transparent)}
.inv-ocr-drop strong{font-size:14px}
.inv-ocr-drop span{font-size:11.5px;color:var(--muted);line-height:1.5}
.inv-ocr-status{font-size:12px;color:var(--muted);margin-bottom:10px;min-height:18px}
.inv-ocr-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px}
.inv-ocr-fields label{display:grid;gap:4px;font-size:11.5px;color:var(--muted)}
.inv-ocr-fields input{height:34px;padding:0 10px;border-radius:9px;border:1px solid var(--line);background:var(--soft);color:var(--ink);font-size:13px}

/* 发票管理：拖入识别区（矮条，不抢占列表空间） */
.inv-drop{flex:0 0 auto;height:auto;min-height:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:4px 0 10px;padding:12px 16px;border:1.5px dashed color-mix(in srgb,var(--ink) 18%,transparent);border-radius:12px;background:color-mix(in srgb,var(--ink) 3%,transparent);cursor:pointer;text-align:center;transition:border-color .15s,background .15s}
.inv-drop svg{width:20px;height:20px}
.inv-drop .inv-drop-main{font-size:13px}
.inv-drop:hover{border-color:color-mix(in srgb,var(--ink) 34%,transparent);background:color-mix(in srgb,var(--ink) 6%,transparent)}
.inv-drop.is-over{border-color:var(--green);background:color-mix(in srgb,var(--green) 12%,transparent)}
.inv-drop.is-busy{opacity:.7;pointer-events:none}
.inv-drop svg{width:26px;height:26px;color:color-mix(in srgb,var(--ink) 55%,transparent)}
.inv-drop-main{font-size:13.5px;font-weight:600;color:var(--ink)}
.inv-drop-tip{font-size:11.5px;color:var(--muted)}

/* 发票管理：含拖拽区时改为 5 行网格，拖拽区占固定行、表格保持弹性行 */
body.is-business-page .business-main.has-invoice-drop{grid-template-rows:auto auto auto minmax(0,1fr) auto}

/* 发票管理：进项/销项切换 + 工具区 */
.inv-toolzone{display:flex;flex-direction:column;gap:8px;min-height:0}
.inv-seg{display:inline-flex;gap:4px;background:color-mix(in srgb,var(--ink) 5%,transparent);border:1px solid var(--line);border-radius:10px;padding:3px;align-self:flex-start}
.inv-seg-btn{font-size:12.5px;padding:6px 14px;border-radius:7px;border:none;background:transparent;color:var(--muted);cursor:pointer;white-space:nowrap}
.inv-seg-btn.on{background:var(--ink);color:var(--canvas,#fff);font-weight:600}

/* 列表内附件链接 */
.row-attach{display:inline-block;margin-top:4px;font-size:11.5px;color:var(--green);text-decoration:none}
.row-attach:hover{text-decoration:underline}

/* 操作列：附件按钮 */
a.op-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.op-cell .op-attach{color:var(--green)}
.op-cell .op-attach:hover{border-color:color-mix(in srgb,var(--green) 55%,transparent)}

/* 附件预览：居中弹窗 */
.att-prev-overlay{position:fixed;inset:0;z-index:1200;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:24px;opacity:0;transition:opacity .18s}
.att-prev-overlay.is-open{opacity:1}
.att-prev-panel{width:min(760px,94vw);height:min(86vh,900px);background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;transform:scale(.96);transition:transform .18s}
.att-prev-overlay.is-open .att-prev-panel{transform:scale(1)}
.att-prev-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}
.att-prev-head strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-prev-actions{display:flex;gap:8px;flex:0 0 auto}
.att-prev-body{flex:1;min-height:0;overflow:auto;padding:14px;display:flex;align-items:flex-start;justify-content:center;background:var(--bg)}
.att-prev-img{max-width:100%;height:auto;border-radius:8px}
.att-prev-frame{width:100%;height:100%;border:none;border-radius:8px;background:#fff}
.att-prev-other{color:var(--muted);text-align:center;margin:auto;font-size:13px}
.att-prev-other a{color:var(--green)}

/* 操作列按钮右对齐时最后一个不留右边距 */
.business-table .op-cell .op-btn:last-child{margin-right:0}
.business-table.inbound-cols .op-cell .op-btn:last-child{margin-right:8px}
