:root {
  --bg: #eeeeec;
  --surface: #ffffff;
  --surface-soft: #f6f6f5;
  --ink: #15171a;
  --muted: #74777d;
  --line: #e4e4e2;
  --brand: #1f7a6d;
  --brand-dark: #145c52;
  --blue: #2d6cdf;
  --amber: #bc7a18;
  --red: #c64747;
  --green: #2f8f5b;
  --sidebar: #ffffff;
  --sidebar-soft: #171c21;
  --shadow: 0 16px 38px rgba(30, 34, 38, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100dvh;
  overflow-y: scroll;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100dvh;
  overflow: visible;
  padding: 30px 22px 24px;
  color: var(--ink);
  background: var(--sidebar);
  border-right: 0;
  border-radius: 0;
  box-shadow: 10px 0 30px rgba(30, 34, 38, 0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 0 2px 18px;
  border-bottom: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: #171c21;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(23, 28, 33, 0.16);
}

.brand strong,
.tenant-card strong {
  display: block;
}

.brand span,
.tenant-card small {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 10px;
  margin-top: 10px;
  min-height: 0;
  overflow: visible;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  color: #6b6f76;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.nav-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #15171a;
  background: #f0f0ef;
  font-size: 13px;
  font-weight: 900;
}

.nav-icon::before,
.tab-icon::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  box-sizing: border-box;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}

.nav-icon-dashboard::before {
  border-radius: 3px;
  clip-path: polygon(50% 0, 100% 42%, 100% 100%, 62% 100%, 62% 66%, 38% 66%, 38% 100%, 0 100%, 0 42%);
  background: currentColor;
}

.nav-icon-search::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 6px 6px 0 -4px currentColor;
}

.nav-icon-user::before,
.nav-icon-team::before {
  border-radius: 50% 50% 4px 4px;
  clip-path: polygon(20% 0, 80% 0, 80% 44%, 100% 44%, 100% 100%, 0 100%, 0 44%, 20% 44%);
}

.nav-icon-team::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -7px 0 0 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.nav-icon-file::before,
.nav-icon-audit::before,
.nav-icon-import::before {
  border-radius: 2px;
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}

.nav-icon-check::before {
  width: 16px;
  height: 9px;
  border-top: 0;
  border-right: 0;
  border-radius: 0;
  transform: rotate(-45deg);
}

.nav-icon-wallet::before {
  border-radius: 3px;
  box-shadow: inset 5px 0 0 -3px currentColor;
}

.nav-icon-bell::before {
  border-bottom: 0;
  border-radius: 9px 9px 3px 3px;
}

.nav-icon-database::before {
  border-radius: 50% / 24%;
  box-shadow: inset 0 5px 0 -3px currentColor, inset 0 -5px 0 -3px currentColor;
}

.nav-icon-appstore::before {
  border-radius: 2px;
  box-shadow: inset 7px 0 0 -5px currentColor, inset 0 7px 0 -5px currentColor;
}

.nav-icon-setting::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 -5px 0 -4px currentColor, 0 5px 0 -4px currentColor, 5px 0 0 -4px currentColor, -5px 0 0 -4px currentColor;
}

.nav-icon-monitor::before {
  border-radius: 2px;
  box-shadow: 0 6px 0 -5px currentColor;
}

.nav-icon-warning::before {
  border-radius: 2px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: currentColor;
}

.nav-icon-shop::before {
  border-radius: 2px;
  clip-path: polygon(0 28%, 100% 28%, 86% 0, 14% 0, 0 28%, 0 100%, 100% 100%, 100% 28%);
}

.nav-icon-star::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 80% 94%, 50% 70%, 20% 94%, 31% 56%, 0 35%, 38% 35%);
}

.nav-icon-product::before {
  border-radius: 3px;
  transform: rotate(45deg);
}

.nav-icon-inbox::before {
  border-radius: 3px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 68% 72%, 62% 100%, 38% 100%, 32% 72%, 0 72%);
}

.nav-icon-swap::before {
  height: 10px;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: 5px -4px 0 -3px currentColor, -5px 4px 0 -3px currentColor;
}

.nav-icon-schedule::before {
  border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 100%, 50% 50%, 0 50%);
}

.nav-icon-dot::before {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}

.nav-item.active .nav-icon {
  color: #171c21;
  background: #fff;
}

.nav-item:hover {
  color: #15171a;
  background: #f2f2f1;
}

.nav-item.active {
  color: #ffffff;
  background: var(--sidebar-soft);
  box-shadow: 0 14px 28px rgba(23, 28, 33, 0.18);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 8px solid #15171a;
  transform: translateY(-50%);
}

.nav-item.nav-parent {
  cursor: pointer;
}

.nav-item.nav-parent:hover {
  color: #494949;
  background: transparent;
}

.nav-item.nav-parent.active:hover {
  color: #ffffff;
  background: var(--sidebar-soft);
}

.nav-trailing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-caret {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: currentColor;
  font-size: 14px;
  font-weight: 900;
}

.nav-item.nav-child {
  min-height: 38px;
  margin-left: 16px;
  width: calc(100% - 16px);
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
}

.nav-item.nav-child .nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 11px;
}

.nav-item.nav-child.active {
  color: #202020;
  background: #eeeeed;
  box-shadow: none;
}

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

.nav-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #202020;
  background: #e8e8e7;
  font-size: 12px;
  text-align: center;
}

.tenant-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 18px 16px;
  border: 0;
  border-radius: 22px;
  background: #f4f4f3;
  box-shadow: none;
}

.tenant-card .status-dot {
  display: none;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #70d6bd;
}

@media (max-height: 820px) and (min-width: 1041px) {
  .sidebar {
    gap: 10px;
    padding: 18px 16px 14px;
  }

  .brand {
    padding-bottom: 14px;
  }

  .nav-list {
    gap: 5px;
  }

  .nav-item {
    min-height: 39px;
    padding: 7px 12px;
  }

  .tenant-card {
    padding: 12px;
  }
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
  background: var(--bg);
  padding: 34px 38px 38px;
  border-radius: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: -8px 0 22px;
  padding: 8px 0 12px;
  background: rgba(238, 238, 236, 0.92);
  backdrop-filter: blur(14px);
}

.desktop-head {
  display: grid;
  gap: 22px;
  min-width: 260px;
}

.desktop-head > div {
  display: none;
}

.desktop-search {
  position: relative;
  width: min(340px, 42vw);
  z-index: 20;
}

.desktop-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.desktop-search input {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #e7e7e5;
  padding: 10px 42px 10px 20px;
  color: #42464b;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.desktop-search::after {
  content: "⌕";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #737373;
  font-size: 12px;
  font-weight: 800;
}

.topbar-search-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 260px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(30, 34, 38, 0.14);
}

.topbar-search-menu button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.topbar-search-menu button:hover {
  background: #f1f1ef;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: 24px;
}

h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.toolbar,
.quick-actions,
.button-row,
.tabs,
.chip-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar {
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  justify-self: end;
  padding: 0;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #2c2c2c;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(30, 34, 38, 0.07);
}

.user-chip {
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 128px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(30, 34, 38, 0.14);
}

.account-menu button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.account-menu button:hover {
  background: #f1f1ef;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #202020;
  font-weight: 900;
}

.user-chip strong,
.user-chip small {
  display: block;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
}

.device-switch {
  display: inline-flex;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: #e7e7e5;
}

.device-option {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  padding: 5px 10px;
  font-weight: 800;
}

.device-option.active {
  color: #fff;
  background: #171c21;
  box-shadow: 0 8px 18px rgba(32, 32, 32, 0.12);
}

.field {
  display: grid;
  gap: 6px;
}

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

.field.compact {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.filter-actions {
  display: flex;
  align-items: end;
}

.finance-filter {
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(130px, 1fr)) auto;
}

.order-list-filter {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
}

.task-list-filter {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
}

.price-filter {
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 1fr)) auto;
}

.warehouse-filter {
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(180px, 1.4fr) auto;
}

.branch-monitor-filter {
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 1fr)) auto;
}

.finance-center {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.finance-subnav {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: calc(100dvh - 330px);
  min-height: 560px;
  overflow: auto;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.finance-subnav strong {
  padding: 4px 10px 8px;
  color: var(--muted);
  font-size: 12px;
}

.finance-subnav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: #21415f;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.finance-subnav button em {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #52606d;
  background: #eef1f3;
  font-size: 12px;
  font-style: normal;
}

.finance-subnav button.active,
.finance-subnav button:hover {
  color: #15171a;
  background: #f0f0ef;
}

.finance-subnav button.active em {
  color: #fff;
  background: #171c21;
}

.finance-main {
  min-width: 0;
}

.finance-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.55fr);
  gap: 16px;
  align-items: start;
}

.finance-source,
.finance-confirm,
.finance-generic,
.finance-card,
.finance-block {
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.finance-source,
.finance-confirm,
.finance-generic {
  padding: 14px;
}

.finance-source {
  display: grid;
  gap: 12px;
}

.finance-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.finance-card > h3 {
  margin: 0;
}

.finance-block {
  padding: 12px;
}

.finance-block .button-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

.finance-doc-table {
  min-height: 190px;
}

.selected-row td {
  background: #f2f8ff;
}

.finance-form-grid {
  gap: 12px;
}

.finance-plan {
  display: grid;
  gap: 16px;
}

.finance-plan-metrics .metric {
  min-height: 120px;
}

.finance-module-brief,
.finance-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.finance-module-brief .info,
.finance-status-strip .info {
  min-height: 88px;
  border: 1px solid var(--line);
  background: #fafafa;
  box-shadow: none;
}

.finance-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f6f7f8;
}

.finance-flow-node {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-flow-node span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #171c21;
  font-size: 12px;
  font-weight: 900;
}

.finance-flow-node strong {
  font-size: 13px;
}

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

.finance-workbench {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-workbench .panel-header {
  margin-bottom: 0;
}

.finance-workbench table th:nth-child(5),
.finance-workbench table td:nth-child(5) {
  min-width: 112px;
}

.finance-workbench table th:nth-child(2),
.finance-workbench table td:nth-child(2),
.finance-workbench table th:nth-child(3),
.finance-workbench table td:nth-child(3) {
  min-width: 160px;
  white-space: normal;
}

.finance-workbench .table-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.finance-plan-section {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finance-plan-section h3 {
  margin: 0 0 4px;
}

.finance-plan-section span {
  color: var(--muted);
  font-size: 12px;
}

.finance-plan-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.finance-plan-section li {
  color: #26313b;
  line-height: 1.55;
}

.approval-panel {
  padding: 20px;
  overflow: visible;
  border-radius: 20px;
}

.approval-shell {
  display: block;
  min-height: 0;
}

.approval-status-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: #efefed;
  width: fit-content;
  max-width: 100%;
}

.approval-status-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.approval-status-tabs em {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #6b6f76;
  background: #fff;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.approval-status-tabs .tab.active em {
  color: #171c21;
}

.approval-main {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.approval-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.approval-search {
  width: min(280px, 36vw);
}

.approval-template-board,
.approval-list-panel {
  display: grid;
  gap: 18px;
}

.approval-group h3 {
  margin-bottom: 10px;
  color: var(--muted);
}

.approval-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.approval-template-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 84px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  padding: 14px;
  text-align: left;
  box-shadow: var(--shadow);
}

.approval-template-card:hover {
  background: #f7f7f6;
}

.approval-template-card strong,
.approval-template-card small {
  display: block;
}

.approval-template-card small {
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.approval-icon.假勤 {
  background: #2d9cdb;
}

.approval-icon.财务 {
  background: #d79a11;
}

.approval-icon.行政 {
  background: #1f9f8b;
}

.approval-icon.人事 {
  background: #2f8fdb;
}

.approval-list-panel .table-wrap {
  box-shadow: var(--shadow);
}

.approval-field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
}

.approval-field-tags span,
.approval-field-tags em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #4b5563;
  background: #f1f5f9;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.approval-form {
  display: grid;
  gap: 18px;
}

.approval-form-title {
  margin: -4px 0 2px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.approval-form-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.approval-form-row > label {
  padding-top: 9px;
  color: var(--ink);
  font-weight: 800;
}

.approval-form-row.required > label::before {
  content: "*";
  margin-right: 3px;
  color: var(--red);
}

.approval-form-row input,
.approval-form-row select,
.approval-form-row textarea {
  width: 100%;
  min-height: 44px;
}

.approval-form-row textarea {
  min-height: 108px;
}

.approval-form-card,
.approval-flow-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.approval-form-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -16px -16px 4px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.approval-form-card-head strong {
  font-size: 16px;
}

.approval-add-detail {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-weight: 900;
}

.approval-total {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--line);
}

.approval-total span {
  font-weight: 900;
}

.approval-total strong {
  font-size: 18px;
}

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

.approval-system-form input:disabled,
.approval-system-form select:disabled,
.approval-system-form textarea:disabled,
.approval-system-form button:disabled {
  cursor: default;
  opacity: 1;
  color: #7b8794;
  background: #fff;
}

.approval-expense-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.approval-expense-card .approval-form-row {
  padding: 0 16px;
}

.approval-expense-card .approval-form-row:last-child {
  padding-bottom: 16px;
}

.approval-expense-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}

.approval-expense-head strong {
  font-size: 16px;
}

.text-btn {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 900;
}

.approval-flow-preview {
  display: grid;
  gap: 0;
}

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

.approval-bound-template span {
  color: var(--muted);
  font-size: 12px;
}

.approval-node-flow {
  display: grid;
  gap: 10px;
}

.approval-node {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.approval-node::before {
  content: "";
  position: absolute;
  left: 26px;
  top: -11px;
  width: 2px;
  height: 10px;
  background: #d8dee6;
}

.approval-node:first-child::before {
  display: none;
}

.approval-node > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.approval-node.start > span {
  background: #202020;
}

.approval-node strong,
.approval-node small {
  display: block;
}

.approval-node small {
  color: var(--muted);
}

.approval-node select {
  width: min(260px, 100%);
  margin-top: 6px;
}

.approval-node-edit {
  display: grid;
  grid-template-columns: minmax(96px, 120px) minmax(220px, 1fr) minmax(116px, 132px) auto;
  gap: 8px;
  align-items: center;
}

.approval-node-edit select {
  width: 100%;
  margin-top: 0;
}

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

.approval-person-picker,
.approval-person-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font: inherit;
  text-align: left;
}

.approval-person-picker strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-person-picker span {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.approval-org-picker {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 31, 43, 0.28);
}

.approval-org-dialog {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 1fr);
  width: min(920px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 96px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(16, 34, 48, 0.28);
}

.approval-org-left {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 24px;
  background: #f7f8fa;
}

.approval-org-search {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.approval-org-search span {
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.approval-org-search input {
  border: 0;
  background: transparent;
  font-size: 16px;
}

.approval-org-company,
.approval-org-person,
.approval-org-dept > button {
  display: flex;
  align-items: center;
  gap: 12px;
}

.approval-org-company span,
.approval-org-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.approval-org-tree {
  overflow: auto;
}

.approval-org-dept {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.approval-org-dept > button {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
}

.approval-org-dept > button.active {
  color: #fff;
  background: var(--blue);
}

.approval-org-person {
  width: 100%;
  min-height: 48px;
  padding: 7px 10px 7px 32px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
}

.approval-org-person.selected,
.approval-org-person:hover {
  background: #eaf3ff;
}

.approval-org-check {
  width: 18px;
  height: 18px;
  border: 1px solid #9aa3ad;
  border-radius: 4px;
  background: #fff;
}

.approval-org-person.selected .approval-org-check {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 4px #fff;
}

.approval-org-person small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.approval-org-right {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 42px 36px 28px;
}

.approval-org-right h3 {
  margin: 0;
}

.approval-org-selected {
  align-self: start;
  min-height: 46px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 900;
}

.approval-org-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.approval-node em {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: #eef1f5;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.visually-hidden {
  display: none;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid #e3e3e1;
  border-radius: 12px;
  color: var(--ink);
  background: #fbfbfa;
  padding: 8px 12px;
  outline: none;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #171c21;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 28, 33, 0.08);
}

.panel,
.metric,
.table-wrap,
.empty-state {
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pill,
.badge,
.status,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.pill {
  color: #202020;
  background: #eeeeed;
}

.badge {
  color: #4c5b69;
  background: #edf1f5;
}

.membership-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}

.membership-chip {
  color: #334155;
  background: #eef6f2;
  border: 1px solid #d5eadf;
}

.status.normal {
  color: var(--green);
  background: #e5f5eb;
}

.status.warning {
  color: var(--amber);
  background: #fff3dc;
}

.status.danger {
  color: var(--red);
  background: #fde9e9;
}

.rating-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  border-radius: 999px;
  color: #147a69;
  background: #e9fbf6;
  font-weight: 900;
}

.rating-score.warning {
  color: #936400;
  background: #fff7df;
}

.rating-score.danger {
  color: var(--red);
  background: #fde9e9;
}

.info,
.task,
.lane,
.area-card,
.vehicle-card,
.photo-card,
.queue-box,
.flow-summary,
.finance-card,
.approval-flow-card,
.approval-form-card {
  border-radius: 16px;
}

.content {
  display: grid;
  gap: 20px;
  flex: 1 1 auto;
  align-content: start;
  min-height: min(620px, calc(100dvh - 244px));
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.panel {
  padding: 20px;
}

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

.panel-header p,
.muted {
  color: var(--muted);
}

.metric {
  min-height: 128px;
  padding: 24px;
  border: 0;
  box-shadow: var(--shadow);
  text-align: center;
}

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

.metric strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 30px;
}

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

.metric.accent {
  color: #fff;
  background: #171c21;
  box-shadow: 0 20px 46px rgba(23, 28, 33, 0.18);
}

.metric.accent span,
.metric.accent small {
  color: rgba(255, 255, 255, 0.68);
}

.service-type-metric {
  display: grid;
  align-content: center;
  gap: 10px;
}

.service-type-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 2px;
}

.service-tag {
  border: 1px solid transparent;
}

.tone-wash.service-tag {
  color: #175e9f;
  background: #e7f2ff;
  border-color: #bfdcf9;
}

.tone-beauty.service-tag {
  color: #944062;
  background: #fdeaf1;
  border-color: #f7c7d8;
}

.tone-maintenance.service-tag {
  color: #2f6f46;
  background: #e8f6ed;
  border-color: #bee4ca;
}

.tone-repair.service-tag {
  color: #806018;
  background: #fff1c9;
  border-color: #efd48b;
}

.tone-default.service-tag {
  color: #4c5b69;
  background: #edf1f5;
  border-color: #dce4ec;
}

.btn {
  min-height: 38px;
  border: 1px solid #e6e6e4;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  padding: 8px 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(30, 34, 38, 0.04);
}

.btn:hover {
  border-color: #b8c5cf;
  background: #f8fafc;
}

.btn.primary {
  border-color: #171c21;
  color: #fff;
  background: #171c21;
}

.btn.primary:hover {
  background: #383838;
}

.btn.danger {
  border-color: #fee2e2;
  color: #b42318;
  background: #fff7f7;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.small {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.tabs {
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: #efefed;
}

.tab {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 5px 10px;
  font-weight: 700;
}

.tab.active {
  color: #fff;
  background: #171c21;
  box-shadow: 0 8px 18px rgba(32, 32, 32, 0.12);
}

.inventory-tabs {
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
}

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

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

th {
  color: var(--muted);
  background: #f6f6f5;
  font-size: 12px;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

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

.record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
}

.record strong,
.timeline strong {
  display: block;
  margin-bottom: 4px;
}

.scan-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.scan-frame {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 180px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #d6dde7;
  border-radius: 8px;
  color: #f8fafc;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(45, 55, 72, 0.88)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.08) 28px 30px);
}

.scan-frame strong {
  font-size: 18px;
}

.scan-frame p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.scan-line {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 48%;
  height: 2px;
  border-radius: 99px;
  background: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.72);
}

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

.plate {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #9ab1c5;
  border-radius: 6px;
  color: #143251;
  background: #e6f0fb;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
}

.asset-summary {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

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

.membership-vehicle-scope {
  display: grid;
  gap: 8px;
}

.membership-vehicle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #e3e3e1;
  border-radius: 8px;
  background: #fbfbfa;
}

.membership-vehicle-row strong,
.membership-vehicle-row span {
  display: block;
}

.membership-vehicle-row span {
  color: var(--muted);
  font-size: 12px;
}

.membership-plan-field {
  grid-column: span 2;
}

.membership-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.membership-field-head span {
  color: var(--muted);
  font-size: 12px;
}

.membership-plan-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.membership-plan-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 146px;
  padding: 14px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fff9, #f8fafc 58%, #fff7ed);
  box-shadow: 0 10px 24px rgba(28, 44, 38, 0.08);
}

.membership-plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: #1b9a6b;
}

.membership-plan-card-head,
.membership-plan-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.membership-plan-card-head {
  justify-content: space-between;
  padding-left: 4px;
}

.membership-plan-card-head span,
.membership-plan-card-foot span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #315043;
  font-size: 12px;
  font-weight: 700;
}

.membership-plan-card h3 {
  margin: 0;
  padding-left: 4px;
  font-size: 16px;
}

.membership-plan-card p {
  margin: 0;
  padding-left: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.membership-plan-card .btn {
  justify-self: end;
}

.settlement-method-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #dfe7e2;
  border-radius: 8px;
  background: #fbfdfb;
}

.settlement-method-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settlement-method-head h3,
.settlement-method-head p {
  margin: 0;
}

.settlement-method-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settlement-method-head strong {
  color: #143251;
  font-size: 18px;
}

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

.settlement-method-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #e3e3e1;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.settlement-method-card.selected {
  border-color: #1b9a6b;
  background: #effcf5;
  box-shadow: 0 0 0 3px rgba(27, 154, 107, 0.1);
}

.settlement-member-account {
  max-width: none;
}

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

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

.info strong {
  display: block;
  margin-top: 4px;
}

.timeline {
  display: grid;
  gap: 0;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 0;
}

.step-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #b6c2cc;
  font-size: 12px;
  font-weight: 800;
}

.step.done .step-marker {
  background: var(--green);
}

.step.current .step-marker {
  background: var(--blue);
}

.step.overdue .step-marker {
  background: var(--red);
}

.approval-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.approval-detail-field {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.approval-detail-field span,
.approval-detail-node small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.approval-detail-field strong,
.approval-detail-field p {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.approval-detail-flow {
  display: grid;
  gap: 10px;
}

.approval-detail-node {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.approval-detail-node.done .step-marker {
  background: var(--green);
}

.approval-detail-node.current .step-marker {
  background: var(--blue);
}

.approval-detail-node em {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.approval-people-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.approval-people-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: #edf4fa;
  font-size: 12px;
  font-weight: 800;
}

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

.photo-card {
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.photo {
  height: 92px;
  background:
    linear-gradient(135deg, rgba(16, 46, 66, 0.86), rgba(34, 116, 96, 0.72)),
    repeating-linear-gradient(90deg, #d7dde3 0 14px, #eef2f5 14px 28px);
}

.photo.two {
  background:
    linear-gradient(135deg, rgba(98, 63, 28, 0.82), rgba(181, 124, 47, 0.72)),
    repeating-linear-gradient(0deg, #edf2f5 0 16px, #d7dee4 16px 32px);
}

.photo.three {
  background:
    linear-gradient(135deg, rgba(47, 68, 105, 0.84), rgba(36, 128, 139, 0.7)),
    repeating-linear-gradient(45deg, #f0f3f6 0 12px, #dce3e9 12px 24px);
}

.photo-card p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.photo-card p strong {
  color: var(--ink);
}

.trace-source {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.trace-source.camera {
  color: #0f4b64;
  background: #dff3f7;
}

.trace-source.staff {
  color: #6f3d09;
  background: #fff0d8;
}

.journey-img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.lane {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.lane h3 {
  margin: 0;
}

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

.task .button-row {
  margin-top: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 14px;
}

.settings-flow-panel {
  grid-column: 1 / -1;
}

.switch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.switch-row:last-child {
  border-bottom: 0;
}

.toggle {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #bac5cf;
  padding: 3px;
}

.toggle::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle.on {
  background: var(--brand);
}

.toggle.on::before {
  transform: translateX(18px);
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.48;
  background: #eef2f5;
}

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

.template-tab {
  display: grid;
  gap: 2px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  padding: 7px 10px;
  text-align: left;
  font-weight: 800;
}

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

.template-tab.active {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #effaf6;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.flow-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: #f5fbf8;
}

.flow-summary p {
  margin: 4px 0 0;
}

.node-editor {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.node-head,
.node-row {
  display: grid;
  grid-template-columns: 48px minmax(120px, 1.2fr) minmax(110px, 0.8fr) minmax(70px, auto) minmax(70px, auto) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
}

.node-head {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.node-row {
  border-top: 1px solid var(--line);
}

.node-order {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

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

.check-cell input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.node-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.flow-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.work-area-grid,
.vehicle-bind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.branch-area-list {
  display: grid;
  gap: 16px;
}

.branch-area-group {
  display: grid;
  gap: 10px;
}

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

.branch-area-head h3,
.branch-area-head p {
  margin: 0;
}

.hq-area-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.hq-area-card {
  min-height: 248px;
}

.area-card,
.vehicle-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.area-card.tone-wash {
  background: #f7fbff;
  border-color: #d3e7fb;
}

.area-card.tone-beauty {
  background: #fff8fb;
  border-color: #f4d4df;
}

.area-card.tone-maintenance {
  background: #f7fcf8;
  border-color: #cfead7;
}

.area-card.tone-repair {
  background: #fffaf0;
  border-color: #eadcae;
}

.area-card-head,
.vehicle-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.area-card-head strong,
.area-vehicle strong,
.vehicle-card strong {
  display: block;
}

.area-card-head span,
.area-foot,
.area-vehicle p,
.vehicle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.area-vehicle {
  display: grid;
  gap: 6px;
}

.queue-box {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7e8;
}

.queue-box strong {
  color: var(--amber);
}

.queue-box span {
  color: var(--muted);
  font-size: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(188, 122, 24, 0.18);
}

.queue-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-item .plate {
  width: max-content;
}

.customer-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 14px;
}

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

.customer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.customer-row.active {
  border-color: var(--brand);
  background: #effaf6;
}

.customer-row strong,
.customer-row small {
  display: block;
}

.customer-row small {
  color: var(--muted);
  margin-top: 3px;
}

.owner-pair,
.owner-editor {
  display: grid;
  gap: 8px;
}

.owner-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.8fr) minmax(96px, 0.45fr);
  gap: 8px;
}

.maintenance-parts-table td {
  vertical-align: middle;
}

.maintenance-parts-table input {
  min-height: 34px;
}

.owner-pair span {
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 700;
}

.area-editor {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.area-head,
.area-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.7fr) minmax(110px, 0.8fr) minmax(60px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
}

.area-head {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.area-row {
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
}

.modal.show {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .app-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

body.modal-open .table-wrap {
  overflow-x: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 31, 43, 0.38);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: fit-content;
  min-width: min(420px, calc(100vw - 48px));
  max-width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 34, 48, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
}

#modal .table-wrap,
#modal .node-editor,
#modal .area-editor,
#modal .order-item-picker-table,
#modal .settlement-table {
  max-width: 100%;
  overflow-x: auto;
}

#modalBody > div.table-wrap {
  height: auto;
  min-height: 220px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

#modal table {
  width: 100%;
  min-width: 680px;
  table-layout: auto;
}

#modal th,
#modal td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#modal .grid,
#modal .profile-grid,
#modal .record,
#modal .step,
#modal .approval-form-row,
#modal .approval-bound-template,
#modal .approval-node,
#modal .approval-node-edit,
#modal .finance-center,
#modal .finance-workspace,
#modal .customer-layout,
#modal .work-area-grid,
#modal .vehicle-bind-grid {
  max-width: 100%;
}

.inline-panel {
  padding: 14px;
  box-shadow: none;
  border: 1px solid var(--line);
}

.manual-plate-lookup {
  display: grid;
  gap: 10px;
}

.branch-detail-modal {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.branch-detail-modal .profile-grid,
.branch-detail-modal .grid.cols-4,
.branch-detail-modal .hq-area-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branch-detail-modal .info,
.branch-detail-modal .metric,
.branch-detail-modal .area-card,
.branch-detail-modal .record {
  min-width: 0;
}

.branch-detail-modal .info strong,
.branch-detail-modal .record span,
.branch-detail-modal .area-card {
  overflow-wrap: anywhere;
}

.branch-detail-modal .metric {
  min-height: 104px;
  padding: 16px;
}

.branch-detail-modal .metric strong {
  font-size: 24px;
}

.branch-detail-modal .hq-area-card {
  min-height: 0;
}

.branch-detail-modal .table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 760px) {
  .branch-detail-modal .profile-grid,
  .branch-detail-modal .grid.cols-4,
  .branch-detail-modal .hq-area-grid,
  .finance-flow,
  .finance-plan-grid,
  .finance-module-brief,
  .finance-status-strip {
    grid-template-columns: 1fr;
  }
}

.modal-actions {
  justify-content: flex-end;
}

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

.insurance-city-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-line-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.order-line-tools .amount {
  margin-left: auto;
  white-space: nowrap;
}

.order-line-tools h3 {
  margin: 0;
}

.fulfillment-hint {
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f6f9fc;
  padding: 10px 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.fulfillment-hint.retail {
  border-color: #b9d9cc;
  background: #f0faf5;
  color: #255c47;
}

.order-line-table input,
.order-line-table select {
  min-height: 34px;
}

.order-line-table tr.line-row-added {
  background: #eef8f3;
  transition: background 0.4s ease;
}

#modalBody > div.order-cost-table {
  min-height: 0;
  max-height: none;
  overflow-y: visible;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 30px minmax(52px, 72px) 30px;
  align-items: center;
  gap: 6px;
}

.qty-stepper input {
  min-height: 30px;
  text-align: center;
}

.btn.icon-only {
  width: 30px;
  min-width: 30px;
  padding: 0;
}

.order-item-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.order-item-picker[hidden] {
  display: none;
}

.order-item-picker-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 31, 43, 0.28);
}

.order-item-picker-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: fit-content;
  min-width: min(520px, calc(100vw - 48px));
  max-width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 34, 48, 0.3);
}

.order-item-picker-body {
  display: grid;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
}

.order-item-filter {
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 1fr));
  margin-bottom: 0;
}

.vehicle-model-filter {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  margin-bottom: 0;
}

.order-item-picker-table th,
.order-item-picker-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.order-item-picker-table {
  overflow-x: hidden;
}

@media (max-width: 760px) {
  .order-item-picker-panel {
    width: calc(100vw - 32px);
    min-width: 0;
  }

  .order-item-filter {
    grid-template-columns: 1fr;
  }

  .vehicle-model-filter,
  .owner-editor-row {
    grid-template-columns: 1fr;
  }

  .settlement-picker-head {
    grid-template-columns: 1fr;
  }

  #modal table {
    table-layout: fixed;
  }

  #modal input,
  #modal select,
  #modal textarea,
  #modal .btn {
    min-width: 0;
  }

  #modal .qty-stepper {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  #modal .order-line-table table,
  #modal .order-line-table thead,
  #modal .order-line-table tbody,
  #modal .order-line-table tfoot,
  #modal .order-line-table tr,
  #modal .order-line-table th,
  #modal .order-line-table td {
    display: block;
    width: 100%;
  }

  #modal .order-line-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  #modal .order-line-table th,
  #modal .order-line-table td {
    border-bottom: 0;
    padding: 6px 0;
  }

  #modal .node-head,
  #modal .node-row,
  #modal .area-head,
  #modal .area-row {
    grid-template-columns: 1fr;
  }
}

.settlement-picker-popup {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.settlement-picker-popup[hidden] {
  display: none;
}

.settlement-picker-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 31, 43, 0.32);
}

.settlement-picker-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: fit-content;
  min-width: min(560px, calc(100vw - 48px));
  max-width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 34, 48, 0.3);
}

.settlement-picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.settlement-picker-title h3 {
  margin: 0;
}

.settlement-picker-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 16px;
}

.settlement-table {
  max-height: 500px;
  margin: 0 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

.settlement-table table {
  min-width: 0;
}

.settlement-table tr.selected {
  background: #e7f2fb;
  color: #075ca8;
}

.settlement-table th:first-child,
.settlement-table td:first-child {
  width: 36px;
  text-align: center;
}

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

.empty-state {
  padding: 24px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 340px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  color: #fff;
  background: #1d2733;
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(19, 38, 53, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.field-error,
.form-error,
.login-error {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.next-step-card,
.settlement-summary {
  padding: 14px;
  border: 1px solid #e6e6e4;
  border-radius: 16px;
  background: #f8fafc;
}

.next-step-card strong,
.settlement-summary strong {
  display: block;
  margin-bottom: 6px;
}

.tablet-dock {
  display: none;
}

body.tablet-mode {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

body.tablet-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(32, 32, 32, 0.035) 0 1px, transparent 1px 120px),
    linear-gradient(0deg, rgba(32, 32, 32, 0.03) 0 1px, transparent 1px 96px);
  opacity: 1;
}

body.tablet-mode .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.tablet-mode .sidebar {
  position: sticky;
  top: 20px;
  z-index: 20;
  align-self: start;
  width: 64px;
  height: auto;
  min-height: calc(100dvh - 40px);
  overflow: visible;
  margin: 20px 0 20px 18px;
  padding: 12px 8px;
  gap: 16px;
  border: 1px solid rgba(32, 32, 32, 0.08);
  border-radius: 28px;
  background: rgba(251, 251, 250, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 56px rgba(35, 35, 35, 0.1);
}

body.tablet-mode .brand {
  justify-content: center;
  padding: 4px 0 8px;
}

body.tablet-mode .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 18px;
  color: #fff;
  background: #202020;
}

body.tablet-mode .brand > div:not(.brand-mark) {
  display: none;
}

body.tablet-mode .nav-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
  overflow: visible;
  padding: 0;
}

body.tablet-mode .nav-item {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 18px;
  color: #494949;
  background: transparent;
  text-align: center;
}

body.tablet-mode .nav-item.nav-child {
  width: 42px;
  min-height: 42px;
  margin-left: 2px;
  padding: 0;
  border-radius: 16px;
}

body.tablet-mode .nav-label {
  width: 34px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

body.tablet-mode .nav-item.active {
  color: #fff;
  background: #202020;
  box-shadow: 0 14px 30px rgba(32, 32, 32, 0.18);
}

body.tablet-mode .nav-count {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  overflow: hidden;
  padding: 0;
  color: transparent;
  background: #202020;
}

body.tablet-mode .tenant-card {
  display: none;
}

body.tablet-mode .main {
  width: 100%;
  margin: 0;
  background: transparent;
  padding: 20px 24px 112px 10px;
}

body.tablet-mode .topbar {
  top: 16px;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(32, 32, 32, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 64px rgba(35, 35, 35, 0.08);
}

body.tablet-mode h1 {
  color: var(--ink);
  font-size: 26px;
}

body.tablet-mode h2,
body.tablet-mode h3 {
  color: var(--ink);
}

.approval-person-combo {
  position: relative;
  min-width: 0;
}

.approval-person-combo-trigger {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.approval-person-combo-trigger::after {
  content: "⌄";
  float: right;
  color: var(--muted);
}

.approval-person-combo-menu {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 34, 48, 0.18);
}

.approval-person-combo-menu[hidden] {
  display: none;
}

.approval-person-group {
  display: grid;
  gap: 6px;
}

.approval-person-group strong {
  color: var(--muted);
  font-size: 12px;
}

.approval-person-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--ink);
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 242, 245, 0.94)),
    radial-gradient(circle at 18% 18%, rgba(20, 29, 38, 0.14), transparent 34%);
}

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

.login-card {
  width: min(440px, 100%);
  border: 1px solid rgba(17, 31, 43, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 80px rgba(17, 31, 43, 0.12);
}

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

.login-brand strong,
.login-card h1 {
  color: var(--ink);
  font-size: 28px;
}

.login-brand small,
.login-card-head span,
.login-qrcode small {
  display: block;
  color: var(--muted);
}

.login-card {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: 34px;
}

.login-card-head h1 {
  margin: 6px 0 0;
}

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

.login-mode label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 900;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: var(--ink);
  font-weight: 900;
}

.login-field input {
  width: 100%;
  min-height: 46px;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.login-code-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf4fa;
  font-weight: 900;
}

.login-submit {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #111f2b;
  font-weight: 900;
}

.login-qrcode {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fake-qr {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 86px;
  height: 86px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.fake-qr span {
  border-radius: 2px;
  background: #111f2b;
}

.fake-qr span:nth-child(2n),
.fake-qr span:nth-child(5n) {
  background: transparent;
}

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

  .login-card {
    padding: 22px;
  }
}

body.tablet-mode .desktop-head {
  gap: 12px;
}

body.tablet-mode .desktop-search {
  width: min(340px, 45vw);
}

body.tablet-mode .desktop-search input {
  min-height: 44px;
  color: var(--ink);
  background: #f2f2f1;
}

body.tablet-mode .desktop-search input::placeholder {
  color: var(--muted);
}

body.tablet-mode .desktop-search::after {
  color: var(--muted);
}

body.tablet-mode .eyebrow,
body.tablet-mode .field span,
body.tablet-mode .muted,
body.tablet-mode .panel-header p {
  color: var(--muted);
}

body.tablet-mode .toolbar {
  justify-content: flex-end;
  gap: 10px;
}

body.tablet-mode .field.compact {
  color: var(--ink);
}

body.tablet-mode input,
body.tablet-mode select,
body.tablet-mode textarea {
  min-height: 44px;
  border-color: #e6e6e5;
  color: var(--ink);
  background: #fff;
}

body.tablet-mode .topbar-actions {
  border-left-color: var(--line);
}

body.tablet-mode .icon-btn,
body.tablet-mode .avatar {
  color: #202020;
  background: #f3f3f2;
}

body.tablet-mode .avatar {
  color: #fff;
  background: #202020;
}

body.tablet-mode .user-chip strong {
  color: var(--ink);
}

body.tablet-mode .user-chip small {
  color: var(--muted);
}

body.tablet-mode .grid.cols-4,
body.tablet-mode .grid.cols-3,
body.tablet-mode .filter-bar,
body.tablet-mode .asset-summary,
body.tablet-mode .settings-grid,
body.tablet-mode .customer-layout,
body.tablet-mode .work-area-grid,
body.tablet-mode .vehicle-bind-grid,
body.tablet-mode .kanban,
body.tablet-mode .photo-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.tablet-mode .panel {
  padding: 18px;
  border-color: rgba(32, 32, 32, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 64px rgba(35, 35, 35, 0.08);
}

body.tablet-mode .panel-header {
  align-items: flex-start;
}

body.tablet-mode .btn {
  min-height: 44px;
  border-color: #e6e6e5;
  color: var(--ink);
  background: #fff;
}

body.tablet-mode .btn.primary {
  border-color: #202020;
  color: #fff;
  background: #202020;
}

body.tablet-mode .btn.small {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 13px;
}

body.tablet-mode .device-option,
body.tablet-mode .tab {
  min-height: 38px;
}

body.tablet-mode .device-switch,
body.tablet-mode .tabs {
  background: #f1f1f0;
}

body.tablet-mode .device-option,
body.tablet-mode .tab {
  color: var(--muted);
}

body.tablet-mode .device-option.active,
body.tablet-mode .tab.active {
  color: #fff;
  background: #202020;
  box-shadow: none;
}

body.tablet-mode .table-wrap {
  overflow-x: auto;
  border-color: var(--line);
  background: #fff;
}

body.tablet-mode table {
  min-width: 760px;
}

body.tablet-mode th,
body.tablet-mode td {
  border-bottom-color: var(--line);
  padding: 12px 11px;
}

body.tablet-mode th {
  color: var(--muted);
  background: #f8fafc;
}

body.tablet-mode table,
body.tablet-mode .info,
body.tablet-mode .record,
body.tablet-mode .task,
body.tablet-mode .lane,
body.tablet-mode .area-card,
body.tablet-mode .vehicle-card,
body.tablet-mode .photo-card,
body.tablet-mode .queue-box,
body.tablet-mode .filter-bar {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

body.tablet-mode .metric {
  min-height: 132px;
  border: 1px solid rgba(32, 32, 32, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

body.tablet-mode .metric.accent {
  color: #fff;
  background: #202020;
}

body.tablet-mode .metric span,
body.tablet-mode .metric small,
body.tablet-mode .info span,
body.tablet-mode .area-card-head span,
body.tablet-mode .area-foot,
body.tablet-mode .area-vehicle p,
body.tablet-mode .vehicle-card p,
body.tablet-mode .queue-box span,
body.tablet-mode .photo-card p {
  color: var(--muted);
}

body.tablet-mode .pill,
body.tablet-mode .badge,
body.tablet-mode .plate {
  border-color: var(--line);
  color: var(--ink);
  background: #eeeeed;
}

body.tablet-mode .modal-panel {
  width: fit-content;
  min-width: min(420px, calc(100vw - 44px));
  max-width: min(1120px, calc(100vw - 44px));
  border: 1px solid rgba(32, 32, 32, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
}

body.tablet-mode .modal-header,
body.tablet-mode .modal-body {
  padding: 18px;
}

body.tablet-mode .toast {
  right: 18px;
  bottom: 18px;
}

body.tablet-mode .tablet-dock {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(32, 32, 32, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px);
  box-shadow: 0 22px 56px rgba(35, 35, 35, 0.12);
}

body.hq-mode .tablet-dock {
  display: none;
}

.tablet-dock-item,
.tablet-dock-add {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  padding: 0 18px;
  font-weight: 800;
}

.tablet-dock-item.active {
  color: #fff;
  background: #202020;
}

.tablet-dock-add {
  display: grid;
  place-items: center;
  width: 46px;
  padding: 0;
  color: #fff;
  background: #202020;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 16px;
  }

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

  .nav-item {
    flex: 0 0 auto;
    min-width: 112px;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .panel-header,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .asset-summary,
  .profile-grid,
  .settings-grid,
  .customer-layout,
  .work-area-grid,
  .vehicle-bind-grid,
  .kanban,
  .photo-strip {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 760px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    width: min(100%, calc(100vw - 24px));
    min-width: 0;
    max-height: calc(100dvh - 24px);
  }

  .btn.small {
    min-height: 38px;
    padding: 7px 10px;
  }

  body.tablet-mode .topbar,
  body.tablet-mode .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.tablet-mode .toolbar {
    justify-content: flex-start;
  }

  body.tablet-mode .grid.cols-4,
  body.tablet-mode .grid.cols-3,
  body.tablet-mode .grid.cols-2,
  body.tablet-mode .filter-bar,
  body.tablet-mode .asset-summary,
  body.tablet-mode .profile-grid,
  body.tablet-mode .settings-grid,
  body.tablet-mode .customer-layout,
  body.tablet-mode .work-area-grid,
  body.tablet-mode .vehicle-bind-grid,
  body.tablet-mode .finance-center,
  body.tablet-mode .finance-workspace,
  body.tablet-mode .approval-shell,
  body.tablet-mode .approval-card-grid,
  body.tablet-mode .kanban,
  body.tablet-mode .photo-strip {
    grid-template-columns: 1fr;
  }

  body.tablet-mode .finance-subnav {
    min-height: 0;
    max-height: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.tablet-mode .approval-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.tablet-mode .record,
  body.tablet-mode .step,
  body.tablet-mode .flow-summary,
  body.tablet-mode .approval-form-row,
  body.tablet-mode .approval-bound-template,
  body.tablet-mode .approval-node,
  body.tablet-mode .approval-node-edit,
  body.tablet-mode .approval-org-dialog {
    grid-template-columns: 1fr;
  }

  body.tablet-mode .approval-org-dialog {
    height: min(760px, calc(100vh - 56px));
  }
}

@media (max-width: 1040px) {
  body:not(.tablet-mode) .app-shell {
    grid-template-columns: 1fr;
    width: min(100% - 32px, 1440px);
    min-height: auto;
    margin: 16px auto;
  }

  body:not(.tablet-mode) .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
  }

  body:not(.tablet-mode) .main {
    border-radius: 0 0 16px 16px;
  }

  body:not(.tablet-mode) .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.tablet-mode) .nav-item.nav-child {
    width: 100%;
    margin-left: 0;
  }

  body:not(.tablet-mode) .tenant-card {
    margin-top: 0;
  }

  body:not(.tablet-mode) .grid.cols-4,
  body:not(.tablet-mode) .grid.cols-3,
  body:not(.tablet-mode) .filter-bar,
  body:not(.tablet-mode) .asset-summary,
  body:not(.tablet-mode) .settings-grid,
  body:not(.tablet-mode) .customer-layout,
  body:not(.tablet-mode) .work-area-grid,
  body:not(.tablet-mode) .vehicle-bind-grid,
  body:not(.tablet-mode) .finance-workspace,
  body:not(.tablet-mode) .approval-card-grid,
  body:not(.tablet-mode) .kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:not(.tablet-mode) .app-shell {
    width: min(100% - 20px, 1440px);
    margin: 10px auto;
    border-radius: 12px;
  }

  body:not(.tablet-mode) .main {
    padding: 16px;
    border-radius: 0 0 12px 12px;
  }

  body:not(.tablet-mode) .sidebar {
    border-radius: 12px 12px 0 0;
  }

  body:not(.tablet-mode) .topbar,
  body:not(.tablet-mode) .panel-header {
    align-items: stretch;
  }

  body:not(.tablet-mode) .topbar {
    top: 10px;
    grid-template-columns: 1fr;
  }

  body:not(.tablet-mode) .toolbar,
  body:not(.tablet-mode) .field.compact,
  body:not(.tablet-mode) .nav-list,
  body:not(.tablet-mode) .grid.cols-4,
  body:not(.tablet-mode) .grid.cols-3,
  body:not(.tablet-mode) .grid.cols-2,
  body:not(.tablet-mode) .filter-bar,
  body:not(.tablet-mode) .asset-summary,
  body:not(.tablet-mode) .profile-grid,
  body:not(.tablet-mode) .scan-panel,
  body:not(.tablet-mode) .scan-result,
  body:not(.tablet-mode) .settings-grid,
  body:not(.tablet-mode) .customer-layout,
  body:not(.tablet-mode) .work-area-grid,
  body:not(.tablet-mode) .vehicle-bind-grid,
  body:not(.tablet-mode) .finance-center,
  body:not(.tablet-mode) .finance-workspace,
  body:not(.tablet-mode) .approval-shell,
  body:not(.tablet-mode) .approval-card-grid,
  body:not(.tablet-mode) .kanban,
  body:not(.tablet-mode) .photo-strip {
    grid-template-columns: 1fr;
  }

  body:not(.tablet-mode) .toolbar {
    justify-self: stretch;
    justify-content: flex-start;
  }

  body:not(.tablet-mode) .record,
  body:not(.tablet-mode) .step,
  body:not(.tablet-mode) .search-box,
  body:not(.tablet-mode) .flow-summary,
  body:not(.tablet-mode) .approval-form-row,
  body:not(.tablet-mode) .approval-bound-template,
  body:not(.tablet-mode) .approval-node,
  body:not(.tablet-mode) .approval-node-edit,
  body:not(.tablet-mode) .approval-org-dialog {
    grid-template-columns: 1fr;
  }

  body:not(.tablet-mode) .approval-org-picker {
    padding: 14px;
  }

  body:not(.tablet-mode) .modal-panel {
    width: calc(100vw - 28px);
    min-width: 0;
    max-width: calc(100vw - 28px);
  }

  body:not(.tablet-mode) table {
    min-width: 680px;
  }

  body:not(.tablet-mode) .table-wrap {
    overflow-x: auto;
  }
}

/* Ant Design alignment pass */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --ink: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.45);
  --line: #f0f0f0;
  --brand: #1677ff;
  --brand-dark: #0958d9;
  --blue: #1677ff;
  --amber: #faad14;
  --red: #ff4d4f;
  --green: #52c41a;
  --sidebar: #001529;
  --sidebar-soft: #1677ff;
  --shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

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

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  gap: 14px;
  padding: 24px 12px 18px;
  color: rgba(255, 255, 255, 0.88);
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.brand {
  padding: 0 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--brand);
  box-shadow: none;
}

.brand span,
.tenant-card small {
  color: rgba(255, 255, 255, 0.45);
}

.nav-list {
  gap: 4px;
  margin-top: 0;
}

.nav-item,
.nav-item.nav-child {
  min-height: 40px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.nav-item {
  padding: 9px 12px;
}

.nav-item.nav-child {
  margin-left: 18px;
  width: calc(100% - 18px);
  color: rgba(255, 255, 255, 0.58);
}

.nav-icon {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.nav-item:hover,
.nav-item.nav-parent:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active,
.nav-item.nav-child.active,
.nav-item.nav-parent.active:hover {
  color: #fff;
  background: var(--brand);
  box-shadow: none;
}

.nav-item.active::before {
  display: none;
}

.nav-item.active .nav-icon,
.nav-item.nav-child.active .nav-icon {
  color: var(--brand);
  background: #fff;
}

.nav-count {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 500;
}

.tenant-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.main {
  padding: 24px 28px 32px;
  background: var(--bg);
}

.topbar {
  min-height: 64px;
  margin: -24px -28px 24px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.desktop-search input,
input,
select,
textarea {
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.desktop-search input,
input,
select {
  min-height: 32px;
}

textarea {
  min-height: 88px;
}

.desktop-search input {
  padding-left: 34px;
}

.desktop-search::after {
  left: 12px;
  right: auto;
  color: var(--muted);
  font-size: 14px;
}

.desktop-search input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.topbar-search-menu,
.account-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toolbar,
.button-row,
.tabs,
.chip-row,
.meta-row {
  gap: 8px;
}

.icon-btn,
.user-chip .avatar {
  border-radius: 6px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d9d9d9;
  color: var(--muted);
  background: #fff;
  box-shadow: none;
}

.user-chip {
  min-height: 32px;
  padding: 2px 8px 2px 2px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
}

.avatar {
  width: 28px;
  height: 28px;
  background: var(--brand);
}

.device-switch,
.tabs,
.approval-status-tabs {
  padding: 2px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
}

.device-option,
.tab {
  min-height: 28px;
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 500;
}

.device-option.active,
.tab.active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn {
  min-height: 32px;
  border-color: #d9d9d9;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  padding: 4px 15px;
  font-weight: 500;
  box-shadow: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn.primary:hover {
  border-color: #4096ff;
  background: #4096ff;
  color: #fff;
}

.btn.danger {
  border-color: #ffccc7;
  color: var(--red);
  background: #fff2f0;
}

.btn.small {
  min-height: 24px;
  padding: 1px 8px;
  font-size: 12px;
}

.filter-bar,
.finance-workbench,
.finance-plan-section,
.approval-form-card,
.approval-flow-card,
.settlement-method-panel,
.flow-summary,
.node-editor,
.area-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.panel,
.metric,
.table-wrap,
.empty-state,
.finance-subnav,
.finance-source,
.finance-confirm,
.finance-generic,
.finance-card,
.finance-block,
.approval-template-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.panel {
  padding: 20px 24px;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header h2,
.panel-header h3 {
  margin-bottom: 4px;
}

.metric {
  min-height: 116px;
  padding: 20px;
  text-align: left;
}

.metric strong {
  margin: 8px 0 2px;
  font-size: 28px;
}

.metric.accent {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  background: #fff;
}

th,
td {
  border-bottom-color: var(--line);
  padding: 12px 16px;
}

th {
  color: rgba(0, 0, 0, 0.65);
  background: #fafafa;
  font-weight: 500;
}

tbody tr:hover td,
.selected-row td {
  background: #f5faff;
}

.pill,
.badge,
.status,
.chip,
.rating-score,
.approval-field-tags span,
.approval-field-tags em,
.approval-node em,
.approval-detail-node em,
.approval-people-tags span,
.membership-plan-card-head span,
.membership-plan-card-foot span {
  min-height: 22px;
  border-radius: 4px;
  font-weight: 500;
}

.pill,
.badge,
.chip {
  color: rgba(0, 0, 0, 0.65);
  background: #f5f5f5;
}

.status.normal,
.rating-score {
  color: #389e0d;
  background: #f6ffed;
}

.status.warning,
.rating-score.warning {
  color: #d48806;
  background: #fffbe6;
}

.status.danger,
.rating-score.danger {
  color: #cf1322;
  background: #fff1f0;
}

.modal-backdrop,
.settlement-picker-mask,
.order-item-picker-mask {
  background: rgba(0, 0, 0, 0.45);
}

.modal-panel,
.settlement-picker-panel,
.order-item-picker-panel,
.approval-org-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-header,
.settlement-picker-title {
  padding: 16px 24px;
}

.modal-body,
.order-item-picker-body {
  padding: 20px 24px;
}

.toast {
  right: 24px;
  bottom: 24px;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.toggle,
.switch {
  background: rgba(0, 0, 0, 0.25);
}

.toggle.on,
.switch.on {
  background: var(--brand);
}

.approval-icon,
.approval-node > span,
.finance-flow-node span,
.node-order,
.step.current .step-marker {
  background: var(--brand);
}

.step.done .step-marker,
.approval-detail-node.done .step-marker {
  background: var(--green);
}

.step.overdue .step-marker {
  background: var(--red);
}

body.tablet-mode .sidebar {
  background: var(--sidebar);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.tablet-mode .brand-mark,
body.tablet-mode .nav-item.active,
body.tablet-mode .tablet-dock-item.active,
body.tablet-mode .tablet-dock-add,
body.tablet-mode .btn.primary,
body.tablet-mode .device-option.active,
body.tablet-mode .tab.active,
body.tablet-mode .metric.accent {
  background: var(--brand);
}

body.tablet-mode .panel,
body.tablet-mode .metric,
body.tablet-mode .topbar,
body.tablet-mode .modal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

@media (max-width: 1040px) {
  body:not(.tablet-mode) .sidebar {
    background: var(--sidebar);
  }

  body:not(.tablet-mode) .app-shell {
    width: 100%;
    margin: 0;
  }
}

/* Ant Design hardening pass: normalize legacy demo surfaces into enterprise UI components. */
body.tablet-mode::before {
  display: none;
}

.desktop-head > div {
  display: block;
}

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

.desktop-head {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.eyebrow,
.field span,
.panel-header p,
.muted,
.search-empty,
.finance-subnav strong,
.approval-group h3,
.area-card-head span,
.vehicle-card p,
.queue-box span,
.photo-card p,
.detail-row dt {
  color: rgba(0, 0, 0, 0.45);
}

h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

h2 {
  font-size: 16px;
  font-weight: 600;
}

h3 {
  font-size: 14px;
  font-weight: 600;
}

.topbar-actions {
  gap: 8px;
}

.icon-btn {
  position: relative;
  overflow: hidden;
  font-size: 0;
}

.icon-btn::before,
.icon-btn::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-btn[aria-label="消息"]::before {
  width: 15px;
  height: 11px;
  border: 1.6px solid currentColor;
  border-radius: 2px;
}

.icon-btn[aria-label="消息"]::after {
  width: 9px;
  height: 9px;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

.icon-btn[aria-label="通知"]::before {
  width: 14px;
  height: 15px;
  border: 1.6px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 3px 3px;
}

.icon-btn[aria-label="通知"]::after {
  bottom: 7px;
  width: 16px;
  height: 6px;
  border-top: 1.6px solid currentColor;
  border-radius: 50%;
}

.content {
  gap: 16px;
  min-height: min(620px, calc(100dvh - 180px));
}

.grid {
  gap: 16px;
}

.panel,
.table-wrap {
  overflow: hidden;
}

.filter-bar {
  margin-bottom: 16px;
  padding: 16px;
}

.field {
  gap: 6px;
}

.field span {
  font-weight: 500;
}

input::placeholder,
textarea::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

select {
  appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0, 0, 0, 0.45) 50%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.45) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.btn,
.tab,
.device-option,
.icon-btn,
.user-chip,
input,
select,
textarea,
.approval-person-picker,
.approval-person-select,
.approval-person-combo-trigger,
.template-tab,
.approval-add-detail,
.settlement-method-card,
.customer-row,
.membership-vehicle-row,
.queue-more-btn,
.small-action {
  border-radius: 6px;
}

.btn.ghost,
.text-btn {
  color: var(--brand);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.text-btn:hover,
.btn.ghost:hover {
  color: #4096ff;
  background: #e6f4ff;
}

.table-actions,
.button-row {
  gap: 8px;
}

th:first-child,
td:first-child {
  padding-left: 20px;
}

th:last-child,
td:last-child {
  padding-right: 20px;
}

td .btn.small {
  white-space: nowrap;
}

.record,
.info,
.task,
.lane,
.area-card,
.vehicle-card,
.photo-card,
.queue-box,
.membership-plan-card,
.approval-detail-field,
.approval-detail-node,
.approval-node,
.finance-flow-node,
.row-card,
.settlement-method-card,
.work-order-row,
.queue-vehicle,
.setting-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.record,
.task,
.area-card,
.vehicle-card,
.photo-card,
.membership-plan-card,
.approval-template-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.record:hover,
.task:hover,
.area-card:hover,
.vehicle-card:hover,
.photo-card:hover,
.membership-plan-card:hover,
.approval-template-card:hover {
  border-color: #d9d9d9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.area-card.tone-wash,
.area-card.tone-beauty,
.area-card.tone-maintenance,
.area-card.tone-repair,
.membership-plan-card,
.settlement-method-panel,
.queue-box,
.flow-summary,
.lane {
  background: #fff;
}

.tone-wash.service-tag,
.tone-beauty.service-tag,
.tone-maintenance.service-tag,
.tone-repair.service-tag,
.tone-default.service-tag,
.membership-chip,
.trace-source.camera,
.trace-source.staff,
.plate {
  border-radius: 4px;
}

.tone-wash.service-tag,
.trace-source.camera,
.plate {
  color: #0958d9;
  background: #e6f4ff;
  border-color: #91caff;
}

.tone-beauty.service-tag {
  color: #c41d7f;
  background: #fff0f6;
  border-color: #ffadd2;
}

.tone-maintenance.service-tag,
.membership-chip {
  color: #389e0d;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.tone-repair.service-tag,
.trace-source.staff {
  color: #d48806;
  background: #fffbe6;
  border-color: #ffe58f;
}

.photo,
.photo.two,
.photo.three,
.scan-frame,
.login-page {
  background: #f5f5f5;
}

.scan-frame {
  border-color: #d9d9d9;
  color: var(--ink);
}

.scan-frame p {
  color: var(--muted);
}

.scan-line {
  background: var(--brand);
  box-shadow: none;
}

.membership-plan-card::before {
  background: var(--brand);
}

.template-tabs,
.finance-module-brief,
.finance-status-strip,
.finance-flow,
.finance-plan-grid,
.approval-detail-fields {
  gap: 12px;
}

.template-tab.active,
.customer-row.active,
.settlement-method-card.selected {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #e6f4ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.toggle,
.switch {
  width: 44px;
  height: 22px;
  padding: 2px;
}

.toggle::before,
.switch::after {
  width: 18px;
  height: 18px;
}

.toggle.on::before,
.switch.on::after {
  transform: translateX(22px);
}

.toast::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.login-card {
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-submit {
  border-radius: 6px;
  background: var(--brand);
}

@media (max-width: 900px) {
  .desktop-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .desktop-search {
    width: 100%;
  }
}

/* Crisp SVG-mask icons, replacing fuzzy CSS-drawn shapes. */
.nav-icon::before,
.icon-btn::before {
  width: 16px !important;
  height: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: currentColor !important;
  box-shadow: none !important;
  clip-path: none !important;
  transform: none !important;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.nav-icon::after,
.icon-btn::after {
  display: none !important;
}

.nav-icon-dashboard {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E");
}

.nav-icon-search {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16.5 16.5 4 4'/%3E%3C/svg%3E");
}

.nav-icon-user {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.7-4.2 4.4-6 8-6s6.3 1.8 8 6'/%3E%3C/svg%3E");
}

.nav-icon-team {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.8 20c1.3-3.6 3.5-5.2 6.2-5.2s4.9 1.6 6.2 5.2'/%3E%3Cpath d='M16 11.5a3.2 3.2 0 1 0-.8-6.3'/%3E%3Cpath d='M17 14.8c2.1.5 3.6 2.1 4.4 5.2'/%3E%3C/svg%3E");
}

.nav-icon-credit,
.nav-icon-wallet {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M4 11h18'/%3E%3Cpath d='M16 16h2'/%3E%3C/svg%3E");
}

.nav-icon-file,
.nav-icon-audit,
.nav-icon-import {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h4'/%3E%3C/svg%3E");
}

.nav-icon-schedule,
.nav-icon-bell {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}

.nav-icon-check {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.nav-icon-database,
.nav-icon-inbox {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5'/%3E%3Cpath d='M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7'/%3E%3C/svg%3E");
}

.nav-icon-appstore,
.nav-icon-product {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='13' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}

.nav-icon-setting {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v3M12 18v3M4.6 6.6l2.1 2.1M17.3 17.3l2.1 2.1M3 12h3M18 12h3M4.6 17.4l2.1-2.1M17.3 6.7l2.1-2.1'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.nav-icon-monitor {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
}

.nav-icon-warning {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 22 20H2z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E");
}

.nav-icon-shop {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10h16l-1.5-5h-13z'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E");
}

.nav-icon-star {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='m12 2.8 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.4l6.2-.9z'/%3E%3C/svg%3E");
}

.nav-icon-swap {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h13l-3-3M17 17H4l3 3'/%3E%3C/svg%3E");
}

.nav-icon-dot {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.icon-btn[aria-label="消息"] {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 7 9-7'/%3E%3C/svg%3E");
}

.icon-btn[aria-label="通知"] {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}
