:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #182126;
  --muted: #65727b;
  --line: #dfe6ea;
  --brand: #0f3d3e;
  --brand-2: #1f7a6d;
  --accent: #c48a32;
  --danger: #b42318;
  --success: #157347;
  --shadow: 0 12px 32px rgba(20, 36, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-brand,
.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.login-brand span,
.login-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.login-heading {
  margin: 30px 0 20px;
}

.login-heading h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.login-form .login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-captcha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 10px;
  align-items: end;
}

.login-captcha-image {
  width: 148px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.login-captcha-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.login-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}

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

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:disabled,
button.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: #102426;
  color: #fff;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e2b464;
  color: #102426;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  margin-top: 2px;
}

.sidebar-user-card {
  display: grid;
  gap: 3px;
  margin: 14px 4px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-user-card span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-user-card strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.sidebar-user-card small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.35;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.nav-list::-webkit-scrollbar {
  width: 6px;
}

.nav-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.nav-link {
  width: 100%;
  border: 0;
  border-radius: 8px;
  min-height: 30px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-group {
  display: grid;
  gap: 3px;
  padding: 0;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.nav-group.active .nav-group-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-group-caret {
  transition: transform 0.16s ease;
}

.nav-group.collapsed .nav-group-caret {
  transform: rotate(-90deg);
}

.nav-group-body {
  display: grid;
  gap: 2px;
  padding-left: 8px;
}

.nav-group.collapsed .nav-group-body {
  display: none;
}

.nav-sub-link {
  position: relative;
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.nav-sub-link::before {
  content: none;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  padding: 12px 4px 0;
}

.api-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: grid;
  gap: 8px;
  width: min(720px, 56vw);
  justify-items: end;
}

.topbar-search {
  display: flex;
  gap: 8px;
  width: min(460px, 100%);
}

#refreshBtn {
  min-width: 64px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.user-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
  font-size: 13px;
  color: var(--muted);
}

.user-menu .btn {
  white-space: nowrap;
}

.topbar-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-action-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.icon-action-btn:hover,
.icon-action-btn:focus-visible,
.icon-action-btn.active {
  color: #0a84ff;
  border-color: rgba(10, 132, 255, 0.32);
  background: rgba(10, 132, 255, 0.08);
}

.icon-action-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.toolbar.tax-toolbar {
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.tax-toolbar label:not(.filter-check) {
  display: grid;
  gap: 4px;
  margin: 0;
  width: 220px;
}

.tax-panel {
  display: none;
}

.tax-panel.active {
  display: block;
}

.tax-kpis .kpi {
  width: 100%;
  text-align: left;
}

.tax-kpis {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}

.tax-kpis .kpi {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  padding: 9px 5px;
}

.tax-kpis .kpi span {
  font-size: 11px;
  line-height: 1.25;
  margin-bottom: 5px;
  white-space: normal;
}

.tax-kpis .kpi strong {
  font-size: 20px;
}

.tax-stats {
  margin-bottom: 14px;
}

.tax-filter {
  border: 1px solid var(--line);
  cursor: pointer;
}

.tax-filter.active {
  border-color: var(--brand);
  background: #eef7f4;
}

.tax-retail-check {
  width: auto;
  height: 38px;
  min-height: 38px;
  margin: 0 0 0 4px;
  padding: 0 13px;
  align-self: flex-end;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
}

.tax-retail-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.kpi-grid.tax-kpis {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}

.kpi-grid.tax-kpis .kpi {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  padding: 9px 5px;
}

.dashboard-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-kpis .kpi {
  padding: 14px 12px;
}

.dashboard-kpis .kpi strong {
  font-size: 22px;
}

.dashboard-kpi-action {
  position: relative;
  cursor: pointer;
}

.dashboard-kpi-action::after {
  content: "筛选";
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.dashboard-kpi-action:hover,
.dashboard-kpi-action:focus-visible {
  border-color: rgba(10, 132, 255, 0.38);
  outline: none;
}

.dashboard-kpi-action:hover::after,
.dashboard-kpi-action:focus-visible::after {
  opacity: 1;
}

#workflowSteps {
  display: none !important;
}

.finance-close-board {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 252, 252, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

.finance-close-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-close-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-close-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.finance-close-health {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(196, 138, 50, 0.28);
  border-radius: 999px;
  color: #9a6200;
  background: #fff7e8;
  font-size: 12px;
  font-weight: 850;
}

.finance-close-health.is-ok {
  border-color: rgba(21, 115, 71, 0.24);
  color: var(--success);
  background: #ecf8f1;
}

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

.finance-close-step {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.finance-close-step:hover {
  border-color: rgba(31, 122, 109, 0.38);
  background: #f7fcfb;
  transform: translateY(-1px);
}

.finance-close-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.finance-close-step strong {
  color: #9a6200;
  font-size: 18px;
  font-weight: 900;
}

.finance-close-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.finance-close-step.is-ok strong {
  color: var(--success);
}

.finance-close-step.is-warning {
  border-color: rgba(196, 138, 50, 0.26);
  background: #fffaf0;
}

.finance-risk-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  overflow-x: auto;
  padding-top: 2px;
}

.finance-risk-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.finance-risk-item:hover {
  border-color: var(--brand-2);
  background: #f6fbfa;
}

.finance-risk-item strong {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--brand);
  background: #eef7f4;
  font-size: 12px;
}

.finance-risk-item.danger {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff8f7;
}

.finance-risk-item.danger strong {
  color: var(--danger);
  background: #fff0ee;
}

.finance-risk-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-center {
  border: 1px solid #f0c36d;
  border-left: 5px solid #d88900;
  border-radius: 8px;
  background: #fff8e8;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(134, 93, 22, 0.08);
}

.message-center.collapsed {
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.message-center.collapsed .message-panel-content {
  display: none;
}

.message-center:not(.collapsed) .message-icon-button {
  margin-bottom: 10px;
}

.message-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #d7b46c;
  border-radius: 999px;
  background: #fff8e8;
  color: #8c5a00;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
}

.message-icon-button strong {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #d88900;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}

.message-icon-button strong.hidden {
  display: none;
}

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

.message-center-head span {
  display: block;
  color: #8c5a00;
  font-size: 12px;
  font-weight: 900;
}

.message-center-head strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.message-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.message-actions label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-alert-list,
.message-history-list {
  display: grid;
  gap: 8px;
}

.message-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(216, 137, 0, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px;
}

.message-item.read {
  border-color: var(--line);
  background: #fff;
  opacity: 0.72;
}

.message-type {
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  color: #fff;
  background: #d88900;
  font-size: 12px;
  font-weight: 900;
}

.message-type.sold {
  background: #b83232;
}

.message-type.purchase {
  background: #16704a;
}

.message-type.missing {
  background: #8c5a00;
}

.message-type.onselling_missing {
  background: #8c5a00;
}

.message-type.sold_pending_sale,
.message-type.sold_unmatched {
  background: #b83232;
}

.message-type.system {
  background: #5a6670;
}

.message-main strong {
  display: block;
  font-size: 14px;
}

.message-main span,
.message-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.message-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 6px 0;
}

.message-group {
  display: grid;
  gap: 8px;
}

.message-group + .message-group {
  margin-top: 12px;
}

.message-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b4b0d;
  font-size: 13px;
  font-weight: 900;
}

.message-group-title strong {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(216, 137, 0, 0.16);
  color: #8c5a00;
  font-size: 12px;
}

.message-operation {
  display: grid;
  gap: 6px;
}

.message-detail-cell {
  min-width: 0;
}

.message-detail-cell b,
.message-detail-cell span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.message-detail-cell b {
  color: #6f7780;
  font-weight: 800;
}

.message-detail-cell span {
  color: #23272b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-history {
  margin-top: 10px;
}

.message-history summary {
  cursor: pointer;
  color: #7c5a18;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.message-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

.message-manager-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.message-manager-toolbar label {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-history-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
}

.message-date-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.message-date-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 10px;
}

.message-date-card:hover,
.message-date-card.active {
  border-color: #d7b46c;
  background: #fff8e8;
}

.message-date-card strong,
.message-date-card span,
.message-date-card small {
  display: block;
}

.message-date-card strong {
  font-size: 13px;
}

.message-date-card span,
.message-date-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.message-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.message-history-title strong {
  font-size: 15px;
}

.kpi,
.form-panel,
.chart-panel,
.workflow,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi {
  padding: 18px;
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.kpi strong {
  font-size: 26px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 16px 0 22px;
  overflow: hidden;
}

.flow-step {
  border: 0;
  background: transparent;
  text-align: left;
  min-height: 132px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.compact-flow .flow-step {
  cursor: pointer;
}

.compact-flow .flow-step.active,
.compact-flow .flow-step:hover {
  background: #f0f7f5;
}

.flow-step:last-child {
  border-right: 0;
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f4ef;
  color: var(--brand-2);
  font-weight: 800;
  margin-bottom: 12px;
}

.flow-step strong {
  display: block;
}

.flow-step small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

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

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

.task-lane.urgent-lane {
  border-color: #f1b5ae;
  background: #fff8f7;
}

.task-lane.urgent-lane .lane-head strong {
  background: #fff0ee;
  color: var(--danger);
}

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

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

.lane-head strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--brand);
  font-size: 13px;
}

.lane-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.lane-limit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.lane-limit .form-select {
  width: 78px;
  min-height: 30px;
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 12px;
}

.task-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.task-card:hover {
  border-color: var(--brand-2);
  background: #f8fcfb;
}

.task-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.task-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.task-card strong {
  color: var(--brand-2);
  font-size: 12px;
}

.task-card strong.danger-text {
  color: var(--danger);
}

.empty-lane {
  display: grid;
  place-items: center;
  min-height: 82px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.section-head,
.report-header,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.report-header {
  align-items: center;
}

.report-header label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.report-header .form-control {
  width: 120px;
}

.report-header .btn {
  align-self: center;
}

.section-head {
  justify-content: space-between;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.table-actions {
  display: flex;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--success);
  background: #e5f4ed;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.danger {
  color: var(--danger);
  background: #fff0ee;
}

.status-pill.warning {
  color: #8c5a00;
  background: #fff4df;
}

.text-wrap-cell {
  min-width: 180px;
  max-width: 320px;
  white-space: normal !important;
}

.text-wrap-cell strong,
.text-wrap-cell small {
  display: block;
}

.text-wrap-cell small {
  margin-top: 3px;
  color: var(--muted);
}

.econtract-log-table {
  min-width: 1120px;
}

.audit-username {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.toolbar .form-select,
.toolbar .form-control {
  width: auto;
  min-width: 140px;
}

.voucher-toolbar {
  align-items: center;
}

.voucher-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.voucher-toolbar .form-select,
.voucher-toolbar .form-control,
.voucher-toolbar .btn {
  min-height: 38px;
}

.ledger-sortbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 12px;
}

.sort-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.sort-group span {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sort-chip {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.sort-chip.active {
  background: var(--brand);
  color: #fff;
}

.ledger-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ledger-performance {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ledger-performance-title {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
  font-weight: 800;
}

.ledger-performance-title input {
  width: 132px;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-weight: 700;
}

.ledger-performance-title strong {
  color: var(--brand-2);
}

.ledger-performance-title small {
  color: var(--muted);
  font-weight: 700;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.summary-chip strong {
  color: var(--brand-2);
}

.summary-chip .chip-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.summary-chip .chip-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.summary-chip.active,
.summary-chip:hover {
  border-color: var(--brand-2);
  background: #eef7f4;
}

.summary-chip.danger strong,
.summary-chip.danger:hover,
.summary-chip.danger.active {
  color: var(--danger);
}

.summary-chip.danger.active,
.summary-chip.danger:hover {
  border-color: #f1b5ae;
  background: #fff0ee;
}

.summary-chip.settlement-chip {
  border-color: #ead4a1;
  background: #fffaf0;
}

.summary-chip.settlement-chip strong {
  color: #b86e00;
  font-size: 18px;
}

.summary-chip.settlement-chip.active,
.summary-chip.settlement-chip:hover {
  border-color: #dca33a;
  background: #fff4d9;
}

.performance-chip.active,
.performance-chip:hover {
  border-color: var(--brand-2);
  background: #eef7f4;
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

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

.data-table td {
  font-size: 14px;
}

.inventory-table tbody tr.vehicle-row-sold {
  background: rgba(225, 85, 72, 0.012);
}

.inventory-table tbody tr.vehicle-row-sold td {
  background: rgba(225, 85, 72, 0.012);
}

.inventory-table {
  min-width: 1160px;
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) {
  padding-left: 10px;
  padding-right: 10px;
  width: 104px;
  min-width: 104px;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
  padding-left: 8px;
  padding-right: 8px;
  width: 118px;
  min-width: 118px;
  max-width: 136px;
  white-space: normal;
}

.inventory-table th:nth-child(3) .badge-soft,
.inventory-table td:nth-child(3) .badge-soft {
  margin-bottom: 3px;
  padding-left: 7px;
  padding-right: 7px;
}

.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
  width: 350px;
  max-width: 350px;
}

.inventory-table td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-days {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-days.fresh {
  background: #e5f4ed;
  color: #21734b;
}

.inventory-days.warning {
  background: #fff4df;
  color: #9a6100;
}

.inventory-days.danger {
  background: #fff0ee;
  color: #b94b43;
}

.inventory-days.critical {
  background: #f9d8d5;
  color: #8f211b;
}

.business-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.business-anomaly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 999px;
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f4;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.badge-soft.success {
  background: #e5f4ed;
  color: var(--success);
}

.badge-soft.warning {
  background: #fff4df;
  color: #9a6100;
}

.badge-soft.danger {
  background: #fff0ee;
  color: var(--danger);
}

.invoice-alert {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0ee;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
  margin-left: 6px;
}

.contract-alert {
  background: #fff4e6;
  color: #a15c13;
}

.next-step {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff4df;
  color: #8c5a00;
  font-size: 12px;
  font-weight: 800;
}

.next-step.danger {
  color: #fff;
  background: var(--danger);
}

.form-panel {
  padding: 20px;
}

.form-panel.compact {
  display: grid;
  gap: 12px;
}

.expense-calculation-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.expense-calculation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.expense-filter-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.expense-filter-field span {
  flex: none;
}

.expense-filter-field .form-control {
  width: 150px;
  min-height: 36px;
}

.expense-calculation-toolbar .segmented-control,
.expense-calculation-toolbar .btn {
  min-height: 38px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.expense-segmented-control {
  min-height: 36px;
  padding: 3px;
}

.segmented-control button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.expense-segmented-control button {
  min-height: 28px;
  padding: 0 14px;
}

.segmented-control button.active {
  background: var(--text);
  color: var(--panel);
}

.expense-toolbar-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.expense-calculation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 6px;
}

.expense-calculation-summary div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.expense-calculation-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.expense-calculation-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.expense-cost-line {
  display: grid;
  gap: 3px;
  padding: 3px 0;
}

.expense-cost-line + .expense-cost-line {
  border-top: 1px dashed var(--line);
}

.expense-cost-line small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.expense-check-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.expense-check-status.pending {
  color: #a15c00;
  background: rgba(255, 159, 10, 0.14);
}

.expense-check-status.matched {
  color: #176b3a;
  background: rgba(52, 199, 89, 0.14);
}

.expense-check-status.adjusted {
  color: #005ecb;
  background: rgba(0, 122, 255, 0.12);
}

.expense-check-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.expense-check-actions.editing {
  display: grid;
  grid-template-columns: minmax(88px, 110px) auto auto;
  white-space: normal;
}

.expense-check-actions .btn {
  min-height: 30px;
  padding: 0 8px;
  white-space: nowrap;
}

.expense-check-actions .form-control {
  min-height: 30px;
  padding: 4px 8px;
  text-align: right;
}

.settings-grid {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

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

.settings-brand-form .wide {
  grid-column: 1 / -1;
}

.settings-avatar-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.settings-admin-panel {
  gap: 12px;
}

.settings-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(24, 33, 38, 0.03);
}

.settings-admin-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-admin-tabs button:hover,
.settings-admin-tabs button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(20, 36, 45, 0.08);
}

.settings-admin-tab-panel {
  display: none;
  padding-top: 4px;
}

.settings-admin-tab-panel.active {
  display: block;
}

.settings-admin-tab-panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.quality-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.quality-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
}

.quality-summary strong {
  font-size: 14px;
}

.theme-preference-form {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 12px;
  align-items: end;
}

.theme-preference-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.theme-preference-form span {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 8px;
}

.settings-account-panel {
  overflow: hidden;
}

.form-section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

.form-section-title:not(:first-child) {
  margin-top: 24px;
}

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

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

.purchase-entry-panel {
  max-width: 940px;
  margin: 0 auto;
}

.purchase-entry-panel .form-section-title {
  margin-bottom: 12px;
}

.purchase-entry-panel .form-grid {
  gap: 12px;
}

.purchase-entry-panel label:has([required])::before {
  content: "* ";
  color: var(--danger);
  font-weight: 900;
}

.required-note {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.purchase-basic-grid {
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.1fr);
}

.purchase-business-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purchase-entry-panel .form-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.receipt-upload-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.receipt-upload-row label {
  margin: 0;
}

.receipt-upload-actions {
  margin-top: 0;
  justify-content: flex-start;
  white-space: nowrap;
}

.bank-center-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.bank-center-kpis .kpi {
  min-height: 76px;
  padding: 13px 14px;
}

.bank-center-kpis .kpi strong {
  font-size: 24px;
}

.bank-center-toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bank-center-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f9;
}

.bank-center-tab {
  min-width: 104px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bank-center-tab:hover,
.bank-center-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 6px rgba(20, 36, 45, 0.08);
}

.bank-center-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.bank-center-section-title strong {
  display: block;
  font-size: 16px;
}

.bank-center-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.bank-flow-layout,
.bank-rule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 14px;
}

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

.bank-rule-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.bank-rule-grid strong {
  font-size: 13px;
}

.bank-rule-grid span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-import-table {
  min-width: 1460px;
}

.invoice-upload-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
}

.invoice-upload-form {
  display: grid;
  grid-template-columns: minmax(260px, 360px) auto auto minmax(240px, 1fr);
  gap: 10px;
  align-items: end;
}

.invoice-upload-form label {
  margin: 0;
}

.invoice-upload-form .muted-note {
  margin: 0;
  align-self: center;
  line-height: 1.45;
}

.invoice-filter-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.filter-date-field,
.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.filter-date-field .form-control {
  min-width: 145px;
}

.invoice-filter-toolbar .form-control,
.invoice-filter-toolbar .form-select {
  width: auto;
  min-width: 150px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.pagination-size .form-select {
  width: auto;
  min-width: 74px;
}

.pagination-info {
  font-size: 13px;
  font-weight: 700;
}

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

.vat-return-toolbar {
  align-items: end;
}

.vat-return-kpis {
  margin-top: 14px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.vat-return-kpis .kpi {
  padding: 12px;
}

.vat-return-kpis .kpi span {
  font-size: 12px;
}

.vat-return-kpis .kpi strong {
  font-size: 20px;
}

.vat-total-kpi {
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(10, 132, 255, 0.06);
}

.vat-return-notice {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(196, 138, 50, 0.24);
  border-radius: 8px;
  color: #8a5a12;
  background: rgba(196, 138, 50, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.vat-return-tabs {
  margin-top: 12px;
}

.vat-return-sheet {
  margin-top: 12px;
  width: min(100%, 1180px);
  margin-left: 0;
  margin-right: auto;
}

.vat-sheet-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.vat-sheet-title,
.vat-sheet-table-wrap {
  width: 100%;
}

.vat-sheet-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.vat-sheet-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vat-sheet-table-wrap {
  margin-top: 0;
  border-radius: 0 0 8px 8px;
}

.vat-sheet-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.vat-sheet-table th:nth-child(1),
.vat-sheet-table td:nth-child(1) {
  width: 58px;
}

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

.vat-sheet-table.has-note-column:not(.financial-report-table) th:last-child,
.vat-sheet-table.has-note-column:not(.financial-report-table) td:last-child {
  width: 22%;
}

.vat-sheet-table th,
.vat-sheet-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.vat-sheet-table th {
  text-align: center;
}

.vat-sheet-table td:not(:nth-child(2)) {
  text-align: right;
  white-space: nowrap;
}

.vat-sheet-table.has-note-column:not(.financial-report-table) td:last-child {
  white-space: normal;
  text-align: left;
}

.vat-edit-input {
  width: 100%;
  min-width: 88px;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid rgba(10, 132, 255, 0.36);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.vat-edit-input:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16);
}

.financial-report-toolbar {
  align-items: end;
}

.financial-report-kpis {
  margin-top: 14px;
}

.historical-report-panel {
  margin-top: 14px;
}

.historical-report-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.historical-report-form .wide {
  grid-column: span 2;
}

.historical-report-table-wrap {
  margin-top: 12px;
  max-height: 320px;
}

.historical-report-table {
  min-width: 900px;
}

.historical-report-table th:nth-child(4),
.historical-report-table td:nth-child(4) {
  min-width: 220px;
}

.financial-report-table .financial-report-row.level-1 td:nth-child(2) {
  padding-left: 24px;
  font-weight: 700;
}

.financial-report-table .financial-report-row.level-0 td {
  background: rgba(10, 132, 255, 0.06);
  font-weight: 900;
}

html[data-theme="dark"] .financial-report-table .financial-report-row.level-0 td {
  background: rgba(10, 132, 255, 0.14);
}

html[data-theme="dark"] .vat-return-notice {
  border-color: rgba(255, 159, 10, 0.26);
  color: #ffd08a;
  background: rgba(255, 159, 10, 0.12);
}

html[data-theme="dark"] .vat-sheet-title {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(28, 28, 32, 0.86);
}

html[data-theme="dark"] .vat-sheet-title h2 {
  color: rgba(255, 255, 255, 0.94);
}

html[data-theme="dark"] .vat-sheet-title span {
  color: rgba(255, 255, 255, 0.62);
}

.invoice-import-actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.8fr);
  gap: 6px;
  min-width: 280px;
}

.invoice-import-actions .btn {
  min-height: 32px;
}

.invoice-import-actions.compact {
  grid-template-columns: minmax(150px, 1fr) auto;
  min-width: 250px;
}

.invoice-note-editor {
  display: grid;
  gap: 6px;
  min-width: 190px;
  max-width: 240px;
}

.invoice-note-editor textarea {
  min-height: 56px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.45;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

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

.bank-account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-type-parent-tabs,
.invoice-type-child-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.invoice-type-child-tabs {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.invoice-type-child-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-right: 2px;
}

.bank-account-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  min-height: 34px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

.bank-account-tab:hover,
.bank-account-tab.active {
  border-color: #6ca79a;
  background: #f4faf8;
  color: #236b50;
}

.invoice-type-parent-tab {
  min-width: 88px;
}

.invoice-type-child-tab {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.invoice-reimbursement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.invoice-reimbursement-summary div {
  min-width: 0;
}

.invoice-reimbursement-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.invoice-reimbursement-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}


.bank-account-tabs .summary-chip {
  min-height: 38px;
  padding: 8px 12px;
}

.bank-table td:nth-child(4) {
  max-width: 260px;
  white-space: normal;
}

.receipt-table td {
  vertical-align: top;
}

.receipt-table th:nth-child(5),
.receipt-table td:nth-child(5),
.receipt-table th:nth-child(6),
.receipt-table td:nth-child(6) {
  min-width: 220px;
  white-space: normal;
}

.receipt-match-cell {
  display: grid;
  gap: 6px;
}

.receipt-match-cell strong,
.receipt-table td:nth-child(5) strong {
  display: block;
  font-size: 13px;
}

.receipt-preview-link {
  margin: 6px 0;
  width: fit-content;
}

.receipt-preview-body {
  min-height: 70vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.receipt-preview-image {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.receipt-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
}

.voucher-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0;
}

.voucher-rule-panel {
  margin-bottom: 14px;
}

.voucher-package-panel {
  margin-bottom: 14px;
}

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

.section-head.compact {
  margin-bottom: 12px;
}

.voucher-package-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 12px;
}

.voucher-package-stats span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.voucher-package-table td {
  vertical-align: top;
}

.voucher-package-table th:nth-child(1),
.voucher-package-table td:nth-child(1) {
  min-width: 260px;
}

.voucher-package-table small {
  display: block;
  margin-top: 4px;
}

.voucher-package-issues {
  max-width: 170px;
  white-space: normal;
  color: var(--muted);
}

.voucher-table td {
  vertical-align: top;
}

.voucher-table th:nth-child(5),
.voucher-table td:nth-child(5) {
  min-width: 360px;
}

.voucher-summary {
  font-weight: 800;
  margin-bottom: 6px;
}

.voucher-entry-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.voucher-entry-table td {
  border-top: 1px solid var(--line);
  padding: 4px 6px;
  font-size: 12px;
}

.voucher-entry-table td:nth-child(1) {
  width: 34%;
  font-weight: 800;
}

.voucher-entry-table td:nth-child(2) {
  width: 30%;
  color: var(--muted);
}

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

.voucher-print-root {
  display: none;
}

.voucher-print-sheet {
  position: relative;
  width: 190mm;
  min-height: 128mm;
  margin: 0 auto 10mm;
  padding: 8mm;
  color: #111;
  background: #fff;
  page-break-after: always;
}

.voucher-print-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  border-bottom: 2px solid #111;
  padding-bottom: 6px;
}

.voucher-print-head h1 {
  margin: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.voucher-print-head strong,
.voucher-print-head span {
  display: block;
  font-size: 12px;
}

.voucher-print-meta {
  text-align: right;
}

.voucher-print-info,
.voucher-print-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 7px 0;
  font-size: 12px;
}

.voucher-print-footer {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #111;
  margin-top: 8px;
  padding-top: 8px;
}

.voucher-invoice-attachment {
  margin-top: 8mm;
  border: 1px solid #111;
  page-break-inside: avoid;
  break-inside: avoid;
}

.voucher-invoice-title {
  padding: 5px 8px;
  border-bottom: 1px solid #111;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.voucher-invoice-grid {
  display: grid;
  grid-template-columns: 26mm 1fr 26mm 1fr;
  font-size: 12px;
}

.voucher-invoice-grid span,
.voucher-invoice-grid strong {
  min-height: 9mm;
  padding: 5px 7px;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
}

.voucher-invoice-grid span {
  background: #f8fafc;
  font-weight: 900;
  text-align: center;
}

.voucher-invoice-grid strong {
  font-weight: 700;
}

.voucher-invoice-grid span:nth-last-child(-n+2),
.voucher-invoice-grid strong:nth-last-child(-n+2) {
  border-bottom: 0;
}

.voucher-invoice-grid strong:nth-child(4n),
.voucher-invoice-grid strong:last-child {
  border-right: 0;
}

.voucher-print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.voucher-print-table th,
.voucher-print-table td {
  border: 1px solid #111;
  padding: 6px;
  height: 12mm;
  vertical-align: middle;
}

.voucher-print-table th:nth-child(1) {
  width: 27%;
}

.voucher-print-table th:nth-child(2) {
  width: 24%;
}

.voucher-print-table th:nth-child(3) {
  width: 21%;
}

.voucher-print-table th:nth-child(4),
.voucher-print-table th:nth-child(5) {
  width: 14%;
}

.voucher-print-table tfoot td {
  font-weight: 900;
}

.voucher-print-watermark {
  position: absolute;
  top: 50mm;
  left: 55mm;
  transform: rotate(-18deg);
  color: rgba(170, 0, 0, 0.12);
  font-size: 44px;
  font-weight: 900;
  pointer-events: none;
}

.voucher-receipt-print-sheet {
  width: 190mm;
  min-height: 277mm;
  margin: 0 auto 10mm;
  padding: 6mm;
  color: #111;
  background: #fff;
  page-break-after: always;
}

.voucher-receipt-print-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4px 12px;
  padding-bottom: 4mm;
  border-bottom: 1px solid #111;
  font-size: 11px;
}

.voucher-receipt-print-head strong {
  font-size: 15px;
}

.voucher-receipt-frame {
  display: block;
  width: 100%;
  height: 250mm;
  margin-top: 4mm;
  border: 0;
  background: #fff;
}

.voucher-receipt-image {
  display: block;
  width: 100%;
  max-height: 252mm;
  object-fit: contain;
  object-position: top center;
  margin-top: 4mm;
}

.voucher-receipt-fallback,
.voucher-receipt-missing {
  margin-top: 3mm;
  font-size: 11px;
  color: #555;
}

.bank-match-tools {
  display: grid;
  gap: 6px;
}

.bank-operation-panel {
  display: grid;
  gap: 6px;
}

.bank-match-result {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 560px;
  white-space: normal;
}

.bank-candidate-list {
  display: grid;
  gap: 6px;
}

.bank-candidate-list > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-candidate-button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d9e6e2;
  border-radius: 7px;
  background: #f8fbfa;
  color: var(--text);
  text-align: left;
}

.bank-candidate-button:hover {
  border-color: #5f9d90;
  background: #f1faf7;
}

.bank-candidate-button strong {
  font-size: 12px;
}

.bank-candidate-button small {
  color: var(--muted);
  font-size: 11px;
}

.flow-source-lock {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #f1c232;
  border-radius: 8px;
  background: #fff8df;
}

.flow-source-lock strong {
  font-size: 14px;
}

.flow-source-lock span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.flow-source-lock .btn {
  width: fit-content;
}

.model-field {
  position: relative;
}

.model-suggestion-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #d8dee5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(11, 30, 34, 0.16);
}

.model-suggestion-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.model-suggestion-menu button:last-child {
  border-bottom: 0;
}

.model-suggestion-menu button:hover {
  background: #f4f8f7;
}

.model-suggestion-menu small {
  flex: 0 0 auto;
  color: var(--muted);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.split-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.detail-grid {
  display: block;
}

.vehicle-process {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.process-pill {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.process-pill.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

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

.vehicle-snapshot div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.vehicle-snapshot span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.vehicle-snapshot strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.vehicle-snapshot .snapshot-danger {
  border-color: #f1b5ae;
  background: #fff0ee;
}

.vehicle-snapshot .snapshot-danger span,
.vehicle-snapshot .snapshot-danger strong {
  color: var(--danger);
}

.settlement-lock-notice {
  display: grid;
  gap: 4px;
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 149, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.09);
}

.settlement-lock-notice strong {
  color: #9a5a00;
  font-size: 14px;
  font-weight: 900;
}

.settlement-lock-notice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settlement-edit-confirm {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 149, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.08);
}

.settlement-edit-confirm strong {
  color: #9a5a00;
  font-size: 16px;
  font-weight: 900;
}

.settlement-edit-confirm span {
  color: var(--muted);
  line-height: 1.7;
}

.settlement-prereq-notice {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 59, 48, 0.24);
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.08);
}

.settlement-prereq-notice strong {
  color: var(--danger);
  font-size: 15px;
  font-weight: 900;
}

.settlement-prereq-notice span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.settlement-prereq-notice ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.settlement-prereq-notice li {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 59, 48, 0.12);
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.locked-panel {
  position: relative;
}

.locked-panel form,
.locked-panel .invoice-form-panel,
.locked-panel .contract-form-panel,
.locked-panel .flow-entry-panel {
  opacity: 0.58;
}

.process-panel {
  display: none;
}

.process-panel.active {
  display: block;
}

.detail-grid .process-panel.active {
  width: min(860px, 100%);
  margin: 0 auto;
}

.detail-grid section {
  min-width: 0;
}

.detail-grid h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
}

.basic-info-warning {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.basic-info-warning div {
  padding: 8px 10px;
  border: 1px solid #e7c98d;
  border-radius: 8px;
  background: #fff9ec;
  color: #795711;
  font-size: 12px;
  font-weight: 700;
}

.basic-info-warning .business-anomaly-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.basic-info-warning .business-anomaly-warning span {
  min-width: 0;
}

.basic-info-warning .business-anomaly-warning .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cost-grid,
.stack-form {
  display: grid;
  gap: 10px;
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.check-row input {
  width: 16px;
  height: 16px;
}

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

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

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

.hidden {
  display: none !important;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.daily-work-modal .modal-body h4 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
}

.daily-work-modal .modal-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.daily-work-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-work-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

#vehicleModal .modal-dialog {
  max-width: min(1100px, calc(100vw - 32px));
}

.flow-submodule {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-submodule + .flow-submodule {
  margin-top: 14px;
}

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

.flow-subhead strong {
  font-size: 15px;
}

.flow-subhead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.flow-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.flow-entry-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(10, 132, 255, 0.34);
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.04);
}

.flow-entry-panel .flow-form {
  margin-top: 0;
}

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

.flow-balance-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.flow-balance-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.flow-balance-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.flow-balance-card .balanced {
  color: var(--success);
}

.flow-balance-card .unbalanced {
  color: var(--danger);
}

.flow-balance-card .unrecorded {
  color: #b56a00;
}

.flow-history {
  margin-top: 12px;
}

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

.flow-history table {
  width: 100%;
  border-collapse: collapse;
}

.flow-history th,
.flow-history td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
}

.flow-history th:last-child,
.flow-history td:last-child {
  text-align: right;
}

.danger-x {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}

.flow-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

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

.invoice-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.invoice-card,
.invoice-disabled {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.invoice-card.recorded {
  background: #f5faf8;
  border-color: #bdd9cc;
}

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

.invoice-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.invoice-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-form-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.invoice-card .stack-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-card .stack-form .wide {
  grid-column: 1 / -1;
}

.invoice-history {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.invoice-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px;
}

.invoice-history-row strong,
.invoice-history-row span,
.invoice-history-row small {
  display: block;
}

.invoice-history-row strong {
  font-size: 13px;
}

.invoice-history-row span,
.invoice-history-row small {
  color: var(--muted);
  font-size: 12px;
}

.invoice-disabled {
  min-height: 160px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  background: #f0f3f4;
}

.invoice-disabled strong {
  color: #4c5960;
  font-size: 16px;
}

.contract-hint,
.contract-esign-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.contract-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.contract-card.recorded {
  border-color: rgba(15, 111, 76, 0.32);
  background: linear-gradient(180deg, rgba(236, 249, 242, 0.88), #fff);
  box-shadow: 0 10px 22px rgba(15, 111, 76, 0.08);
}

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

.contract-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.contract-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.contract-status.ok {
  background: #e7f4ed;
  color: #1f6b45;
}

.contract-status.missing {
  background: #fff0f0;
  color: #9b2e2e;
}

.contract-record-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.contract-record-box.ok {
  border: 1px solid rgba(15, 111, 76, 0.22);
  background: rgba(15, 111, 76, 0.08);
}

.contract-record-box.missing {
  border: 1px solid rgba(210, 69, 69, 0.2);
  background: rgba(210, 69, 69, 0.06);
}

.contract-record-main {
  display: grid;
  gap: 4px;
}

.contract-record-main strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.contract-record-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contract-record-actions {
  display: flex;
  justify-content: flex-end;
}

.contract-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: #0f6f4c;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.contract-open-link:hover {
  color: #fff;
  background: #0a583b;
}

.contract-record-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  margin-bottom: 12px;
  padding: 0 2px;
  font-size: 12px;
}

.contract-record-detail span {
  color: var(--muted);
  font-weight: 800;
}

.contract-record-detail strong {
  color: var(--ink);
  font-weight: 900;
  min-width: 0;
  word-break: break-word;
}

.contract-muted {
  color: #9ba5aa;
}

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

.contract-form-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(10, 132, 255, 0.28);
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.04);
}

html[data-theme="dark"] .contract-card.recorded {
  border-color: rgba(48, 209, 88, 0.28);
  background: linear-gradient(180deg, rgba(31, 67, 45, 0.52), rgba(30, 31, 36, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .contract-record-box.ok {
  border-color: rgba(48, 209, 88, 0.28);
  background: rgba(48, 209, 88, 0.12);
}

html[data-theme="dark"] .contract-record-box.missing {
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.12);
}

html[data-theme="dark"] .contract-record-main strong,
html[data-theme="dark"] .contract-record-detail strong {
  color: #f5f5f7;
}

html[data-theme="dark"] .contract-form-panel {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(10, 132, 255, 0.1);
}

html[data-theme="dark"] .settlement-lock-notice {
  border-color: rgba(255, 159, 10, 0.34);
  background: rgba(255, 159, 10, 0.12);
}

html[data-theme="dark"] .settlement-lock-notice strong {
  color: #ffd60a;
}

html[data-theme="dark"] .settlement-edit-confirm {
  border-color: rgba(255, 159, 10, 0.34);
  background: rgba(255, 159, 10, 0.12);
}

html[data-theme="dark"] .settlement-edit-confirm strong {
  color: #ffd60a;
}

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

.contract-esign-note {
  margin-top: 12px;
  background: #fffaf1;
  border-color: #ead8ad;
}

.settlement-summary {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

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

.profit-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  min-height: 270px;
  overflow-x: auto;
}

.bar-item {
  display: grid;
  grid-template-rows: 30px 210px 20px;
  gap: 8px;
  text-align: center;
}

.bar-value {
  align-self: end;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.bar-track {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.bar {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: var(--brand-2);
}

.bar.negative {
  background: var(--danger);
}

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

.report-profit-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.report-metric-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-metric-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-right: 2px;
}

.report-metric-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.report-metric-option input {
  width: 13px;
  height: 13px;
  accent-color: var(--metric-color);
}

.report-metric-option::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--metric-color);
}

.report-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.report-chart-card {
  margin-bottom: 0;
  padding: 14px;
  overflow: hidden;
}

.report-chart-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.report-chart-title strong {
  font-size: 14px;
  color: var(--ink);
}

.report-chart-title span {
  color: var(--muted);
  font-size: 12px;
}

.report-chart-svg {
  width: 100%;
  min-height: 260px;
}

.report-chart-svg svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
}

.report-grid-line {
  stroke: #eef2f4;
  stroke-width: 1;
}

.report-zero-line {
  stroke: #9aa5ab;
  stroke-width: 1.2;
}

.report-axis-label,
.report-axis-value {
  fill: var(--muted);
  font-size: 11px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.3fr;
  gap: 12px;
  margin-bottom: 14px;
}

.report-summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.report-summary-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.report-summary-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.report-summary-lines span,
.report-quarter-list div,
.report-model-list div {
  min-width: 0;
}

.report-summary-lines span {
  color: var(--muted);
  font-size: 12px;
}

.report-summary-lines strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
}

.report-quarter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-quarter-list div,
.report-model-list div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.report-quarter-list strong,
.report-model-list strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.report-quarter-list span,
.report-model-list span,
.report-quarter-list small,
.report-model-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.report-model-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 222px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .report-charts,
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .invoice-upload-form {
    grid-template-columns: minmax(240px, 1fr) auto auto;
  }

  .invoice-upload-form .muted-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .report-summary-lines,
  .report-quarter-list,
  .report-model-list {
    grid-template-columns: 1fr;
  }

  .invoice-upload-form {
    grid-template-columns: 1fr;
  }
}

.monthly-profit-basis {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-monthly-profit {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.salary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #eef7f4;
  color: var(--brand);
  font-weight: 800;
}

.toolbar.monthly-profit-toolbar {
  align-items: flex-end;
}

.monthly-profit-toolbar label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.monthly-profit-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

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

.monthly-profit-panel h2,
.monthly-profit-section-head h3 {
  margin: 0;
  font-weight: 900;
}

.monthly-profit-panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.monthly-profit-section-head h3 {
  font-size: 15px;
}

.monthly-profit-form,
.monthly-profit-items {
  display: grid;
  gap: 10px;
}

.monthly-profit-section-head,
.monthly-profit-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.monthly-profit-section-head {
  justify-content: space-between;
  margin: 16px 0 10px;
}

.monthly-profit-item input:first-child {
  min-width: 0;
  flex: 1;
}

.monthly-profit-item input[type="number"] {
  width: 150px;
}

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

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

.salary-kpi {
  padding: 14px;
}

.salary-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.salary-kpi strong {
  font-size: 22px;
  color: var(--ink);
}

.salary-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
}

.salary-layout.single {
  grid-template-columns: 1fr;
}

.salary-panel {
  min-width: 0;
  padding: 16px;
}

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

.panel-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.salary-filters {
  display: flex;
  gap: 8px;
}

.employee-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.employee-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.employee-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.employee-card > button:first-child {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.employee-card:hover {
  border-color: var(--brand-2);
  background: #f8fcfb;
}

.employee-card span {
  font-size: 14px;
  font-weight: 900;
}

.employee-card small {
  color: var(--muted);
}

.modal-employee-list {
  max-height: 220px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.salary-mini-form,
.salary-form {
  display: grid;
  gap: 10px;
}

.salary-mini-form {
  align-content: start;
}

.salary-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.salary-form .wide,
.salary-total.wide {
  grid-column: 1 / -1;
}

.salary-tax-note {
  margin: -2px 0 2px;
  padding: 8px 10px;
  border: 1px solid #f1df9a;
  border-radius: 8px;
  color: #7a5a00;
  background: #fff7db;
  font-size: 12px;
  font-weight: 700;
}

.salary-table {
  min-width: 1280px;
}

.salary-table tbody tr {
  cursor: pointer;
}

.salary-table tbody tr:hover {
  background: #f8fcfb;
}

.commission-editor {
  display: grid;
  gap: 10px;
}

.commission-toolbar,
.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.commission-toolbar > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flat-table {
  box-shadow: none;
}

.commission-table {
  min-width: 900px;
}

.commission-table input {
  min-width: 110px;
}

.settlement-sheet {
  padding: 0;
  background: #fff;
  overflow: visible;
}

.settlement-sheet-document {
  position: relative;
  width: min(860px, 100%);
  margin: 0 auto;
}

.settlement-sheet-watermark {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(-24deg);
  pointer-events: none;
  user-select: none;
  color: rgba(180, 35, 24, 0.13);
  font-size: clamp(52px, 11vw, 118px);
  font-weight: 900;
  letter-spacing: 10px;
  white-space: nowrap;
  border: 8px solid rgba(180, 35, 24, 0.10);
  border-radius: 12px;
  padding: 10px 28px;
}

.settlement-sheet-panel {
  width: 100%;
}

.settlement-excel {
  width: min(860px, 100%);
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
  border: 2px solid #222;
  color: #111;
  background: #fff;
}

.settlement-excel .col-label {
  width: 104px;
}

.settlement-excel .col-value {
  width: auto;
}

.settlement-excel th,
.settlement-excel td {
  height: 28px;
  padding: 4px 6px;
  border: 1px solid #555;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
  text-align: center;
  word-break: break-word;
}

.settlement-excel .sheet-main-title {
  height: 42px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  background: #fff;
  border: 2px solid #222;
}

.settlement-excel .section-row {
  height: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  background: #d9eaf7;
  border-top: 2px solid #222;
  border-bottom: 2px solid #222;
}

.settlement-excel .subhead td,
.settlement-excel .label {
  color: #111;
  font-weight: 800;
  background: #f2f2f2;
}

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

.settlement-excel .total-row td {
  font-weight: 900;
  background: #fff2cc;
  border-top: 2px solid #222;
}

.settlement-excel .muted-cell {
  color: #777;
  text-align: center;
}

.settlement-excel .signature-row td {
  height: 42px;
}

.sheet-extra {
  width: min(860px, 100%);
  margin: 10px auto 0;
}

.sheet-extra summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.compact-extra {
  width: 100%;
  margin: 0;
}

.toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 2000;
}

.app-toast {
  width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow);
}

.app-toast.error {
  background: var(--danger);
}

.app-toast.clickable {
  cursor: pointer;
}

.app-toast.clickable::after {
  content: "点击查看";
  display: block;
  margin-top: 4px;
  opacity: 0.78;
  font-size: 12px;
  font-weight: 800;
}

/* Compact clean UI polish layer. Layout rules stay unchanged. */
body {
  background: #f6f8f9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.login-screen,
.sidebar {
  background: #172325;
}

.brand-block {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.brand-mark {
  background: #d9ad62;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-link {
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-group-toggle {
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-list {
  gap: 2px;
  margin-top: 14px;
}

.nav-link,
.nav-group-toggle {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.nav-group {
  gap: 2px;
}

.nav-group-body {
  gap: 2px;
  padding-left: 8px;
}

.nav-sub-link {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.finance-close-board {
  display: none !important;
}

.main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 190px),
    #f6f8f9;
  padding: 20px;
}

.topbar h1,
.section-head h2 {
  color: #111a1f;
  letter-spacing: 0;
}

.topbar {
  margin-bottom: 16px;
  gap: 16px;
}

.topbar h1 {
  font-size: 22px;
  line-height: 1.2;
}

.topbar p {
  margin-top: 4px;
  font-size: 13px;
}

.topbar-actions {
  gap: 8px;
}

.topbar p,
.section-head p,
.muted-note {
  color: #6b747b;
}

.kpi,
.form-panel,
.chart-panel,
.workflow,
.table-wrap,
.task-lane {
  border-color: #e4e9ec;
  box-shadow: 0 8px 24px rgba(20, 36, 45, 0.045);
}

.kpi,
.form-panel,
.chart-panel,
.table-wrap,
.task-lane,
.message-center,
.modal-content,
.login-panel {
  border-radius: 8px;
}

.app-confirm-modal #appConfirmMessage {
  margin: 0;
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-line;
}

.kpi {
  background: linear-gradient(180deg, #ffffff, #fbfcfc);
  padding: 12px;
}

.kpi span {
  color: #69737b;
  font-weight: 700;
}

.kpi strong {
  color: #152126;
  font-weight: 850;
}

.dashboard-kpis .kpi {
  box-shadow: none;
  padding: 12px 10px;
}

.dashboard-kpis .kpi strong {
  font-size: 20px;
}

.kpi-grid {
  gap: 10px;
}

.form-panel {
  padding: 16px;
}

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

.table-wrap {
  border-radius: 8px;
}

.data-table th,
.data-table td {
  padding: 9px 12px;
}

.data-table td {
  font-size: 13px;
}

.toolbar,
.section-head,
.report-header {
  gap: 8px;
  margin-bottom: 10px;
}

.toolbar .form-select,
.toolbar .form-control,
.toolbar .btn,
.report-header .form-control,
.report-header .btn {
  min-height: 34px;
  font-size: 13px;
}

.section-head h2 {
  font-size: 16px;
}

#view-reports .report-monthly-profit {
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.report-annual-head {
  margin-bottom: 8px;
}

.task-card,
.summary-chip,
.sort-group,
.ledger-performance-title,
.bank-rule-grid div,
.settings-avatar-preview {
  border-color: #e5eaed;
  box-shadow: none;
}

.task-card:hover,
.summary-chip:hover,
.summary-chip.active,
.performance-chip:hover,
.performance-chip.active,
.tax-filter.active {
  border-color: #6ca79a;
  background: #f4faf8;
}

.flow-step span,
.lane-head strong,
.status-pill,
.badge-soft.success,
.inventory-days.fresh {
  background: #e8f5ef;
}

.status-pill,
.badge-soft.success,
.inventory-days.fresh,
.task-card strong,
.summary-chip strong,
.ledger-performance-title strong {
  color: #236b50;
}

.data-table {
  background: #fff;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #68737b;
  background: #f8fafb;
  border-bottom-color: #dce4e8;
  font-weight: 800;
}

.data-table td {
  color: #1f2b31;
  border-bottom-color: #edf1f3;
}

.data-table tbody tr:hover td {
  background: #f8fbfb;
}

.inventory-table tbody tr.vehicle-row-sold,
.inventory-table tbody tr.vehicle-row-sold td {
  background: rgba(255, 59, 48, 0.012);
}

.inventory-table tbody tr.vehicle-row-sold:hover td {
  background: rgba(255, 59, 48, 0.022);
}

.form-control,
.form-select {
  border-color: #dce4e8;
  border-radius: 7px;
  color: #172126;
  background-color: #fff;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: #6ca79a;
  box-shadow: 0 0 0 3px rgba(108, 167, 154, 0.16);
}

textarea.form-control {
  line-height: 1.6;
}

.btn {
  border-radius: 7px;
  font-weight: 800;
  box-shadow: none !important;
}

.btn-dark {
  border-color: #172325;
  background: #172325;
}

.btn-dark:hover {
  border-color: #0f191b;
  background: #0f191b;
}

.btn-outline-dark {
  border-color: #cfd8dd;
  color: #1c292f;
  background: #fff;
}

.btn-outline-dark:hover {
  border-color: #172325;
  background: #172325;
  color: #fff;
}

.btn-outline-secondary {
  border-color: #d8e0e4;
  color: #5f6b73;
  background: #fff;
}

.btn-outline-secondary:hover {
  border-color: #aebbc2;
  background: #f4f7f8;
  color: #26343b;
}

.btn-success {
  border-color: #23704f;
  background: #23704f;
}

.btn-outline-danger,
.btn-danger {
  border-color: #c45b52;
}

.modal-content {
  border: 1px solid #e1e7eb;
  box-shadow: 0 22px 55px rgba(17, 26, 31, 0.16);
}

.modal-header,
.modal-footer {
  border-color: #edf1f3;
}

.modal-title {
  font-weight: 850;
}

.modal-subtitle {
  color: #6d777f;
}

.message-center {
  border-color: #eedaa9;
  border-left-color: #c78c24;
  background: #fffaf0;
  box-shadow: 0 8px 22px rgba(134, 93, 22, 0.05);
}

.message-icon-button {
  border-color: #e5cb8c;
  background: #fffaf0;
}

.message-item {
  border-color: #f0dfb5;
  background: #fffdf7;
}

.invoice-alert,
.badge-soft.danger,
.inventory-days.danger {
  background: #fff1ef;
}

.next-step {
  background: #fff6e6;
}

.app-toast {
  box-shadow: 0 12px 28px rgba(17, 26, 31, 0.14);
}

/* Apple-inspired visual refinement layer. Keeps module layout unchanged. */
@media screen {
  :root {
    --bg: #f5f5f7;
    --panel: rgba(255, 255, 255, 0.88);
    --ink: #1d1d1f;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: rgba(60, 60, 67, 0.14);
    --brand: #007aff;
    --brand-2: #34c759;
    --accent: #ff9f0a;
    --danger: #ff3b30;
    --success: #34c759;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.055);
  }

  body {
    color: var(--ink);
    background:
      radial-gradient(circle at 14% -8%, rgba(0, 122, 255, 0.08), transparent 34%),
      linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 38%, #f2f3f5 100%);
  }

  .login-screen {
    background:
      radial-gradient(circle at 18% 10%, rgba(0, 122, 255, 0.16), transparent 28%),
      radial-gradient(circle at 82% 18%, rgba(52, 199, 89, 0.12), transparent 24%),
      #f5f5f7;
  }

  .login-panel,
  .form-panel,
  .chart-panel,
  .workflow,
  .table-wrap,
  .task-lane,
  .message-center,
  .modal-content,
  .kpi,
  .task-card,
  .summary-chip,
  .sort-group,
  .ledger-performance-title,
  .report-summary-card,
  .monthly-profit-panel,
  .monthly-profit-card,
  .salary-panel,
  .salary-record-card,
  .expense-panel,
  .contract-card,
  .invoice-card,
  .bank-flow-card,
  .bank-receipt-card,
  .voucher-package,
  .settings-card,
  .bank-rule-grid div,
  .settings-avatar-preview {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.045);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .sidebar {
    color: #1d1d1f;
    background: rgba(246, 247, 249, 0.86);
    border-right: 1px solid rgba(60, 60, 67, 0.13);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .brand-block {
    border-bottom-color: rgba(60, 60, 67, 0.12);
  }

  .brand-mark {
    color: #fff;
    background: linear-gradient(135deg, #007aff, #64d2ff);
    box-shadow: 0 8px 18px rgba(0, 122, 255, 0.2);
  }

  .brand-title {
    color: #1d1d1f;
  }

  .brand-subtitle,
  .sidebar-footer,
  .api-status {
    color: #6e6e73;
  }

  .sidebar-user-card {
    border-color: rgba(60, 60, 67, 0.12);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .sidebar-user-card span {
    color: #8a8a90;
  }

  .sidebar-user-card strong {
    color: #1d1d1f;
  }

  .sidebar-user-card small {
    color: #626268;
  }

  .nav-link,
  .nav-group-toggle {
    color: #4b4b50;
    background: transparent;
    border: 1px solid transparent;
  }

  .nav-link:hover,
  .nav-link.active,
  .nav-group.active .nav-group-toggle {
    color: #005ecb;
    border-color: rgba(0, 122, 255, 0.16);
    background: rgba(0, 122, 255, 0.09);
  }

  .nav-group-body {
    margin-left: 12px;
    padding-left: 8px;
    border-left: 1px solid rgba(60, 60, 67, 0.11);
  }

  .main {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 220px),
      transparent;
  }

  .topbar h1,
  .section-head h2,
  .modal-title {
    color: #1d1d1f;
    font-weight: 780;
  }

  .topbar p,
  .section-head p,
  .muted-note,
  .modal-subtitle,
  .kpi span,
  .data-table th {
    color: #6e6e73;
  }

  .kpi,
  .form-panel,
  .chart-panel,
  .table-wrap,
  .task-lane {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.04);
  }

  .kpi {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 252, 0.88));
  }

  .kpi strong {
    color: #1d1d1f;
    font-weight: 760;
  }

  .form-control,
  .form-select {
    color: #1d1d1f;
    border-color: rgba(60, 60, 67, 0.18);
    background-color: rgba(255, 255, 255, 0.88);
  }

  .form-control:hover,
  .form-select:hover {
    border-color: rgba(0, 122, 255, 0.28);
  }

  .form-control:focus,
  .form-select:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
  }

  .btn {
    border-radius: 8px;
    font-weight: 760;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  }

  .btn:active {
    transform: translateY(1px);
  }

  .btn-dark,
  .btn-success {
    color: #fff;
    border-color: #007aff;
    background: #007aff;
  }

  .btn-dark:hover,
  .btn-success:hover {
    border-color: #006ee6;
    background: #006ee6;
  }

  .btn-outline-dark,
  .btn-outline-secondary {
    color: #1d1d1f;
    border-color: rgba(60, 60, 67, 0.18);
    background: rgba(255, 255, 255, 0.78);
  }

  .btn-outline-dark:hover,
  .btn-outline-secondary:hover {
    color: #005ecb;
    border-color: rgba(0, 122, 255, 0.22);
    background: rgba(0, 122, 255, 0.08);
  }

  .btn-outline-danger,
  .btn-danger {
    border-color: rgba(255, 59, 48, 0.42);
  }

  .btn-danger {
    background: #ff3b30;
  }

  .data-table {
    background: rgba(255, 255, 255, 0.9);
  }

  .data-table th {
    color: #6e6e73;
    background: rgba(245, 245, 247, 0.95);
    border-bottom-color: rgba(60, 60, 67, 0.16);
    font-weight: 760;
  }

  .data-table td {
    color: #1d1d1f;
    border-bottom-color: rgba(60, 60, 67, 0.09);
  }

  .data-table tbody tr:hover td {
    background: rgba(0, 122, 255, 0.055);
  }

  .inventory-table tbody tr.vehicle-row-sold,
  .inventory-table tbody tr.vehicle-row-sold td {
    background: rgba(255, 59, 48, 0.012);
  }

  .inventory-table tbody tr.vehicle-row-sold:hover td {
    background: rgba(255, 59, 48, 0.022);
  }

  .task-card:hover,
  .summary-chip:hover,
  .summary-chip.active,
  .performance-chip:hover,
  .performance-chip.active,
  .tax-filter.active,
  .sort-chip.active {
    color: #005ecb;
    border-color: rgba(0, 122, 255, 0.25);
    background: rgba(0, 122, 255, 0.075);
  }

  .status-pill,
  .badge-soft.success,
  .inventory-days.fresh,
  .flow-step span,
  .lane-head strong {
    color: #248a3d;
    background: rgba(52, 199, 89, 0.13);
  }

  .badge-soft.danger,
  .inventory-days.danger,
  .invoice-alert {
    color: #c92820;
    background: rgba(255, 59, 48, 0.1);
  }

  .next-step {
    background: rgba(255, 159, 10, 0.12);
  }

  .message-center {
    border-color: rgba(255, 159, 10, 0.26);
    border-left-color: #ff9f0a;
    background: rgba(255, 251, 242, 0.88);
  }

  .message-icon-button,
  .message-item {
    border-color: rgba(255, 159, 10, 0.22);
    background: rgba(255, 255, 255, 0.78);
  }

  .modal-content {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  }

  .modal-header,
  .modal-footer {
    border-color: rgba(60, 60, 67, 0.11);
  }

  .app-toast {
    color: #fff;
    background: rgba(29, 29, 31, 0.88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111215;
    --panel: rgba(30, 31, 36, 0.86);
    --ink: #f5f5f7;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.12);
    --brand: #0a84ff;
    --brand-2: #30d158;
    --accent: #ff9f0a;
    --danger: #ff453a;
    --success: #30d158;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  }

  html[data-theme="dark"] body {
    color: #f5f5f7;
    background:
      radial-gradient(circle at 12% -8%, rgba(10, 132, 255, 0.18), transparent 34%),
      radial-gradient(circle at 92% 4%, rgba(48, 209, 88, 0.11), transparent 26%),
      linear-gradient(180deg, #17181c 0%, #111215 42%, #0b0c0f 100%);
  }

  html[data-theme="dark"] .login-screen {
    background:
      radial-gradient(circle at 18% 10%, rgba(10, 132, 255, 0.22), transparent 28%),
      radial-gradient(circle at 82% 18%, rgba(48, 209, 88, 0.12), transparent 24%),
      #111215;
  }

  html[data-theme="dark"] .main {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 220px),
      transparent;
  }

  html[data-theme="dark"] .login-panel,
  html[data-theme="dark"] .form-panel,
  html[data-theme="dark"] .chart-panel,
  html[data-theme="dark"] .workflow,
  html[data-theme="dark"] .table-wrap,
  html[data-theme="dark"] .task-lane,
  html[data-theme="dark"] .message-center,
  html[data-theme="dark"] .modal-content,
  html[data-theme="dark"] .kpi,
  html[data-theme="dark"] .task-card,
  html[data-theme="dark"] .summary-chip,
  html[data-theme="dark"] .sort-group,
  html[data-theme="dark"] .ledger-performance-title,
  html[data-theme="dark"] .report-summary-card,
  html[data-theme="dark"] .monthly-profit-panel,
  html[data-theme="dark"] .monthly-profit-card,
  html[data-theme="dark"] .salary-panel,
  html[data-theme="dark"] .salary-record-card,
  html[data-theme="dark"] .finance-close-board,
  html[data-theme="dark"] .expense-panel,
  html[data-theme="dark"] .contract-card,
  html[data-theme="dark"] .invoice-card,
  html[data-theme="dark"] .bank-flow-card,
  html[data-theme="dark"] .bank-receipt-card,
  html[data-theme="dark"] .voucher-package,
  html[data-theme="dark"] .settings-card,
  html[data-theme="dark"] .bank-rule-grid div,
  html[data-theme="dark"] .settings-avatar-preview {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 31, 36, 0.82);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  }

  html[data-theme="dark"] .segmented-control,
  html[data-theme="dark"] .expense-calculation-toolbar,
  html[data-theme="dark"] .expense-calculation-summary div {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
  }

  html[data-theme="dark"] .segmented-control button {
    color: rgba(245, 245, 247, 0.72);
  }

  html[data-theme="dark"] .segmented-control button.active {
    color: #fff;
    background: #0a84ff;
  }

  html[data-theme="dark"] .expense-calculation-summary strong {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .finance-close-head strong,
  html[data-theme="dark"] .finance-close-step strong,
  html[data-theme="dark"] .finance-risk-item {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .finance-close-head span,
  html[data-theme="dark"] .finance-close-step span,
  html[data-theme="dark"] .finance-close-step small,
  html[data-theme="dark"] .finance-risk-empty {
    color: rgba(245, 245, 247, 0.66);
  }

  html[data-theme="dark"] .finance-close-step,
  html[data-theme="dark"] .finance-risk-item {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
  }

  html[data-theme="dark"] .finance-close-step:hover,
  html[data-theme="dark"] .finance-risk-item:hover {
    border-color: rgba(10, 132, 255, 0.42);
    background: rgba(10, 132, 255, 0.12);
  }

  html[data-theme="dark"] .finance-close-step.is-warning,
  html[data-theme="dark"] .finance-close-health.is-warning {
    border-color: rgba(255, 159, 10, 0.32);
    background: rgba(255, 159, 10, 0.13);
  }

  html[data-theme="dark"] .finance-close-step.is-warning strong,
  html[data-theme="dark"] .finance-close-health.is-warning {
    color: #ffd580;
  }

  html[data-theme="dark"] .finance-close-step.is-ok strong,
  html[data-theme="dark"] .finance-close-health.is-ok,
  html[data-theme="dark"] .finance-risk-item strong {
    color: #74df8b;
  }

  html[data-theme="dark"] .finance-close-health.is-ok,
  html[data-theme="dark"] .finance-risk-item strong {
    border-color: rgba(48, 209, 88, 0.2);
    background: rgba(48, 209, 88, 0.14);
  }

  html[data-theme="dark"] .sidebar {
    color: #f5f5f7;
    background: rgba(24, 25, 29, 0.86);
    border-right-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  }

  html[data-theme="dark"] .sidebar-user-card {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
  }

  html[data-theme="dark"] .sidebar-user-card span {
    color: rgba(255, 255, 255, 0.46);
  }

  html[data-theme="dark"] .sidebar-user-card strong {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .sidebar-user-card small {
    color: rgba(255, 255, 255, 0.68);
  }

  html[data-theme="dark"] .brand-block {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .brand-mark {
    background: linear-gradient(135deg, #0a84ff, #64d2ff);
    box-shadow: 0 10px 22px rgba(10, 132, 255, 0.24);
  }

  html[data-theme="dark"] .brand-title,
  html[data-theme="dark"] .topbar h1,
  html[data-theme="dark"] .section-head h2,
  html[data-theme="dark"] .modal-title,
  html[data-theme="dark"] .login-heading h1,
  html[data-theme="dark"] .kpi strong,
  html[data-theme="dark"] .task-card strong,
  html[data-theme="dark"] .summary-chip strong,
  html[data-theme="dark"] .ledger-performance-title strong,
  html[data-theme="dark"] label,
  html[data-theme="dark"] .data-table td {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .brand-subtitle,
  html[data-theme="dark"] .sidebar-footer,
  html[data-theme="dark"] .api-status,
  html[data-theme="dark"] .topbar p,
  html[data-theme="dark"] .section-head p,
  html[data-theme="dark"] .muted-note,
  html[data-theme="dark"] .modal-subtitle,
  html[data-theme="dark"] .kpi span,
  html[data-theme="dark"] .login-brand span,
  html[data-theme="dark"] .login-heading p,
  html[data-theme="dark"] .login-help,
  html[data-theme="dark"] .theme-preference-form span,
  html[data-theme="dark"] .text-secondary {
    color: #a1a1a6 !important;
  }

  html[data-theme="dark"] .login-captcha-image {
    border-color: rgba(255, 255, 255, 0.14);
    background: #f8fafc;
  }

  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    color: #c7c7cc;
    background: transparent;
  }

  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active,
  html[data-theme="dark"] .nav-group.active .nav-group-toggle {
    color: #8ec8ff;
    border-color: rgba(10, 132, 255, 0.28);
    background: rgba(10, 132, 255, 0.16);
  }

  html[data-theme="dark"] .nav-group-body {
    border-left-color: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .form-control,
  html[data-theme="dark"] .form-select {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.14);
    background-color: rgba(44, 45, 51, 0.86);
  }

  html[data-theme="dark"] .form-control::placeholder {
    color: #7b7b82;
  }

  html[data-theme="dark"] .filter-check {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(44, 45, 51, 0.86);
  }

  html[data-theme="dark"] .form-control:hover,
  html[data-theme="dark"] .form-select:hover {
    border-color: rgba(10, 132, 255, 0.34);
  }

  html[data-theme="dark"] .form-control:focus,
  html[data-theme="dark"] .form-select:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
  }

  html[data-theme="dark"] .btn-dark,
  html[data-theme="dark"] .btn-success {
    border-color: #0a84ff;
    background: #0a84ff;
  }

  html[data-theme="dark"] .btn-dark:hover,
  html[data-theme="dark"] .btn-success:hover {
    border-color: #409cff;
    background: #409cff;
  }

  html[data-theme="dark"] .btn-outline-dark,
  html[data-theme="dark"] .btn-outline-secondary {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(44, 45, 51, 0.72);
  }

  html[data-theme="dark"] .btn-outline-dark:hover,
  html[data-theme="dark"] .btn-outline-secondary:hover {
    color: #8ec8ff;
    border-color: rgba(10, 132, 255, 0.34);
    background: rgba(10, 132, 255, 0.14);
  }

  html[data-theme="dark"] .icon-action-btn {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(44, 45, 51, 0.72);
  }

  html[data-theme="dark"] .icon-action-btn:hover,
  html[data-theme="dark"] .icon-action-btn:focus-visible,
  html[data-theme="dark"] .icon-action-btn.active {
    color: #8ec8ff;
    border-color: rgba(10, 132, 255, 0.34);
    background: rgba(10, 132, 255, 0.14);
  }

  html[data-theme="dark"] .btn-outline-danger,
  html[data-theme="dark"] .btn-danger {
    border-color: rgba(255, 69, 58, 0.55);
  }

  html[data-theme="dark"] .btn-danger {
    background: #ff453a;
  }

  html[data-theme="dark"] .data-table {
    background: rgba(30, 31, 36, 0.86);
  }

  html[data-theme="dark"] .data-table th {
    color: #a1a1a6;
    background: rgba(38, 39, 45, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  html[data-theme="dark"] .data-table td {
    border-bottom-color: rgba(255, 255, 255, 0.075);
  }

  html[data-theme="dark"] .data-table tbody tr:hover td {
    background: rgba(10, 132, 255, 0.11);
  }

  html[data-theme="dark"] .inventory-table tbody tr.vehicle-row-sold,
  html[data-theme="dark"] .inventory-table tbody tr.vehicle-row-sold td {
    background: rgba(255, 69, 58, 0.025);
  }

  html[data-theme="dark"] .inventory-table tbody tr.vehicle-row-sold:hover td {
    background: rgba(255, 69, 58, 0.04);
  }

  html[data-theme="dark"] .kpi {
    background: linear-gradient(180deg, rgba(38, 39, 45, 0.9), rgba(30, 31, 36, 0.86));
  }

  html[data-theme="dark"] .task-card:hover,
  html[data-theme="dark"] .summary-chip:hover,
  html[data-theme="dark"] .summary-chip.active,
  html[data-theme="dark"] .performance-chip:hover,
  html[data-theme="dark"] .performance-chip.active,
  html[data-theme="dark"] .tax-filter.active,
  html[data-theme="dark"] .sort-chip.active {
    color: #8ec8ff;
    border-color: rgba(10, 132, 255, 0.32);
    background: rgba(10, 132, 255, 0.14);
  }

  html[data-theme="dark"] .badge-soft {
    color: #d1d1d6;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .status-pill,
  html[data-theme="dark"] .badge-soft.success,
  html[data-theme="dark"] .inventory-days.fresh,
  html[data-theme="dark"] .flow-step span,
  html[data-theme="dark"] .lane-head strong {
    color: #74df8b;
    background: rgba(48, 209, 88, 0.17);
  }

  html[data-theme="dark"] .badge-soft.danger,
  html[data-theme="dark"] .inventory-days.danger,
  html[data-theme="dark"] .invoice-alert,
  html[data-theme="dark"] .business-anomaly-badge,
  html[data-theme="dark"] .basic-info-warning .business-anomaly-warning {
    color: #ff453a;
    background: rgba(255, 69, 58, 0.16);
  }

  html[data-theme="dark"] .status-pill.done,
  html[data-theme="dark"] .badge-soft.done {
    color: #74df8b;
    background: rgba(48, 209, 88, 0.17);
  }

  html[data-theme="dark"] .status-pill.warning,
  html[data-theme="dark"] .badge-soft.warning,
  html[data-theme="dark"] .inventory-days.warning {
    color: #ffd580;
    background: rgba(255, 159, 10, 0.17);
  }

  html[data-theme="dark"] .next-step {
    background: rgba(255, 159, 10, 0.16);
  }

  html[data-theme="dark"] .task-lane.urgent-lane {
    border-color: rgba(255, 69, 58, 0.34);
    background: rgba(255, 69, 58, 0.08);
  }

  html[data-theme="dark"] .task-lane.urgent-lane .lane-head strong,
  html[data-theme="dark"] .summary-chip.danger,
  html[data-theme="dark"] .summary-chip.danger strong,
  html[data-theme="dark"] .summary-chip.danger:hover,
  html[data-theme="dark"] .summary-chip.danger.active,
  html[data-theme="dark"] .task-card strong.danger-text,
  html[data-theme="dark"] .danger-text,
  html[data-theme="dark"] .text-danger,
  html[data-theme="dark"] .flow-balance-card .unbalanced,
  html[data-theme="dark"] .vehicle-snapshot .snapshot-danger span,
  html[data-theme="dark"] .vehicle-snapshot .snapshot-danger strong,
  html[data-theme="dark"] .basic-info-warning,
  html[data-theme="dark"] .voucher-receipt-missing,
  html[data-theme="dark"] .contract-status.missing,
  html[data-theme="dark"] .message-type.missing,
  html[data-theme="dark"] .message-type.onselling_missing,
  html[data-theme="dark"] .finance-risk-item.danger,
  html[data-theme="dark"] .finance-risk-item.danger strong,
  html[data-theme="dark"] .next-step.danger {
    color: #ff453a !important;
  }

  html[data-theme="dark"] .summary-chip.danger,
  html[data-theme="dark"] .summary-chip.danger:hover,
  html[data-theme="dark"] .summary-chip.danger.active,
  html[data-theme="dark"] .task-lane.urgent-lane .lane-head strong,
  html[data-theme="dark"] .basic-info-warning,
  html[data-theme="dark"] .voucher-receipt-missing,
  html[data-theme="dark"] .contract-status.missing,
  html[data-theme="dark"] .message-type.missing,
  html[data-theme="dark"] .message-type.onselling_missing,
  html[data-theme="dark"] .finance-risk-item.danger,
  html[data-theme="dark"] .finance-risk-item.danger strong,
  html[data-theme="dark"] .next-step.danger {
    border-color: rgba(255, 69, 58, 0.36);
    background: rgba(255, 69, 58, 0.14);
  }

  html[data-theme="dark"] .inventory-days.critical {
    color: #ff453a;
    background: rgba(255, 69, 58, 0.22);
  }

  html[data-theme="dark"] .compact-flow .flow-step,
  html[data-theme="dark"] .flow-step,
  html[data-theme="dark"] .process-pill,
  html[data-theme="dark"] .bank-center-tab,
  html[data-theme="dark"] .bank-account-tab,
  html[data-theme="dark"] .report-metric-option,
  html[data-theme="dark"] .message-date-card,
  html[data-theme="dark"] .sort-chip {
    color: #d1d1d6;
    border-color: rgba(255, 255, 255, 0.12);
    background: transparent;
  }

  html[data-theme="dark"] .compact-flow .flow-step.active,
  html[data-theme="dark"] .compact-flow .flow-step:hover,
  html[data-theme="dark"] .process-pill.active,
  html[data-theme="dark"] .process-pill:hover,
  html[data-theme="dark"] .bank-center-tab.active,
  html[data-theme="dark"] .bank-center-tab:hover,
  html[data-theme="dark"] .bank-account-tab.active,
  html[data-theme="dark"] .bank-account-tab:hover,
  html[data-theme="dark"] .message-date-card.active,
  html[data-theme="dark"] .message-date-card:hover,
  html[data-theme="dark"] .sort-chip.active,
  html[data-theme="dark"] .sort-chip:hover {
    color: #f5f5f7;
    border-color: rgba(10, 132, 255, 0.34);
    background: rgba(10, 132, 255, 0.16);
    box-shadow: none;
  }

  html[data-theme="dark"] .process-pill.active {
    color: #fff;
    border-color: #0a84ff;
    background: #0a84ff;
  }

  html[data-theme="dark"] .flow-step strong,
  html[data-theme="dark"] .flow-step small,
  html[data-theme="dark"] .process-pill,
  html[data-theme="dark"] .bank-center-tab,
  html[data-theme="dark"] .bank-account-tab,
  html[data-theme="dark"] .report-metric-option span,
  html[data-theme="dark"] .message-date-card strong,
  html[data-theme="dark"] .message-date-card span,
  html[data-theme="dark"] .message-date-card small {
    color: inherit;
  }

  html[data-theme="dark"] .flow-step small,
  html[data-theme="dark"] .message-date-card span,
  html[data-theme="dark"] .message-date-card small {
    color: #a1a1a6;
  }

  html[data-theme="dark"] .flow-step span {
    color: #8ef0a4;
    background: rgba(48, 209, 88, 0.18);
  }

  html[data-theme="dark"] .compact-flow .flow-step.active span,
  html[data-theme="dark"] .compact-flow .flow-step:hover span {
    color: #ffffff;
    background: rgba(10, 132, 255, 0.32);
  }

  html[data-theme="dark"] .invoice-type-child-tabs,
  html[data-theme="dark"] .bank-center-tabs,
  html[data-theme="dark"] .bank-rule-grid div {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(28, 29, 34, 0.72);
  }

  html[data-theme="dark"] .report-metric-panel {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 31, 36, 0.82);
  }

  html[data-theme="dark"] .report-metric-title,
  html[data-theme="dark"] .report-chart-title span,
  html[data-theme="dark"] .report-axis-label,
  html[data-theme="dark"] .report-axis-value {
    color: #a1a1a6;
    fill: #a1a1a6;
  }

  html[data-theme="dark"] .report-chart-title strong,
  html[data-theme="dark"] .report-summary-card h3 {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .report-grid-line {
    stroke: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .report-zero-line {
    stroke: rgba(255, 255, 255, 0.28);
  }

  html[data-theme="dark"] .link-button {
    color: #8ec8ff;
  }

  html[data-theme="dark"] .tax-filter,
  html[data-theme="dark"] .task-card,
  html[data-theme="dark"] .empty-lane,
  html[data-theme="dark"] .flow-balance-card,
  html[data-theme="dark"] .vehicle-snapshot div,
  html[data-theme="dark"] .vehicle-header-card,
  html[data-theme="dark"] .detail-card,
  html[data-theme="dark"] .settlement-sheet,
  html[data-theme="dark"] .sheet-block,
  html[data-theme="dark"] .invoice-existing-card,
  html[data-theme="dark"] .contract-existing-card,
  html[data-theme="dark"] .bank-match-box,
  html[data-theme="dark"] .bank-candidate-card,
  html[data-theme="dark"] .voucher-card,
  html[data-theme="dark"] .reimbursement-card,
  html[data-theme="dark"] .employee-card,
  html[data-theme="dark"] .salary-kpi,
  html[data-theme="dark"] .monthly-profit-item,
  html[data-theme="dark"] .monthly-profit-total,
  html[data-theme="dark"] .report-summary-lines span,
  html[data-theme="dark"] .report-summary-list li,
  html[data-theme="dark"] .toast-card {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 31, 36, 0.72);
  }

  html[data-theme="dark"] .tax-filter span,
  html[data-theme="dark"] .task-card span,
  html[data-theme="dark"] .empty-lane,
  html[data-theme="dark"] .flow-balance-card span,
  html[data-theme="dark"] .vehicle-snapshot span,
  html[data-theme="dark"] .detail-card span,
  html[data-theme="dark"] .invoice-existing-card span,
  html[data-theme="dark"] .contract-existing-card span,
  html[data-theme="dark"] .bank-match-box span,
  html[data-theme="dark"] .bank-candidate-card span,
  html[data-theme="dark"] .voucher-card span,
  html[data-theme="dark"] .reimbursement-card span,
  html[data-theme="dark"] .employee-card span,
  html[data-theme="dark"] .salary-kpi span,
  html[data-theme="dark"] .monthly-profit-item span,
  html[data-theme="dark"] .report-profit-detail {
    color: #a1a1a6;
  }

  html[data-theme="dark"] .tax-filter.active,
  html[data-theme="dark"] .tax-filter:hover {
    color: #f5f5f7;
    border-color: rgba(10, 132, 255, 0.34);
    background: rgba(10, 132, 255, 0.16);
  }

  html[data-theme="dark"] .tax-filter.active span,
  html[data-theme="dark"] .tax-filter:hover span {
    color: #d8ecff;
  }

  html[data-theme="dark"] .message-center {
    border-color: rgba(255, 159, 10, 0.28);
    border-left-color: #ff9f0a;
    background: rgba(44, 34, 18, 0.76);
  }

  html[data-theme="dark"] .message-icon-button,
  html[data-theme="dark"] .message-item {
    border-color: rgba(255, 159, 10, 0.22);
    background: rgba(36, 32, 26, 0.78);
  }

  html[data-theme="dark"] .modal-header,
  html[data-theme="dark"] .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .daily-work-modal .modal-body h4 {
    color: #f5f5f7;
  }

  html[data-theme="dark"] .daily-work-modal .modal-body p {
    color: #c7c7cc;
  }

  html[data-theme="dark"] .daily-work-list li {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(44, 45, 51, 0.84);
  }

  html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.78;
  }

  html[data-theme="dark"] .btn-close:hover {
    opacity: 1;
  }

  html[data-theme="dark"] .form-check-input {
    border-color: rgba(255, 255, 255, 0.22);
    background-color: rgba(44, 45, 51, 0.86);
  }

  html[data-theme="dark"] .form-check-input:checked {
    border-color: #0a84ff;
    background-color: #0a84ff;
  }
}

/* Sidebar navigation reset: flat dense list, not card-style tabs. */
@media screen {
  .sidebar,
  html[data-theme="dark"] .sidebar {
    color: #fff;
    background: #172325;
    border-right: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand-block,
  html[data-theme="dark"] .brand-block {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .brand-title,
  html[data-theme="dark"] .brand-title {
    color: #fff;
  }

  .brand-subtitle,
  .sidebar-footer,
  .api-status,
  html[data-theme="dark"] .brand-subtitle,
  html[data-theme="dark"] .sidebar-footer,
  html[data-theme="dark"] .api-status {
    color: rgba(255, 255, 255, 0.62);
  }

  .nav-list {
    gap: 0;
    margin-top: 14px;
    padding-right: 0;
  }

  .nav-group {
    gap: 0;
  }

  .nav-link,
  .nav-group-toggle,
  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    position: relative;
    min-height: 29px;
    padding: 5px 8px 5px 13px;
    border: 0;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.66);
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 760;
  }

  .nav-link::before,
  .nav-group-toggle::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    bottom: 7px;
    width: 2px;
    border-radius: 999px;
    background: transparent;
  }

  .nav-link:hover,
  .nav-link.active,
  .nav-group.active .nav-group-toggle,
  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active,
  html[data-theme="dark"] .nav-group.active .nav-group-toggle {
    color: #fff;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.075);
    box-shadow: none;
  }

  .nav-link.active::before,
  .nav-group.active .nav-group-toggle::before {
    background: #e2b464;
  }

  .nav-group-body,
  html[data-theme="dark"] .nav-group-body {
    gap: 0;
    margin: 2px 0 4px 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-sub-link,
  html[data-theme="dark"] .nav-sub-link {
    min-height: 27px;
    padding: 4px 8px 4px 13px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
  }

  .nav-sub-link.active,
  .nav-sub-link:hover,
  html[data-theme="dark"] .nav-sub-link.active,
  html[data-theme="dark"] .nav-sub-link:hover {
    color: #fff;
  }
}

@media (max-width: 1180px) {
  .workflow,
  .task-board,
  .kpi-grid,
  .salary-kpis,
  .form-grid,
  .flow-form,
  .flow-balance-grid,
  .invoice-grid,
  .contract-grid,
  .detail-grid,
  .vehicle-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .salary-layout {
    grid-template-columns: 1fr;
  }

  .monthly-profit-layout {
    grid-template-columns: 1fr;
  }

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

  .flow-step {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .bank-center-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-grid.tax-kpis {
    display: flex;
    flex-wrap: nowrap;
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-right: 0;
  }

  .nav-group {
    grid-column: 1 / -1;
  }

  .topbar,
  .topbar-actions,
  .message-center-head {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-items: stretch;
  }

  .topbar-search {
    width: 100%;
  }

  .user-menu {
    justify-content: space-between;
  }

  .message-item {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .salary-kpis,
  .workflow,
  .task-board,
  .form-grid,
    .form-grid.two,
    .salary-form,
    .split-layout,
    .bank-flow-layout,
    .receipt-upload-row,
    .bank-rule-grid,
    .bank-center-kpis,
    .sale-form-grid,
    .flow-form,
    .flow-balance-grid,
    .invoice-grid,
    .contract-grid,
    .contract-record-box,
    .invoice-card .stack-form,
    .contract-form,
    .detail-grid,
    .theme-preference-form,
    .vehicle-snapshot {
    grid-template-columns: 1fr;
  }

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

  .finance-close-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .finance-close-steps {
    grid-template-columns: 1fr;
  }

  .kpi-grid.tax-kpis {
    gap: 4px;
  }

  .kpi-grid.tax-kpis .kpi {
    padding: 7px 3px;
  }

  .tax-kpis .kpi span {
    font-size: 10px;
  }

  .tax-kpis .kpi strong {
    font-size: 18px;
  }

  .monthly-profit-kpis {
    grid-template-columns: 1fr;
  }

  .monthly-profit-item input[type="number"] {
    width: 112px;
  }
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 0;
    margin: 0;
    background: #fff;
  }

  body:not(.printing-vouchers) > :not(.modal) {
    display: none !important;
  }

  body.printing-vouchers > :not(.voucher-print-root) {
    display: none !important;
  }

  body.printing-vouchers .voucher-print-root {
    display: block !important;
  }

  body.printing-vouchers .voucher-print-sheet {
    width: 190mm !important;
    min-height: 128mm !important;
    margin: 0 auto !important;
    padding: 8mm !important;
    page-break-after: always;
    break-after: page;
  }

  body.printing-vouchers .voucher-receipt-print-sheet {
    width: 190mm !important;
    min-height: 277mm !important;
    margin: 0 auto !important;
    padding: 6mm !important;
    page-break-after: always;
    break-after: page;
  }

  body.printing-vouchers .voucher-receipt-frame {
    width: 100% !important;
    height: 250mm !important;
    border: 0 !important;
  }

  body.printing-vouchers .voucher-receipt-image {
    width: 100% !important;
    max-height: 252mm !important;
    object-fit: contain !important;
  }

  body.printing-vouchers .voucher-print-root > :last-child {
    page-break-after: auto;
    break-after: auto;
  }

  body.printing-vouchers .voucher-print-table th,
  body.printing-vouchers .voucher-print-table td {
    border-color: #000 !important;
    color: #000 !important;
  }

  body:not(.printing-vouchers) .modal:not(.show) {
    display: none !important;
  }

  body:not(.printing-vouchers) .modal.show {
    display: block !important;
    position: static !important;
    inset: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body:not(.printing-vouchers) .modal,
  body:not(.printing-vouchers) .modal-dialog,
  body:not(.printing-vouchers) .modal-content,
  body:not(.printing-vouchers) .modal-body {
    position: static !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body:not(.printing-vouchers) .modal-content > :not(.modal-body),
  body:not(.printing-vouchers) .modal-body > :not(.settlement-sheet-panel) {
    display: none !important;
  }

  body:not(.printing-vouchers) .modal-header,
  body:not(.printing-vouchers) .modal-footer,
  body:not(.printing-vouchers) .vehicle-process,
  body:not(.printing-vouchers) .vehicle-snapshot,
  body:not(.printing-vouchers) .detail-grid,
  body:not(.printing-vouchers) .sheet-actions,
  body:not(.printing-vouchers) .sheet-extra {
    display: none !important;
  }

  body:not(.printing-vouchers) .settlement-sheet-panel {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 190mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body:not(.printing-vouchers) #settlementSheet {
    position: static !important;
    display: block !important;
    width: 190mm !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body:not(.printing-vouchers) .settlement-sheet-document {
    position: relative !important;
    width: 180mm !important;
    margin: 0 auto !important;
  }

  body:not(.printing-vouchers) .settlement-sheet-watermark {
    top: 48% !important;
    color: rgba(180, 35, 24, 0.12) !important;
    border-color: rgba(180, 35, 24, 0.10) !important;
    font-size: 48pt !important;
    letter-spacing: 8pt !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body:not(.printing-vouchers) .settlement-excel {
    width: 180mm !important;
    margin: 0 auto !important;
    border-color: #000 !important;
    page-break-inside: avoid;
  }

  body:not(.printing-vouchers) .settlement-excel th,
  body:not(.printing-vouchers) .settlement-excel td {
    height: 7.2mm;
    padding: 1.2mm 1.8mm;
    border-color: #000 !important;
    color: #000 !important;
    font-size: 9.5pt;
  }

  body:not(.printing-vouchers) .settlement-excel .sheet-main-title {
    height: 11mm;
    font-size: 15pt;
  }
}

/* Final sidebar correction: remove card-style nav and keep theme coherent. */
@media screen {
  html:not([data-theme="dark"]) .sidebar {
    color: #1f2933 !important;
    background: #f6f8fa !important;
    border-right: 1px solid rgba(31, 41, 51, 0.1) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html:not([data-theme="dark"]) .brand-block {
    border-bottom-color: rgba(31, 41, 51, 0.1) !important;
  }

  html:not([data-theme="dark"]) .brand-title {
    color: #111827 !important;
  }

  html:not([data-theme="dark"]) .brand-subtitle,
  html:not([data-theme="dark"]) .sidebar-footer,
  html:not([data-theme="dark"]) .api-status {
    color: #6b7280 !important;
  }

  html:not([data-theme="dark"]) .sidebar-user-card {
    border-color: rgba(31, 41, 51, 0.1) !important;
    background: rgba(255, 255, 255, 0.56) !important;
    box-shadow: none !important;
  }

  html:not([data-theme="dark"]) .sidebar-user-card span,
  html:not([data-theme="dark"]) .sidebar-user-card small {
    color: #6b7280 !important;
  }

  html:not([data-theme="dark"]) .sidebar-user-card strong {
    color: #111827 !important;
  }

  html[data-theme="dark"] .sidebar {
    color: #f5f5f7 !important;
    background: #14161a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .nav-list {
    gap: 4px !important;
    margin-top: 14px !important;
    padding-right: 0 !important;
    align-content: start !important;
    align-items: start !important;
    grid-auto-rows: max-content !important;
  }

  .nav-group {
    gap: 4px !important;
    align-content: start !important;
    align-items: start !important;
    grid-auto-rows: max-content !important;
  }

  .nav-group-body {
    gap: 3px !important;
    margin: 4px 0 6px 8px !important;
    padding-left: 8px !important;
    border-left: 1px solid rgba(120, 130, 140, 0.22) !important;
    align-content: start !important;
    align-items: start !important;
    grid-auto-rows: max-content !important;
  }

  .nav-link,
  .nav-group-toggle,
  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    min-height: 32px !important;
    padding: 6px 10px 6px 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
  }

  html:not([data-theme="dark"]) .nav-link,
  html:not([data-theme="dark"]) .nav-group-toggle {
    color: #4b5563 !important;
  }

  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    color: rgba(245, 245, 247, 0.68) !important;
  }

  .nav-link::before,
  .nav-group-toggle::before {
    content: "" !important;
    position: absolute !important;
    left: 4px !important;
    top: 8px !important;
    bottom: 8px !important;
    width: 2px !important;
    border-radius: 999px !important;
    background: transparent !important;
  }

  html:not([data-theme="dark"]) .nav-link:hover,
  html:not([data-theme="dark"]) .nav-link.active,
  html:not([data-theme="dark"]) .nav-group.active .nav-group-toggle {
    color: #111827 !important;
    background: transparent !important;
  }

  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active,
  html[data-theme="dark"] .nav-group.active .nav-group-toggle {
    color: #ffffff !important;
    background: transparent !important;
  }

  .nav-link.active::before,
  .nav-group.active .nav-group-toggle::before {
    background: #0a84ff !important;
  }

  .nav-sub-link,
  html[data-theme="dark"] .nav-sub-link {
    min-height: 28px !important;
    padding: 4px 10px 4px 16px !important;
    font-size: 12px !important;
    line-height: 20px !important;
  }
}

/* Product Design sidebar v2: dense, elegant, non-card navigation. */
@media screen {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr) !important;
  }

  .sidebar {
    padding: 14px 12px !important;
    overflow: hidden !important;
  }

  html:not([data-theme="dark"]) .sidebar {
    background: linear-gradient(180deg, #f8fafc 0%, #f2f5f8 100%) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.1) !important;
  }

  html[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #17191e 0%, #111318 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .brand-block {
    gap: 9px !important;
    padding: 2px 4px 13px !important;
  }

  .brand-mark {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
  }

  .brand-title {
    font-size: 12.8px !important;
    line-height: 1.25 !important;
  }

  .brand-subtitle {
    font-size: 11px !important;
  }

  .sidebar-user-card {
    display: grid !important;
    gap: 2px !important;
    margin: 11px 2px 10px !important;
    padding: 8px 10px !important;
    border-radius: 9px !important;
  }

  .sidebar-user-card span,
  .sidebar-user-card small {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  .sidebar-user-card strong {
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    align-items: stretch !important;
    align-content: normal !important;
    justify-content: flex-start !important;
    margin-top: 8px !important;
    padding: 0 2px 10px 0 !important;
    overflow-y: auto !important;
  }

  .nav-group,
  .nav-group-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    grid-auto-rows: unset !important;
  }

  .nav-group {
    gap: 2px !important;
  }

  .nav-group-body {
    gap: 2px !important;
    margin: 3px 0 4px 11px !important;
    padding-left: 7px !important;
    border-left: 1px solid rgba(100, 116, 139, 0.22) !important;
  }

  .nav-group.collapsed .nav-group-body {
    display: none !important;
  }

  .nav-link,
  .nav-group-toggle,
  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    display: flex !important;
    align-items: center !important;
    min-height: 52px !important;
    height: 52px !important;
    width: 100% !important;
    padding: 0 9px 0 15px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
    font-size: 16px !important;
    font-weight: 720 !important;
    line-height: 52px !important;
  }

  .nav-group-toggle {
    justify-content: space-between !important;
  }

  html:not([data-theme="dark"]) .nav-link,
  html:not([data-theme="dark"]) .nav-group-toggle {
    color: #526071 !important;
  }

  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    color: rgba(245, 245, 247, 0.7) !important;
  }

  .nav-link::before,
  .nav-group-toggle::before {
    left: 5px !important;
    top: 9px !important;
    bottom: 9px !important;
    width: 2px !important;
  }

  html:not([data-theme="dark"]) .nav-link:hover,
  html:not([data-theme="dark"]) .nav-link.active,
  html:not([data-theme="dark"]) .nav-group.active .nav-group-toggle {
    color: #0f172a !important;
    background: rgba(10, 132, 255, 0.08) !important;
  }

  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active,
  html[data-theme="dark"] .nav-group.active .nav-group-toggle {
    color: #ffffff !important;
    background: rgba(10, 132, 255, 0.16) !important;
  }

  .nav-link.active::before,
  .nav-group.active .nav-group-toggle::before {
    background: #0a84ff !important;
  }

  .nav-sub-link,
  html[data-theme="dark"] .nav-sub-link {
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 8px 0 14px !important;
    font-size: 11.5px !important;
    line-height: 46px !important;
    border-radius: 6px !important;
  }

  .nav-group-caret {
    margin-left: auto !important;
    font-size: 12px !important;
    opacity: 0.72 !important;
  }

  .sidebar-footer {
    padding: 9px 4px 0 !important;
  }
}

@media screen and (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }
}

/* Unified UI pass 2026-06-07: consolidate patched visual layers into one stable surface. */
@media screen {
  :root {
    --ui-bg: #f5f7fa;
    --ui-panel: #ffffff;
    --ui-panel-soft: #f9fafb;
    --ui-text: #17212b;
    --ui-muted: #667085;
    --ui-line: rgba(15, 23, 42, 0.12);
    --ui-brand: #0a84ff;
    --ui-brand-soft: rgba(10, 132, 255, 0.10);
    --ui-danger: #d92d20;
    --ui-success: #16834a;
    --ui-warning: #b76e00;
    --ui-radius: 8px;
    --ui-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
  }

  html[data-theme="dark"] {
    --ui-bg: #111318;
    --ui-panel: #1c1f26;
    --ui-panel-soft: #232731;
    --ui-text: #f5f7fb;
    --ui-muted: #a9b0bc;
    --ui-line: rgba(255, 255, 255, 0.12);
    --ui-brand: #5eb1ff;
    --ui-brand-soft: rgba(94, 177, 255, 0.16);
    --ui-danger: #ff6259;
    --ui-success: #59d783;
    --ui-warning: #ffd08a;
    --ui-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  }

  body {
    color: var(--ui-text);
    background: var(--ui-bg);
    font-size: 14px;
    line-height: 1.45;
  }

  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr) !important;
  }

  .sidebar {
    padding: 14px 12px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f2f5f8 100%) !important;
    border-right: 1px solid var(--ui-line) !important;
    color: var(--ui-text) !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  html[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #17191f 0%, #101218 100%) !important;
    color: var(--ui-text) !important;
  }

  .brand-block {
    gap: 10px !important;
    padding: 2px 4px 12px !important;
    border-bottom-color: var(--ui-line) !important;
  }

  .brand-mark {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #0a84ff, #45c7ff) !important;
    font-size: 13px !important;
    box-shadow: none !important;
  }

  .brand-title,
  html[data-theme="dark"] .brand-title {
    color: var(--ui-text) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  .brand-subtitle,
  .sidebar-footer,
  .api-status,
  html[data-theme="dark"] .brand-subtitle,
  html[data-theme="dark"] .sidebar-footer,
  html[data-theme="dark"] .api-status {
    color: var(--ui-muted) !important;
  }

  .sidebar-user-card {
    margin: 10px 2px 10px !important;
    padding: 8px 10px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: rgba(255, 255, 255, 0.58) !important;
    box-shadow: none !important;
  }

  html[data-theme="dark"] .sidebar-user-card {
    background: rgba(255, 255, 255, 0.055) !important;
  }

  .sidebar-user-card span,
  .sidebar-user-card small {
    color: var(--ui-muted) !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  .sidebar-user-card strong {
    color: var(--ui-text) !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .nav-list,
  .nav-group,
  .nav-group-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    align-content: normal !important;
    grid-auto-rows: unset !important;
  }

  .nav-list {
    gap: 2px !important;
    margin-top: 8px !important;
    padding: 0 2px 10px 0 !important;
    overflow-y: auto !important;
  }

  .nav-group {
    gap: 2px !important;
  }

  .nav-group-body {
    gap: 1px !important;
    margin: 3px 0 5px 12px !important;
    padding-left: 8px !important;
    border-left: 1px solid var(--ui-line) !important;
  }

  .nav-group.collapsed .nav-group-body {
    display: none !important;
  }

  .nav-link,
  .nav-group-toggle,
  html[data-theme="dark"] .nav-link,
  html[data-theme="dark"] .nav-group-toggle {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 35px !important;
    height: 35px !important;
    padding: 0 10px 0 16px !important;
    border: 0 !important;
    border-radius: 7px !important;
    color: var(--ui-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 720 !important;
    line-height: 35px !important;
  }

  .nav-group-toggle {
    justify-content: space-between !important;
  }

  .nav-link::before,
  .nav-group-toggle::before {
    content: "" !important;
    position: absolute !important;
    left: 5px !important;
    top: 9px !important;
    bottom: 9px !important;
    width: 2px !important;
    border-radius: 999px !important;
    background: transparent !important;
  }

  .nav-link:hover,
  .nav-link.active,
  .nav-group.active .nav-group-toggle,
  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link.active,
  html[data-theme="dark"] .nav-group.active .nav-group-toggle {
    color: var(--ui-text) !important;
    background: var(--ui-brand-soft) !important;
  }

  .nav-link.active::before,
  .nav-group.active .nav-group-toggle::before {
    background: var(--ui-brand) !important;
  }

  .nav-sub-link,
  html[data-theme="dark"] .nav-sub-link {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 8px 0 14px !important;
    font-size: 12px !important;
    line-height: 30px !important;
    border-radius: 6px !important;
  }

  .nav-group-caret {
    margin-left: auto !important;
    font-size: 12px !important;
    opacity: 0.72 !important;
  }

  .main {
    min-width: 0;
    padding: 20px !important;
    background: var(--ui-bg) !important;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 16px !important;
  }

  .topbar h1 {
    color: var(--ui-text) !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.2;
  }

  .topbar p,
  .section-head p,
  .muted-note,
  .kpi span,
  .data-table th,
  label {
    color: var(--ui-muted) !important;
  }

  .form-panel,
  .chart-panel,
  .table-wrap,
  .task-lane,
  .message-center,
  .kpi,
  .task-card,
  .summary-chip,
  .sort-group,
  .ledger-performance-title,
  .report-summary-card,
  .monthly-profit-panel,
  .monthly-profit-card,
  .salary-panel,
  .salary-record-card,
  .expense-panel,
  .contract-card,
  .invoice-card,
  .bank-flow-card,
  .bank-receipt-card,
  .voucher-package,
  .settings-card,
  .bank-rule-grid div,
  .settings-avatar-preview,
  .modal-content {
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: var(--ui-panel) !important;
    box-shadow: var(--ui-shadow) !important;
  }

  .kpi {
    padding: 14px !important;
  }

  .dashboard-kpis {
    gap: 10px;
    margin-bottom: 16px;
  }

  .dashboard-kpis .kpi {
    min-height: 78px;
  }

  .kpi strong {
    color: var(--ui-text) !important;
    font-size: 22px;
    font-weight: 850;
    line-height: 1.15;
  }

  .form-control,
  .form-select {
    min-height: 36px;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    color: var(--ui-text) !important;
    background-color: var(--ui-panel) !important;
    box-shadow: none !important;
    font-size: 13px;
  }

  .form-control:focus,
  .form-select:focus {
    border-color: var(--ui-brand) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-brand) 18%, transparent) !important;
  }

  .btn {
    min-height: 36px;
    border-radius: var(--ui-radius) !important;
    font-size: 13px;
    font-weight: 760;
    box-shadow: none !important;
  }

  .btn-sm {
    min-height: 30px;
    font-size: 12px;
  }

  .btn-dark,
  .btn-success {
    color: #fff !important;
    border-color: var(--ui-brand) !important;
    background: var(--ui-brand) !important;
  }

  .btn-outline-dark,
  .btn-outline-secondary {
    color: var(--ui-text) !important;
    border-color: var(--ui-line) !important;
    background: var(--ui-panel) !important;
  }

  .btn-outline-dark:hover,
  .btn-outline-secondary:hover {
    color: var(--ui-text) !important;
    border-color: var(--ui-brand) !important;
    background: var(--ui-brand-soft) !important;
  }

  .ledger-business-quick.active,
  html[data-theme="dark"] .ledger-business-quick.active {
    color: #fff !important;
    border-color: var(--ui-brand) !important;
    background: var(--ui-brand) !important;
  }

  #invoicePanel,
  #contractPanel,
  #flowPanel,
  html[data-theme="dark"] #invoicePanel,
  html[data-theme="dark"] #contractPanel,
  html[data-theme="dark"] #flowPanel {
    color: var(--ui-text) !important;
  }

  .invoice-disabled,
  .invoice-history-row,
  .invoice-form-panel,
  .contract-hint,
  .contract-esign-note,
  .contract-record-detail,
  .contract-form-panel,
  .flow-submodule,
  .flow-entry-panel,
  .flow-balance-card,
  .flow-empty,
  .flow-history table,
  html[data-theme="dark"] .invoice-disabled,
  html[data-theme="dark"] .invoice-history-row,
  html[data-theme="dark"] .invoice-form-panel,
  html[data-theme="dark"] .contract-hint,
  html[data-theme="dark"] .contract-esign-note,
  html[data-theme="dark"] .contract-record-detail,
  html[data-theme="dark"] .contract-form-panel,
  html[data-theme="dark"] .flow-submodule,
  html[data-theme="dark"] .flow-entry-panel,
  html[data-theme="dark"] .flow-balance-card,
  html[data-theme="dark"] .flow-empty,
  html[data-theme="dark"] .flow-history table {
    color: var(--ui-text) !important;
    border-color: var(--ui-line) !important;
    background: var(--ui-panel-soft) !important;
  }

  .invoice-card.recorded,
  .contract-card.recorded,
  html[data-theme="dark"] .invoice-card.recorded,
  html[data-theme="dark"] .contract-card.recorded {
    border-color: color-mix(in srgb, var(--ui-success) 36%, var(--ui-line)) !important;
    background: color-mix(in srgb, var(--ui-success) 10%, var(--ui-panel)) !important;
  }

  .invoice-card h4,
  .invoice-disabled strong,
  .invoice-history-row strong,
  .contract-card h4,
  .contract-hint strong,
  .contract-record-main strong,
  .contract-record-detail strong,
  .flow-subhead strong,
  .flow-balance-card strong,
  html[data-theme="dark"] .invoice-card h4,
  html[data-theme="dark"] .invoice-disabled strong,
  html[data-theme="dark"] .invoice-history-row strong,
  html[data-theme="dark"] .contract-card h4,
  html[data-theme="dark"] .contract-hint strong,
  html[data-theme="dark"] .contract-record-main strong,
  html[data-theme="dark"] .contract-record-detail strong,
  html[data-theme="dark"] .flow-subhead strong,
  html[data-theme="dark"] .flow-balance-card strong {
    color: var(--ui-text) !important;
  }

  .invoice-disabled span,
  .invoice-history-row span,
  .invoice-history-row small,
  .contract-hint,
  .contract-esign-note,
  .contract-record-main span,
  .contract-record-detail span,
  .contract-muted,
  .flow-subhead span,
  .flow-balance-card span,
  .flow-empty,
  html[data-theme="dark"] .invoice-disabled span,
  html[data-theme="dark"] .invoice-history-row span,
  html[data-theme="dark"] .invoice-history-row small,
  html[data-theme="dark"] .contract-hint,
  html[data-theme="dark"] .contract-esign-note,
  html[data-theme="dark"] .contract-record-main span,
  html[data-theme="dark"] .contract-record-detail span,
  html[data-theme="dark"] .contract-muted,
  html[data-theme="dark"] .flow-subhead span,
  html[data-theme="dark"] .flow-balance-card span,
  html[data-theme="dark"] .flow-empty {
    color: var(--ui-muted) !important;
  }

  .contract-record-box.ok,
  html[data-theme="dark"] .contract-record-box.ok {
    border-color: color-mix(in srgb, var(--ui-success) 32%, var(--ui-line)) !important;
    background: color-mix(in srgb, var(--ui-success) 12%, transparent) !important;
  }

  .contract-record-box.missing,
  html[data-theme="dark"] .contract-record-box.missing {
    border-color: color-mix(in srgb, var(--ui-danger) 30%, var(--ui-line)) !important;
    background: color-mix(in srgb, var(--ui-danger) 10%, transparent) !important;
  }

  .flow-history th,
  .flow-history td,
  html[data-theme="dark"] .flow-history th,
  html[data-theme="dark"] .flow-history td {
    color: var(--ui-text) !important;
    border-bottom-color: var(--ui-line) !important;
    background: transparent !important;
  }

  .table-wrap {
    overflow: auto;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ui-line) !important;
  }

  .data-table th {
    background: var(--ui-panel-soft) !important;
    font-size: 12px;
    font-weight: 800;
  }

  .data-table td {
    color: var(--ui-text) !important;
    font-size: 13px;
  }

  .data-table tbody tr:hover td {
    background: var(--ui-brand-soft) !important;
  }

  .status-pill,
  .badge-soft,
  .inventory-days,
  .next-step,
  .message-type,
  .finance-risk-item,
  .filter-check {
    border-radius: 999px !important;
  }

  .summary-chip,
  html[data-theme="dark"] .summary-chip {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .summary-chip strong,
  .summary-chip.settlement-chip strong,
  html[data-theme="dark"] .summary-chip strong,
  html[data-theme="dark"] .summary-chip.settlement-chip strong {
    font-size: 14px !important;
    line-height: 1 !important;
  }

  .danger-text,
  .text-danger,
  .invoice-alert,
  .business-anomaly-badge {
    color: var(--ui-danger) !important;
  }

  #workflowSteps,
  .finance-close-board {
    display: none !important;
  }
}

@media screen and (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }

  .nav-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Dark mode hardening 2026-06-07: catch remaining light-only islands. */
html[data-theme="dark"] .message-center:not(.collapsed) {
  color: var(--ui-text) !important;
  border-color: color-mix(in srgb, var(--ui-accent) 34%, var(--ui-line)) !important;
  border-left-color: var(--ui-accent) !important;
  background: color-mix(in srgb, var(--ui-accent) 10%, var(--ui-panel)) !important;
  box-shadow: var(--ui-shadow) !important;
}

html[data-theme="dark"] .message-icon-button,
html[data-theme="dark"] .message-item,
html[data-theme="dark"] .message-item.read,
html[data-theme="dark"] .message-date-card,
html[data-theme="dark"] .message-history-list,
html[data-theme="dark"] .message-alert-list,
html[data-theme="dark"] .message-history-layout,
html[data-theme="dark"] .message-history-title,
html[data-theme="dark"] .message-manager-toolbar,
html[data-theme="dark"] .message-empty {
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
  background: var(--ui-panel-soft) !important;
}

html[data-theme="dark"] .message-icon-button {
  color: color-mix(in srgb, var(--ui-accent) 76%, #fff) !important;
  border-color: color-mix(in srgb, var(--ui-accent) 34%, var(--ui-line)) !important;
  background: color-mix(in srgb, var(--ui-accent) 10%, var(--ui-panel)) !important;
}

html[data-theme="dark"] .message-item.read {
  opacity: 0.82;
}

html[data-theme="dark"] .message-center-head span,
html[data-theme="dark"] .message-group-title,
html[data-theme="dark"] .message-history summary {
  color: color-mix(in srgb, var(--ui-accent) 72%, #fff) !important;
}

html[data-theme="dark"] .message-center-head strong,
html[data-theme="dark"] .message-main strong,
html[data-theme="dark"] .message-detail-cell span,
html[data-theme="dark"] .message-date-card strong,
html[data-theme="dark"] .message-history-title strong {
  color: var(--ui-text) !important;
}

html[data-theme="dark"] .message-main span,
html[data-theme="dark"] .message-main small,
html[data-theme="dark"] .message-actions label,
html[data-theme="dark"] .message-detail-cell b,
html[data-theme="dark"] .message-date-card span,
html[data-theme="dark"] .message-date-card small,
html[data-theme="dark"] .message-empty {
  color: var(--ui-muted) !important;
}

html[data-theme="dark"] .message-detail-cell span {
  background: transparent !important;
}

html[data-theme="dark"] .message-date-card:hover,
html[data-theme="dark"] .message-date-card.active {
  color: var(--ui-text) !important;
  border-color: var(--ui-brand) !important;
  background: var(--ui-brand-soft) !important;
}

html[data-theme="dark"] .message-group-title strong,
html[data-theme="dark"] .message-icon-button strong {
  color: #fff !important;
  background: var(--ui-accent) !important;
}

html[data-theme="dark"] .message-type {
  color: #fff !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .message-type.purchase {
  background: var(--ui-success) !important;
}

html[data-theme="dark"] .message-type.sold,
html[data-theme="dark"] .message-type.sold_pending_sale,
html[data-theme="dark"] .message-type.sold_unmatched {
  background: var(--ui-danger) !important;
}

html[data-theme="dark"] .message-type.missing,
html[data-theme="dark"] .message-type.onselling_missing {
  background: var(--ui-accent) !important;
}

html[data-theme="dark"] .message-type.system {
  background: #6b7280 !important;
}

html[data-theme="dark"] .finance-risk-item,
html[data-theme="dark"] .finance-risk-item.danger,
html[data-theme="dark"] .workflow,
html[data-theme="dark"] .flow-step,
html[data-theme="dark"] .tax-panel,
html[data-theme="dark"] .tax-filter,
html[data-theme="dark"] .report-metric-panel,
html[data-theme="dark"] .report-metric-option,
html[data-theme="dark"] .bank-center-tab,
html[data-theme="dark"] .bank-account-tab,
html[data-theme="dark"] .bank-flow-row,
html[data-theme="dark"] .bank-match-box,
html[data-theme="dark"] .bank-candidate-card,
html[data-theme="dark"] .bank-operation-panel,
html[data-theme="dark"] .voucher-rule-panel,
html[data-theme="dark"] .voucher-package-panel,
html[data-theme="dark"] .voucher-card,
html[data-theme="dark"] .voucher-package,
html[data-theme="dark"] .reimbursement-card,
html[data-theme="dark"] .expense-calculation-toolbar,
html[data-theme="dark"] .expense-calculation-panel,
html[data-theme="dark"] .expense-check-status,
html[data-theme="dark"] .salary-record-card,
html[data-theme="dark"] .employee-panel,
html[data-theme="dark"] .employee-card,
html[data-theme="dark"] .settings-admin-tab-panel,
html[data-theme="dark"] .settings-admin-tab,
html[data-theme="dark"] .settings-account-row,
html[data-theme="dark"] .invoice-import-row,
html[data-theme="dark"] .invoice-type-child-tabs,
html[data-theme="dark"] .invoice-type-group-tabs,
html[data-theme="dark"] .historical-report-panel,
html[data-theme="dark"] .historical-report-card,
html[data-theme="dark"] .monthly-profit-item,
html[data-theme="dark"] .monthly-profit-total,
html[data-theme="dark"] .settlement-lock-notice,
html[data-theme="dark"] .settlement-edit-confirm,
html[data-theme="dark"] .vehicle-header-card,
html[data-theme="dark"] .vehicle-snapshot div,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .toast-card {
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
  background: var(--ui-panel-soft) !important;
}

html[data-theme="dark"] .finance-risk-item span,
html[data-theme="dark"] .flow-step small,
html[data-theme="dark"] .tax-filter span,
html[data-theme="dark"] .report-metric-option span,
html[data-theme="dark"] .bank-match-box span,
html[data-theme="dark"] .bank-candidate-card span,
html[data-theme="dark"] .voucher-card span,
html[data-theme="dark"] .reimbursement-card span,
html[data-theme="dark"] .employee-card span,
html[data-theme="dark"] .vehicle-snapshot span,
html[data-theme="dark"] .detail-card span,
html[data-theme="dark"] .report-summary-lines span,
html[data-theme="dark"] .report-summary-list li {
  color: var(--ui-muted) !important;
}

html[data-theme="dark"] .finance-risk-item.danger,
html[data-theme="dark"] .invoice-alert,
html[data-theme="dark"] .business-anomaly-badge,
html[data-theme="dark"] .voucher-receipt-missing {
  color: var(--ui-danger) !important;
  border-color: color-mix(in srgb, var(--ui-danger) 34%, var(--ui-line)) !important;
  background: color-mix(in srgb, var(--ui-danger) 12%, transparent) !important;
}

html[data-theme="dark"] .next-step {
  color: color-mix(in srgb, var(--ui-accent) 72%, #fff) !important;
  background: color-mix(in srgb, var(--ui-accent) 16%, transparent) !important;
}

html[data-theme="dark"] .next-step.danger {
  color: #fff !important;
  background: var(--ui-danger) !important;
}

html[data-theme="dark"] .badge-soft,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .inventory-days {
  border-color: transparent !important;
}

html[data-theme="dark"] .badge-soft:not(.success):not(.warning):not(.danger),
html[data-theme="dark"] .status-pill:not(.done):not(.warning):not(.danger),
html[data-theme="dark"] .inventory-days:not(.fresh):not(.warning):not(.danger):not(.critical) {
  color: var(--ui-text) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

html[data-theme="dark"] .app-toast {
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
  background: rgba(28, 31, 38, 0.94) !important;
}
