:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --panel: #ffffff;
  --text: #172026;
  --muted: #66727d;
  --line: #dfe6ea;
  --primary: #176b5d;
  --primary-strong: #0d4f45;
  --accent: #b44832;
  --warning: #a66a00;
  --sidebar: #13211f;
  --shadow: 0 16px 44px rgba(23, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

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

.login-role {
  min-height: 38px;
  border: 1px solid #cbd7dc;
  border-radius: 8px;
  background: #f6f9fa;
  color: #31505b;
  cursor: pointer;
  font-weight: 700;
}

.login-role.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.login-field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-field select,
.login-field input {
  min-height: 38px;
  border: 1px solid #cbd7dc;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  color: var(--text);
}

.login-field input {
  font-weight: 400;
  font-size: 14px;
}

.login-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.login-hint {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 13px;
  text-align: center;
}

.current-user {
  align-self: center;
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 账号管理弹窗 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 33, 31, 0.45);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(760px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(23, 32, 38, 0.24);
  padding: 20px 22px 18px;
}

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

.modal-header h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: 46vh;
}

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

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

.user-table-wrap th {
  background: #f6f9fa;
  color: var(--muted);
  font-weight: 700;
  position: sticky;
  top: 0;
}

.user-table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.user-row-disabled td {
  color: var(--muted);
  background: #fafbfb;
}

.user-role-select {
  min-height: 30px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 6px;
  color: var(--text);
}

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

.user-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #f7fbfa;
}

.user-add-row[hidden] {
  display: none;
}

.user-add-row input,
.user-add-row select {
  min-height: 34px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 10px;
  color: var(--text);
}

.user-add-row input {
  flex: 1 1 140px;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.modal-hint {
  color: var(--accent);
  font-size: 13px;
}

.login-submit {
  width: 100%;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.trial-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  border-color: #cbd7dc;
  background: #ffffff;
  color: var(--primary);
}

body:not(.login-view) .login-screen {
  display: none;
}

body.login-view .app-shell {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  min-height: 100vh;
  min-width: 1080px;
}

.sidebar {
  background: var(--sidebar);
  color: #eff7f4;
  min-width: 165px;
  padding: 16px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #f4c95d;
  color: var(--sidebar);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 1px;
  color: #a7bbb5;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  width: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c8d8d3;
  cursor: pointer;
  padding: 9px 8px;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.special-register-view .nav-item[data-register-type="special"].active,
.special-register-view .nav-item[data-register-type="special"]:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.normal-register-view .nav-item[data-register-type="normal"].active,
.normal-register-view .nav-item[data-register-type="normal"]:hover {
  background: #d97706;
  color: #ffffff;
}

.workspace {
  min-width: 0;
  height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar,
.topbar-actions,
.panel-header,
.records-header,
.toolbar {
  display: flex;
  gap: 10px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.salesperson-tab {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 30px;
  border: 1px solid #cbd7dc;
  border-bottom-color: var(--primary);
  border-radius: 6px 6px 0 0;
  background: #e9f0f3;
  color: #31505b;
  cursor: pointer;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
}

.salesperson-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.salesperson-tab:hover {
  border-color: var(--primary);
}

.topbar-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
}

/* 开票员与超级管理员才看到的入口，加个描边更醒目 */
.button-accent {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.button-accent:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.operator-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.operator-field select {
  min-height: 34px;
  border: 1px solid #cbd7dc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.salesperson-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

h2 {
  margin-bottom: 3px;
  font-size: 16px;
}

p {
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  min-height: 34px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.secondary-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

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

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr);
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.panel {
  overflow: hidden;
}

.records-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.panel-header {
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-header p {
  margin-bottom: 0;
}

body.special-register-view .records-panel {
  border-top: 4px solid #1d4ed8;
}

body.normal-register-view .records-panel {
  border-top: 4px solid #d97706;
}

body.special-register-view #recordsTitle,
body.normal-register-view #recordsTitle {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.special-register-view #recordsTitle::after,
body.normal-register-view #recordsTitle::after {
  border-radius: 6px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

body.special-register-view #recordsTitle::after {
  content: "专票登记";
  background: #1d4ed8;
}

body.normal-register-view #recordsTitle::after {
  content: "普票登记";
  background: #d97706;
}

.alert-banner {
  display: none;
  border-bottom: 1px solid #f0c2b8;
  background: #fff1ee;
  color: var(--accent);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.alert-banner.visible {
  display: block;
}

.invoice-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.register-sheet-form {
  gap: 12px;
}

.register-sheet-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.register-sheet {
  min-width: 460px;
  border-collapse: collapse;
  box-shadow: none;
}

.register-sheet th,
.register-sheet td {
  border: 1px solid var(--line);
  padding: 0;
  white-space: normal;
}

.register-sheet th {
  width: 128px;
  background: #f3f7f6;
  color: #26343c;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  text-align: center;
}

.register-sheet td {
  background: #ffffff;
  min-width: 230px;
}

.register-sheet input,
.register-sheet select,
.register-sheet textarea {
  border: 0;
  border-radius: 0;
  min-height: 42px;
  background: transparent;
}

.register-sheet input:focus,
.register-sheet select:focus,
.register-sheet textarea:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.register-sheet .sheet-section-row th {
  background: #dfece8;
  color: var(--primary-strong);
  font-size: 14px;
  text-align: left;
}

fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 18px 0 0;
}

fieldset:first-child {
  border-top: 0;
  padding-top: 0;
}

legend {
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  padding: 0 10px 0 0;
}

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

label {
  display: grid;
  gap: 7px;
  color: #3b464d;
  font-size: 14px;
  font-weight: 700;
}

.wide-field {
  grid-column: 1 / -1;
}

.field-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 9px;
  outline: none;
}

textarea {
  resize: vertical;
}

input[readonly] {
  background: #f7faf9;
  color: #3f4c54;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 93, 0.12);
}

.toolbar {
  align-items: center;
}

.toolbar input {
  min-width: 200px;
}

.toolbar select {
  min-width: 112px;
}

.platform-period-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.platform-period-field input {
  width: 138px;
  min-height: 34px;
}

.platform-period-field select {
  width: auto;
  min-width: 92px;
  min-height: 34px;
}

.platform-period-field input[type="number"] {
  width: 92px;
}

.platform-period-field [hidden] {
  display: none !important;
}

.table-wrap {
  flex: 1;
  min-height: 260px;
  overflow: auto;
  position: relative;
}

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

body.sales-table-view table {
  min-width: 1980px;
}

body.user-manage-view .table-wrap,
body.subject-list-view .table-wrap {
  overflow-x: hidden;
}

body.subject-list-view .table-wrap {
  overflow-x: auto;
}

body.user-manage-view table,
body.subject-list-view table {
  min-width: 0;
}

body.subject-list-view table {
  min-width: 3036px;
}

body.user-manage-view #invoiceTable,
body.subject-list-view #invoiceTable {
  width: 100%;
  table-layout: fixed;
}

body.user-manage-view .user-layer-table {
  min-width: 0;
}

th,
td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

body.summary-table-view th,
body.summary-table-view td {
  padding-top: 7px;
  padding-bottom: 7px;
}

body.summary-table-view th.field-salesperson,
body.summary-table-view td.field-salesperson {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
}

body.summary-table-view .serial-heading,
body.summary-table-view .serial-cell,
body.summary-table-view th.field-salesperson,
body.summary-table-view td.field-salesperson,
body.summary-table-view th.field-fillDate,
body.summary-table-view td.field-fillDate,
body.summary-table-view th.field-companyName,
body.summary-table-view td.field-companyName {
  position: sticky;
  background: #ffffff;
}

body.summary-table-view thead .serial-heading,
body.summary-table-view thead th.field-salesperson,
body.summary-table-view thead th.field-fillDate,
body.summary-table-view thead th.field-companyName {
  z-index: 8;
  background: #f7faf9;
}

body.summary-table-view .serial-heading,
body.summary-table-view .serial-cell {
  left: 0;
}

body.summary-table-view th.field-salesperson,
body.summary-table-view td.field-salesperson {
  left: 52px;
}

body.summary-table-view th.field-fillDate,
body.summary-table-view td.field-fillDate {
  left: 152px;
}

body.summary-table-view th.field-companyName,
body.summary-table-view td.field-companyName {
  left: 278px;
  box-shadow: 2px 0 4px -2px rgba(23, 32, 38, 0.15);
}

body.summary-table-view .serial-cell,
body.summary-table-view td.field-salesperson,
body.summary-table-view td.field-fillDate,
body.summary-table-view td.field-companyName {
  z-index: 4;
}

body.summary-table-view tbody tr:hover > .serial-cell,
body.summary-table-view tbody tr:hover > td.field-salesperson,
body.summary-table-view tbody tr:hover > td.field-fillDate,
body.summary-table-view tbody tr:hover > td.field-companyName {
  background: #eef6f4;
}

.invoice-summary-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #edf5f1;
  color: var(--primary-strong);
  font-weight: 800;
}

.invoice-summary-total-row .summary-total-amount {
  text-align: left;
}

.remark-warning-row td {
  background: #7f1d1d;
  color: #ffffff;
}

.remark-warning-cell,
.remark-warning-row:hover > td {
  background: #991b1b !important;
  color: #ffffff;
}

.rejected-row td {
  background: #ffe5e5;
  color: #8a1f1f;
}

/* 列多、行宽，鼠标所在行高亮一下，避免看串行 */
tbody tr:hover > td {
  background: #eef6f4;
}

.rejected-row:hover > td {
  background: #ffd9d9;
}

/* 横向滚动时冻结左侧"序号 + 公司名称"两列，
   否则拖到右边就不知道自己在看哪条记录了 */
body:not(.platform-income-view):not(.dashboard-view) .serial-cell,
body:not(.platform-income-view):not(.dashboard-view) tbody td:nth-child(2),
body:not(.platform-income-view):not(.dashboard-view) thead th:nth-child(2) {
  position: sticky;
  left: 0;
  background: #ffffff;
}

body:not(.platform-income-view):not(.dashboard-view) tbody td:nth-child(2),
body:not(.platform-income-view):not(.dashboard-view) thead th:nth-child(2) {
  left: 52px;
  box-shadow: 2px 0 4px -2px rgba(23, 32, 38, 0.15);
}

/* 表头要同时吸顶与吸左，层级压过普通单元格 */
body:not(.platform-income-view):not(.dashboard-view) thead .serial-heading,
body:not(.platform-income-view):not(.dashboard-view) thead th:nth-child(2) {
  z-index: 6;
  background: #f7faf9;
}

body:not(.platform-income-view):not(.dashboard-view) .serial-cell,
body:not(.platform-income-view):not(.dashboard-view) tbody td:nth-child(2) {
  z-index: 3;
}

/* 冻结列跟随行的高亮与告警色 */
body:not(.platform-income-view):not(.dashboard-view) tbody tr:hover > td:nth-child(-n + 2) {
  background: #eef6f4;
}

body:not(.platform-income-view):not(.dashboard-view) .rejected-row > td:nth-child(-n + 2) {
  background: #ffe5e5;
  color: #8a1f1f;
}

body:not(.platform-income-view):not(.dashboard-view) .remark-warning-row > td:nth-child(-n + 2) {
  background: #7f1d1d;
  color: #ffffff;
}

.filter-heading {
  min-width: 108px;
  padding: 5px;
}

.serial-heading,
.serial-cell {
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.purchase-select-heading,
.purchase-select-cell {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 4px;
  text-align: center;
}

body.sales-table-view .serial-heading,
body.sales-table-view .serial-cell {
  width: 39px;
  min-width: 39px;
}

body.sales-table-view th.field-salesperson,
body.sales-table-view td.field-salesperson {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  text-align: center;
}

body.sales-table-view .serial-heading,
body.sales-table-view .serial-cell,
body.sales-table-view th.field-salesperson,
body.sales-table-view td.field-salesperson,
body.sales-table-view th.field-fillDate,
body.sales-table-view td.field-fillDate,
body.sales-table-view th.field-companyName,
body.sales-table-view td.field-companyName {
  position: sticky;
  background: #ffffff;
}

body.sales-table-view thead .serial-heading,
body.sales-table-view thead th.field-salesperson,
body.sales-table-view thead th.field-fillDate,
body.sales-table-view thead th.field-companyName {
  z-index: 8;
  background: #f7faf9;
}

body.sales-table-view .serial-heading,
body.sales-table-view .serial-cell {
  left: 0;
}

body.sales-table-view th.field-fillDate,
body.sales-table-view td.field-fillDate {
  left: 39px;
}

body.sales-table-view.register-salesperson-column-view th.field-salesperson,
body.sales-table-view.register-salesperson-column-view td.field-salesperson {
  left: 39px;
}

body.sales-table-view.register-salesperson-column-view th.field-fillDate,
body.sales-table-view.register-salesperson-column-view td.field-fillDate {
  left: 117px;
}

body.sales-table-view th.field-companyName,
body.sales-table-view td.field-companyName {
  left: 134px;
  box-shadow: 2px 0 4px -2px rgba(23, 32, 38, 0.15);
}

body.sales-table-view.register-salesperson-column-view th.field-companyName,
body.sales-table-view.register-salesperson-column-view td.field-companyName {
  left: 212px;
}

body.sales-table-view .serial-cell,
body.sales-table-view td.field-salesperson,
body.sales-table-view td.field-fillDate,
body.sales-table-view td.field-companyName {
  z-index: 4;
}

body.sales-table-view tbody tr:hover > .serial-cell,
body.sales-table-view tbody tr:hover > td.field-salesperson,
body.sales-table-view tbody tr:hover > td.field-fillDate,
body.sales-table-view tbody tr:hover > td.field-companyName {
  background: #eef6f4;
}

body.sales-table-view .rejected-row > .serial-cell,
body.sales-table-view .rejected-row > td.field-salesperson,
body.sales-table-view .rejected-row > td.field-fillDate,
body.sales-table-view .rejected-row > td.field-companyName {
  background: #ffe5e5;
  color: #8a1f1f;
}

body.sales-table-view .remark-warning-row > .serial-cell,
body.sales-table-view .remark-warning-row > td.field-salesperson,
body.sales-table-view .remark-warning-row > td.field-fillDate,
body.sales-table-view .remark-warning-row > td.field-companyName {
  background: #7f1d1d;
  color: #ffffff;
}

body.sales-table-view:not(.platform-income-view):not(.dashboard-view) tbody td:nth-child(2),
body.sales-table-view:not(.platform-income-view):not(.dashboard-view) thead th:nth-child(2) {
  left: 39px;
}

th.field-companyName,
td.field-companyName,
th.field-invoiceName,
td.field-invoiceName {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
}

body.sales-table-view th.field-companyName,
body.sales-table-view td.field-companyName,
body.sales-table-view th.field-invoiceName,
body.sales-table-view td.field-invoiceName {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

body.sales-table-view th.field-companyName,
body.sales-table-view td.field-companyName {
  width: 195px;
  min-width: 195px;
  max-width: 195px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-text-clip {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th.field-invoiceBatchNo,
td.field-invoiceBatchNo {
  width: 94px;
  min-width: 94px;
  max-width: 94px;
}

body.sales-table-view th.field-invoiceBatchNo,
body.sales-table-view td.field-invoiceBatchNo {
  width: 71px;
  min-width: 71px;
  max-width: 71px;
}

th.field-orderNo,
td.field-orderNo {
  width: 188px;
  min-width: 188px;
  max-width: 188px;
}

body.sales-table-view th.field-orderNo,
body.sales-table-view td.field-orderNo {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
}

th.field-taxNumber,
td.field-taxNumber,
th.field-remark,
td.field-remark {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
}

body.sales-table-view th.field-taxNumber,
body.sales-table-view td.field-taxNumber,
body.sales-table-view th.field-remark,
body.sales-table-view td.field-remark {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

body.sales-table-view th.field-taxNumber,
body.sales-table-view td.field-taxNumber {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

th.field-bankAccount,
td.field-bankAccount {
  width: 134px;
  min-width: 134px;
  max-width: 134px;
}

body.sales-table-view th.field-bankAccount,
body.sales-table-view td.field-bankAccount {
  width: 101px;
  min-width: 101px;
  max-width: 101px;
}

th.field-addressPhone,
td.field-addressPhone {
  width: 105px;
  min-width: 105px;
  max-width: 105px;
}

body.sales-table-view th.field-addressPhone,
body.sales-table-view td.field-addressPhone {
  width: 79px;
  min-width: 79px;
  max-width: 79px;
}

td.field-addressPhone input {
  width: 100%;
  max-width: 100%;
}

td[data-full-text] {
  cursor: pointer;
}

.cell-fulltext-popover {
  position: fixed;
  z-index: 1000;
  max-width: min(720px, calc(100vw - 24px));
  max-height: 180px;
  overflow: hidden;
  border: 1px solid #b9ddd4;
  border-radius: 6px;
  background: #f7fffc;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  color: var(--text);
  padding: 6px 8px;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 13px;
  line-height: 1.3;
}

th.field-goodsModel,
td.field-goodsModel,
th.field-platform,
td.field-platform,
th.field-receiptAccount,
td.field-receiptAccount,
th.field-invoiceSubject,
td.field-invoiceSubject {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

body.sales-table-view th.field-goodsModel,
body.sales-table-view td.field-goodsModel,
body.sales-table-view th.field-platform,
body.sales-table-view td.field-platform,
body.sales-table-view th.field-receiptAccount,
body.sales-table-view td.field-receiptAccount {
  width: 144px;
  min-width: 144px;
  max-width: 144px;
}

body.sales-table-view th.field-invoiceSubject,
body.sales-table-view td.field-invoiceSubject {
  width: 207px;
  min-width: 207px;
  max-width: 207px;
}

th.field-fillDate,
td.field-fillDate,
th.field-issuedDate,
td.field-issuedDate {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

body.sales-table-view th.field-fillDate,
body.sales-table-view td.field-fillDate,
body.sales-table-view th.field-issuedDate,
body.sales-table-view td.field-issuedDate {
  width: 95px;
  min-width: 95px;
  max-width: 95px;
}

th.field-unit,
td.field-unit {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

body.sales-table-view th.field-unit,
body.sales-table-view td.field-unit {
  width: 57px;
  min-width: 57px;
  max-width: 57px;
}

th.field-quantity,
td.field-quantity,
th.field-amount,
td.field-amount {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

body.sales-table-view th.field-quantity,
body.sales-table-view td.field-quantity,
body.sales-table-view th.field-amount,
body.sales-table-view td.field-amount {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
}

body.purchase-view table {
  min-width: 1200px;
}

body.purchase-view th,
body.purchase-view td {
  min-width: 112px;
}

body.purchase-view th:nth-child(3),
body.purchase-view td:nth-child(3),
body.purchase-view th:nth-child(8),
body.purchase-view td:nth-child(8) {
  min-width: 180px;
}

body.purchase-view .purchase-select-heading,
body.purchase-view .purchase-select-cell {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  padding-left: 6px;
  padding-right: 2px;
  text-align: left;
}

body.purchase-view .purchase-select-heading input,
body.purchase-view .purchase-select-cell input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

body.subject-summary-view table {
  width: auto;
  min-width: 620px;
}

body.subject-summary-view th,
body.subject-summary-view td {
  min-width: 118px;
  padding: 5px 8px;
  text-align: center;
}

body.subject-summary-view .summary-subject-cell {
  min-width: 180px;
  text-align: center;
}

body.subject-summary-view th.summary-subject-cell {
  text-align: center;
}

body.subject-summary-view .summary-amount-cell {
  min-width: 118px;
  text-align: center;
}

body.subject-summary-view th.summary-amount-cell {
  text-align: center;
}

body.platform-income-view table {
  width: auto;
  min-width: 1680px;
}

body.offline-income-view table {
  min-width: 760px;
}

body.platform-income-view th,
body.platform-income-view td {
  min-width: 96px;
  height: 28px;
  padding: 3px 6px;
  text-align: center;
}

body.platform-income-view .serial-heading,
body.platform-income-view .serial-cell {
  width: 42px;
  min-width: 42px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  text-align: center;
}

body.platform-income-view th.serial-heading {
  z-index: 4;
  background: #f7faf9;
}

body.platform-income-view .platform-income-subject-cell {
  position: sticky;
  left: 146px;
  z-index: 2;
  min-width: 240px;
  max-width: 280px;
  background: #ffffff;
  text-align: center;
  white-space: normal;
}

body.platform-income-view .platform-income-subject-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.platform-income-view .platform-income-subject-name {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  text-align: center;
}

body.platform-income-view .platform-income-subject-button,
body.platform-income-view .platform-income-subject-delete {
  flex: 0 0 auto;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
}

body.platform-income-view .platform-income-subject-button {
  border: 0;
  color: var(--primary);
}

body.platform-income-view .platform-income-subject-button:hover {
  text-decoration: underline;
}

body.platform-income-view .platform-income-subject-delete {
  border: 1px solid #edc4ba;
  color: var(--accent);
}

body.platform-income-view .platform-income-subject-delete:hover {
  background: #f8e2dd;
}

body.platform-income-view .platform-income-period-cell {
  position: sticky;
  left: 42px;
  z-index: 2;
  min-width: 104px;
  background: #ffffff;
  text-align: center;
}

body.platform-income-view th.platform-income-period-cell {
  z-index: 4;
  background: #edf5f1;
}

body.platform-income-view th.platform-income-subject-cell {
  z-index: 4;
  background: #edf5f1;
  text-align: center;
}

body.platform-income-view th.platform-income-amount-cell {
  background: #f7faf9;
  text-align: center;
}

body.platform-income-view .platform-income-amount-cell {
  padding: 4px;
}

body.platform-income-view .platform-income-edit-cell {
  padding: 4px;
  background: #ffffff;
}

body.platform-income-view .platform-income-input {
  display: block;
  width: 100%;
  min-height: 26px;
  border: 2px solid #008979;
  border-radius: 4px;
  background: #ffffff;
  padding: 3px 6px;
  text-align: center;
}

body.platform-income-view .platform-income-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23, 107, 93, 0.18);
  outline: 0;
}

body.platform-income-view .platform-income-input.has-default-text::placeholder {
  color: #000000;
  opacity: 1;
}

body.platform-income-view .platform-income-total-cell {
  min-width: 144px;
  padding: 5px 8px;
  color: var(--primary-strong);
  font-weight: 800;
}

body.platform-income-view th:last-child {
  min-width: 144px;
}

body.platform-income-view .platform-income-total-box {
  display: block;
  width: 100%;
  min-height: 26px;
  border: 2px solid #008979;
  border-radius: 4px;
  background: #ffffff;
  padding: 3px 6px;
  text-align: center;
}

body.platform-income-view .platform-income-total-row td {
  background: #edf5f1;
  font-weight: 800;
}

body.platform-income-view .platform-income-total-row .serial-cell,
body.platform-income-view .platform-income-total-row .platform-income-period-cell,
body.platform-income-view .platform-income-total-row .platform-income-subject-cell {
  background: #edf5f1;
}

body.dashboard-view table {
  min-width: 0;
}

body.dashboard-view .table-wrap {
  background: #ffffff;
  border-color: var(--line);
}

body.dashboard-view .dashboard-shell-row > td {
  padding: 0;
  border-bottom: 0;
  background: #ffffff;
}

.dashboard-shell {
  min-height: 650px;
  padding: 28px 32px;
  color: var(--text);
}

.dashboard-intro {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.dashboard-intro h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.dashboard-intro p,
.dashboard-detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-controls {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr);
  gap: 12px;
  margin: 26px 0 18px;
}

.dashboard-toggle-group {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.dashboard-toggle {
  min-height: 40px;
  border: 0;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.dashboard-toggle.active {
  background: #eef2f1;
  color: var(--text);
}

.dashboard-search {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
}

.dashboard-search::placeholder {
  color: var(--muted);
}

.dashboard-body {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  gap: 18px;
}

.dashboard-list-pane,
.dashboard-detail-pane {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.dashboard-list-title {
  padding: 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.dashboard-list-item {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
}

.dashboard-list-item strong,
.dashboard-list-item span {
  overflow-wrap: anywhere;
}

.dashboard-list-item span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-list-item.active {
  border-left-color: var(--line);
  background: #f7faf9;
}

.dashboard-list-item.risk strong {
  color: var(--text);
}

.dashboard-detail-pane {
  padding: 22px;
}

.dashboard-detail-title {
  margin-bottom: 18px;
}

.dashboard-detail-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
}

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

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

.dashboard-card strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
}

.dashboard-section-title {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 16px;
}

.dashboard-summary-table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
  border: 1px solid var(--line);
  border-collapse: collapse;
}

.dashboard-summary-table th,
.dashboard-summary-table td {
  padding: 8px 10px;
  text-align: left;
}

.dashboard-summary-table th:nth-child(1),
.dashboard-summary-table td:nth-child(1) {
  width: 300px;
}

.dashboard-summary-table th:nth-child(2),
.dashboard-summary-table td:nth-child(2) {
  width: 130px;
}

.dashboard-summary-table th:nth-child(3),
.dashboard-summary-table td:nth-child(3) {
  width: 150px;
}

.dashboard-summary-table th:nth-child(4),
.dashboard-summary-table td:nth-child(4),
.dashboard-summary-table th:nth-child(5),
.dashboard-summary-table td:nth-child(5),
.dashboard-summary-table th:nth-child(6),
.dashboard-summary-table td:nth-child(6),
.dashboard-summary-table th:nth-child(8),
.dashboard-summary-table td:nth-child(8) {
  width: 120px;
}

.dashboard-summary-table th:nth-child(8),
.dashboard-summary-table td:nth-child(8) {
  width: 120px;
}

.dashboard-summary-table th:nth-child(9),
.dashboard-summary-table td:nth-child(9) {
  width: 160px;
}

.dashboard-summary-table .dashboard-tax-input {
  min-height: 30px;
  padding: 4px 6px;
  text-align: left;
}

.dashboard-alert-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.dashboard-alert-list > div {
  min-height: 36px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}

.dashboard-alert-list > div:first-child {
  border-top: 0;
}

.dashboard-detail-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
}

.dashboard-detail-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(9, minmax(96px, 1fr));
  align-items: center;
  min-width: 1180px;
  border-top: 1px solid var(--line);
}

.dashboard-detail-table.platform-overview .dashboard-detail-row {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.6fr) minmax(160px, 0.8fr);
  min-width: 520px;
}

.dashboard-platform-breakdown {
  margin-top: 20px;
}

.dashboard-platform-breakdown h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 16px;
}

.dashboard-platform-breakdown .dashboard-detail-table.platform-overview .dashboard-detail-row {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr);
  min-width: 420px;
}

.dashboard-detail-row:first-child {
  border-top: 0;
}

.dashboard-detail-row.heading {
  background: #f7faf9;
  color: var(--text);
  font-weight: 800;
}

.dashboard-detail-row.empty span:first-child {
  color: var(--muted);
}

.dashboard-detail-row > span,
.dashboard-detail-row > input {
  min-height: 42px;
  padding: 10px 12px;
}

.dashboard-detail-subject {
  overflow-wrap: anywhere;
}

.dashboard-tax-input {
  min-height: 28px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  text-align: center;
}

.dashboard-status {
  display: inline-block;
  min-width: 58px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-status.normal {
  background: #f3f5f5;
  color: var(--text);
}

.dashboard-status.unfiled {
  background: #f3f5f5;
  color: var(--text);
}

.dashboard-status.risk {
  background: #f3f5f5;
  color: var(--text);
}

@media (max-width: 900px) {
  .dashboard-shell {
    padding: 20px;
  }

  .dashboard-controls,
  .dashboard-body {
    grid-template-columns: 1fr;
  }

  .dashboard-cards {
    grid-template-columns: repeat(6, minmax(145px, 1fr));
  }
}

.filter-heading select {
  min-height: 26px;
  border-color: transparent;
  border-radius: 6px;
  background-color: transparent;
  color: var(--muted);
  padding: 4px 24px 4px 6px;
  font-size: 12px;
  font-weight: 700;
}

.entry-row td {
  background: #fbfdfc;
  padding: 6px 4px;
}

body.special-register-view .entry-row td {
  background: #eff6ff;
}

body.normal-register-view .entry-row td {
  background: #fff7ed;
}

.entry-row input,
.entry-row select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 33px;
  border-radius: 6px;
  padding: 4px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  text-align: center;
}

.entry-row input[type="date"] {
  width: 118px;
  padding: 4px 5px;
}

body.sales-table-view .entry-row input[type="date"] {
  width: 100%;
}

.invoice-name-combobox {
  position: relative;
  width: 100%;
}

.invoice-name-menu {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 20;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.invoice-name-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.invoice-name-option:hover,
.invoice-name-option:focus {
  background: #dff2ed;
  outline: none;
}

.choice-entry {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 32px;
  gap: 4px;
  min-width: 128px;
}

.choice-entry select {
  padding: 5px;
}

.entry-save-button {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

.entry-row,
.entry-row td.field-invoiceName {
  overflow: visible;
}

.entry-row td.field-invoiceName {
  position: relative;
  z-index: 8;
}

.status {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
}

.status-action {
  border: 1px solid transparent;
  cursor: pointer;
}

.status.pending {
  background: #fff4d8;
  color: var(--warning);
}

.status.done {
  background: #dff2ed;
  color: var(--primary);
}

.status.cancelled {
  background: #f8e2dd;
  color: var(--accent);
}

.status.rejected {
  background: #ffe5e5;
  color: #8a1f1f;
}

.status.review {
  background: #e8ecff;
  color: #4757a8;
}

.status.status-action:not(.active) {
  background: #ffffff;
  color: var(--muted);
  border-color: var(--line);
}

.status.status-action:disabled {
  cursor: default;
  opacity: 1;
}

.invoice-status-select {
  width: auto;
  min-width: 78px;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 24px 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.invoice-status-select.pending {
  background-color: #fff4d8;
  color: var(--warning);
  border-color: #f0d18c;
}

.invoice-status-select.done {
  background-color: #dff2ed;
  color: var(--primary);
  border-color: #b9ddd4;
}

.invoice-status-select.cancelled {
  background-color: #f8e2dd;
  color: var(--accent);
  border-color: #edc4ba;
}

.invoice-status-select.rejected {
  background-color: #ffe5e5;
  color: #8a1f1f;
  border-color: #efb4b4;
}

.invoice-status-select.review {
  background-color: #e8ecff;
  color: #4757a8;
  border-color: #c8d0fb;
}

.invoice-status-select:disabled {
  cursor: default;
  opacity: 1;
}

.inline-invoice-subject-select {
  min-width: 207px;
  min-height: 28px;
  border-radius: 6px;
  padding: 3px 14px 3px 8px;
  font-size: 12px;
}

.inline-remark-append {
  display: block;
  width: 100%;
  min-width: 150px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 4px 7px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
  cursor: text;
}

.inline-remark-append:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
}

.inline-remark-append:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 93, 0.12);
}

.inline-remark-append.is-warning,
td .inline-remark-append.is-warning {
  border-color: #7f1d1d;
  background: #991b1b !important;
  color: #ffffff !important;
}

.inline-remark-append.is-warning:focus,
td .inline-remark-append.is-warning:focus {
  border-color: #7f1d1d;
  background: #991b1b !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.18);
}

.link-button {
  min-width: 32px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0 6px 0 0;
  font-size: 13px;
}

.link-button:disabled {
  color: #9aa6ad;
  cursor: default;
}

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

.empty-state {
  display: none;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state.visible {
  display: block;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 10px;
  }

  .topbar,
  .panel-header,
  .records-header,
  .toolbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 20px;
  }
}

/* ---------- 账号管理页（左侧导航进入，按角色分层） ---------- */

.user-manage-shell {
  padding: 4px 2px 8px;
  width: 100%;
}

.user-manage-cell {
  padding: 0 !important;
  white-space: normal !important;
}

.user-manage-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.user-manage-intro h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.user-manage-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-manage-hint {
  margin: 0 0 12px;
  min-height: 18px;
  color: var(--primary);
  font-size: 13px;
}

.user-manage-hint.is-error {
  color: var(--accent);
}

.user-manage-layers {
  display: grid;
  gap: 16px;
}

.user-layer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.user-layer-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f6f9fa;
  border-bottom: 1px solid var(--line);
}

.user-layer-header h4 {
  margin: 0;
  font-size: 14px;
  color: var(--primary);
}

.user-layer-desc {
  color: var(--muted);
  font-size: 12px;
}

/* 全局 table 有 2100px 最小宽度，这里要覆盖掉 */
.user-layer-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
}

.user-layer-table th:nth-child(1),
.user-layer-table td:nth-child(1) {
  width: 24%;
}

.user-layer-table th:nth-child(2),
.user-layer-table td:nth-child(2) {
  width: 28%;
}

.user-layer-table th:nth-child(3),
.user-layer-table td:nth-child(3) {
  width: 16%;
}

.user-layer-table th:nth-child(4),
.user-layer-table td:nth-child(4) {
  width: 32%;
}

.user-layer-table th,
.user-layer-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.user-layer-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #ffffff;
}

.user-layer-table tbody tr:last-child td {
  border-bottom: none;
}

.user-layer-table tbody tr:hover td {
  background: #f7fbf9;
}

.user-layer-empty {
  color: var(--muted);
  text-align: center;
}

.user-row-disabled td {
  color: var(--muted);
  background: #fafbfb;
}

.user-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  background: #e8f3f0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.user-status.is-off {
  background: #f0f0f0;
  color: #8a8f93;
}

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

.user-actions .link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
}

.user-actions .link-button:hover {
  text-decoration: underline;
}

.user-role-select {
  min-height: 28px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 6px;
  color: var(--text);
  font-size: 13px;
}

.user-action-tip {
  color: var(--muted);
  font-size: 12px;
}

/* 左侧导航里的管理项，用分隔线与其他业务入口区分开 */
.subject-list-shell {
  padding: 4px 2px 8px;
  width: 100%;
}

.subject-list-cell {
  padding: 0 !important;
  white-space: normal !important;
}

.subject-list-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.subject-list-intro h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.subject-list-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-list-table {
  table-layout: fixed;
  width: 100%;
  min-width: 3036px;
  border: 1px solid var(--line);
  border-collapse: collapse;
}

.subject-list-table th:nth-child(1),
.subject-list-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}

.subject-list-table th:nth-child(2),
.subject-list-table td:nth-child(2) {
  width: 130px;
}

.subject-list-table th:nth-child(3),
.subject-list-table td:nth-child(3) {
  width: 280px;
}

.subject-list-table th:nth-child(4),
.subject-list-table td:nth-child(4) {
  width: 210px;
}

.subject-list-table th:nth-child(5),
.subject-list-table td:nth-child(5) {
  width: 520px;
}

.subject-list-table th:nth-child(6),
.subject-list-table td:nth-child(6),
.subject-list-table th:nth-child(14),
.subject-list-table td:nth-child(14) {
  width: 80px;
}

.subject-list-table th:nth-child(7),
.subject-list-table td:nth-child(7) {
  width: 150px;
}

.subject-list-table th:nth-child(8),
.subject-list-table td:nth-child(8) {
  width: 240px;
}

.subject-list-table th:nth-child(9),
.subject-list-table td:nth-child(9) {
  width: 210px;
}

.subject-list-table th:nth-child(10),
.subject-list-table td:nth-child(10) {
  width: 220px;
}

.subject-list-table th:nth-child(11),
.subject-list-table td:nth-child(11) {
  width: 160px;
}

.subject-list-table th:nth-child(12),
.subject-list-table td:nth-child(12) {
  width: 260px;
}

.subject-list-table th:nth-child(13),
.subject-list-table td:nth-child(13) {
  width: 140px;
}

.subject-list-table th:nth-child(15),
.subject-list-table td:nth-child(15) {
  width: 120px;
}

.subject-list-table th:nth-child(16),
.subject-list-table td:nth-child(16) {
  width: 90px;
}

.subject-list-table th:nth-last-child(2),
.subject-list-table td:nth-last-child(2),
.subject-list-table th:nth-last-child(1),
.subject-list-table td:nth-last-child(1) {
  width: 90px;
}

.subject-list-table th,
.subject-list-table td {
  padding: 7px 8px;
  text-align: left;
  font-size: 12px;
}

.subject-list-disabled td {
  color: var(--muted);
  background: #fafbfb;
}

.subject-list-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  background: #e8f3f0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.subject-list-status.is-off {
  background: #f0f0f0;
  color: #8a8f93;
}

.subject-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-list-actions .link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
}

.subject-list-actions .link-button:hover {
  text-decoration: underline;
}

.subject-list-empty {
  color: var(--muted);
  text-align: center !important;
}

.nav-item-admin {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}
