@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/material-symbols-outlined.ttf") format("truetype");
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  min-width: 20px;
}

:root {
  --bg: #f5f5f7;
  --primary: #0b63d8;
  --text: #1f2430;
  --muted: #687085;
  --line: #e5e8ef;
  --card: rgba(255, 255, 255, 0.82);
  --radius: 14px;
  --shadow: 0 10px 24px rgba(14, 22, 43, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.app-shell {
  display: flex;
  height: 100vh;
  padding: 14px;
  gap: 14px;
}

.glass-card {
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.sidebar {
  width: 236px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  color: var(--primary);
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-title {
  width: 100%;
  border: 0;
  background: transparent;
  color: #7a8398;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
}

.nav-group-title:hover {
  color: var(--primary);
}

.nav-group-title .material-symbols-outlined {
  font-size: 16px;
  min-width: 16px;
  transition: transform 0.16s ease;
}

.nav-group.collapsed .nav-group-title .material-symbols-outlined {
  transform: rotate(-90deg);
}

.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.nav-group.has-active .nav-group-title {
  color: var(--primary);
}

.nav-item {
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  color: #4f576b;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  background: #ecf3ff;
}

.nav-item.active {
  background: #e4efff;
  color: var(--primary);
  font-weight: 600;
}

.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar {
  height: 74px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h2 {
  margin: 0;
  font-size: 19px;
}

.topbar p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

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

.icon-btn,
.ghost-btn,
.primary-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4d5568;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

.icon-btn {
  width: 34px;
  padding: 0;
}

.primary-btn {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #0b63d8, #2f86ff);
  font-weight: 600;
}

.view {
  display: none;
  min-height: 0;
  flex: 1;
}

.view.active {
  display: block;
}

.panel {
  height: 100%;
  padding: 12px;
}

.legacy-panel {
  overflow: auto;
}

.legacy-panel .panel {
  height: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.legacy-panel .lower {
  margin-top: 12px;
}

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

.legacy-panel .section-head h2,
.legacy-panel .panel-head h3 {
  margin: 0;
}

.legacy-panel .section-head h2 {
  font-size: 20px;
}

.legacy-panel .panel-head h3 {
  font-size: 15px;
}

.legacy-panel .eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.legacy-panel .muted,
.legacy-panel .note {
  color: var(--muted);
  font-size: 12px;
}

.legacy-panel .metric-grid,
.legacy-panel .order-dashboard-grid,
.legacy-panel .settings-grid,
.legacy-panel .master-grid,
.legacy-panel .report-grid,
.legacy-panel .kanban,
.legacy-panel .receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.legacy-panel .metric-card,
.legacy-panel .order-dashboard-card,
.legacy-panel .mini-stat,
.legacy-panel .master-grid article,
.legacy-panel .report-grid article,
.legacy-panel .settings-grid article,
.legacy-panel .receipt-grid article,
.legacy-panel .kanban article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

.legacy-panel .metric-card span,
.legacy-panel .order-dashboard-card span,
.legacy-panel .mini-stat span,
.legacy-panel .report-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.legacy-panel .metric-card strong,
.legacy-panel .order-dashboard-card strong,
.legacy-panel .mini-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--primary);
  font-size: 21px;
}

.legacy-panel .metric-card small,
.legacy-panel .order-dashboard-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.legacy-panel .metric-card.accent,
.legacy-panel .order-dashboard-card.success {
  background: #f0f8ff;
  border-color: #cfe3ff;
}

.legacy-panel .order-dashboard-card.warning {
  background: #fff8ed;
  border-color: #f4dfbd;
}

.legacy-panel .two-column,
.legacy-panel .two-col-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.legacy-panel .wide {
  min-width: 0;
}

.legacy-panel .table-actions,
.legacy-panel .sales-order-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legacy-panel .primary-btn,
.legacy-panel .ghost-btn,
.legacy-panel button {
  min-height: 30px;
  border-radius: 9px;
}

.legacy-panel table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

.legacy-panel table th,
.legacy-panel table td {
  border-bottom: 1px solid #edf0f5;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 12.5px;
}

.legacy-panel table th {
  color: #677086;
  background: #f9fbff;
  font-weight: 600;
}

.legacy-panel .panel > table,
.legacy-panel .template-table-scroll,
.legacy-panel .sales-order-panel > table {
  display: block;
  overflow: auto;
}

.legacy-panel .form-grid,
.legacy-panel .compact-form,
.legacy-panel .report-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.legacy-panel .form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #4f576b;
  font-size: 12px;
}

.legacy-panel input,
.legacy-panel select,
.legacy-panel textarea {
  border: 1px solid #dfe4ee;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 0 9px;
}

.legacy-panel input,
.legacy-panel select {
  height: 32px;
}

.legacy-panel textarea,
.legacy-panel .mail-editor {
  width: 100%;
  min-height: 150px;
  padding: 10px;
  line-height: 1.55;
  resize: vertical;
}

.legacy-panel .segmented {
  flex-wrap: wrap;
  border-radius: 12px;
  padding: 4px;
}

.legacy-panel .segmented button {
  border: 0;
  background: transparent;
  color: #55607a;
  padding: 6px 10px;
  cursor: pointer;
}

.legacy-panel .segmented button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(11, 99, 216, 0.15);
  font-weight: 600;
}

.legacy-panel .pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #59637a;
  font-size: 11px;
  font-weight: 600;
}

.legacy-panel .pill.green {
  background: #e9f8ef;
  color: #1b7f43;
}

.legacy-panel .pill.amber {
  background: #fff4dd;
  color: #a06412;
}

.legacy-panel .selected-row {
  background: #e8f1ff;
}

.legacy-panel .row-actions {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
}

.legacy-panel .row-actions button {
  border: 1px solid #e6e9f0;
  background: #fff;
  color: #4d5568;
  padding: 4px 8px;
  cursor: pointer;
}

.legacy-panel .row-actions button:hover {
  color: var(--primary);
  background: #eef5ff;
}

.legacy-panel .row-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.legacy-panel .table-total-bar,
.legacy-panel .status-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #4f576b;
  font-size: 12px;
}

.legacy-panel .status-flow span,
.legacy-panel .table-total-bar strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
}

.legacy-panel .status-flow .active,
.legacy-panel .table-total-bar strong {
  color: var(--primary);
  background: #edf4ff;
  border-color: #cfe0ff;
}

.legacy-panel .receipt-thumb,
.legacy-panel .phone-frame,
.legacy-panel .map-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
}

.legacy-panel .template-workspace,
.legacy-panel .template-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
}

.legacy-panel .template-list,
.legacy-panel .template-list-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legacy-panel .template-list-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.legacy-panel .template-list-item.active {
  color: var(--primary);
  border-color: #bfd6ff;
  background: #edf4ff;
}

.legacy-panel .template-preview-panel {
  display: none;
}

.legacy-panel .template-preview-panel.active {
  display: block;
}

@media (max-width: 1100px) {
  .legacy-panel .two-column,
  .legacy-panel .two-col-grid,
  .legacy-panel .template-workspace,
  .legacy-panel .template-layout {
    grid-template-columns: 1fr;
  }
}

.customer-panel,
.order-panel,
.freight-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-split-workspace {
  --customer-detail-height: 260px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-select {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  color: #4d5568;
}

.segmented {
  display: inline-flex;
  border-radius: 999px;
  background: #eaf1fd;
  padding: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: #4d5568;
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 13px;
  cursor: pointer;
}

.seg-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(11, 99, 216, 0.17);
  font-weight: 600;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 13px;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.customer-table-card {
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  min-height: 130px;
}

.customer-table-card .table-wrap {
  height: 100%;
}

.table-wrap {
  overflow: auto;
}

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

#customer-table {
  table-layout: auto;
  min-width: 980px;
}

#customer-table th,
#customer-table td {
  width: auto;
}

#customer-table th:nth-child(1),
#customer-table td:nth-child(1) {
  width: 118px;
}

#customer-table th:nth-child(2),
#customer-table td:nth-child(2) {
  min-width: 170px;
  width: 28%;
}

#customer-table th:nth-child(3),
#customer-table td:nth-child(3),
#customer-table th:nth-child(4),
#customer-table td:nth-child(4) {
  width: 92px;
}

#customer-table th:nth-child(5),
#customer-table td:nth-child(5),
#customer-table th:nth-child(6),
#customer-table td:nth-child(6) {
  width: 130px;
}

#customer-table th:nth-child(7),
#customer-table td:nth-child(7) {
  width: 120px;
}

#customer-table th:nth-child(8),
#customer-table td:nth-child(8) {
  width: 112px;
}

#customer-table th:nth-child(9),
#customer-table td:nth-child(9) {
  width: 126px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable:hover,
.data-table th.sortable.active {
  color: var(--primary);
}

.data-table th {
  font-size: 12px;
  color: #677086;
  font-weight: 600;
  background: #f9fbff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table.compact th,
.data-table.compact td {
  padding: 8px 10px;
  font-size: 12.5px;
}

.customer-row.selected {
  background: #e8f1ff;
}

.table-op {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #4d5568;
  border: 1px solid #e6e9f0;
  background: #fff;
  cursor: pointer;
}

.table-op:hover {
  color: var(--primary);
  border-color: #caddff;
  background: #eef5ff;
}

.table-check {
  width: 16px;
  height: 16px;
}

.op-group {
  display: inline-flex;
  gap: 5px;
}

.bottom-detail {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  padding: 10px;
  flex: 0 0 var(--customer-detail-height);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bottom-detail.collapsed {
  flex-basis: 42px;
  min-height: 42px;
  overflow: hidden;
}

.customer-resizer {
  position: relative;
  flex: 0 0 9px;
  border-top: 1px solid #eef1f6;
  background: linear-gradient(#fbfcff, #f3f6fb);
  cursor: row-resize;
}

.customer-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 3px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #c9d1df;
}

.customer-resizer:hover,
.customer-resizer:focus {
  outline: none;
  background: #edf5ff;
}

.customer-resizer:hover::before,
.customer-resizer:focus::before {
  background: var(--primary);
}

.customer-split-workspace.is-resizing,
.customer-split-workspace.is-resizing * {
  user-select: none;
}

.customer-split-workspace.is-resizing .customer-resizer {
  background: #e8f2ff;
}

.detail-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  min-height: 32px;
}

.detail-tab-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.detail-collapse-btn {
  width: 32px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
}

.tab-btn {
  border: none;
  background: transparent;
  color: #55607a;
  font-size: 12px;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.detail-content {
  display: none;
  padding-top: 8px;
  min-height: 0;
  overflow: auto;
}

.detail-content.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.detail-content[data-detail-pane="orders"] {
  overflow: hidden;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.contact-card {
  border: 1px solid #ecf0f8;
  border-radius: 10px;
  padding: 9px;
  background: #fafcff;
  font-size: 12px;
}

.contact-card h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

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

.kv {
  border: 1px solid #edf0f7;
  border-radius: 10px;
  padding: 8px;
  background: #fafcff;
  min-height: 66px;
}

.kv .k {
  font-size: 11px;
  color: var(--muted);
}

.kv .v {
  font-size: 12px;
  margin-top: 4px;
}

.detail-orders-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
}

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

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

.stat-card .name {
  font-size: 12px;
  color: var(--muted);
}

.stat-card .num {
  margin-top: 3px;
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

.filter-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #59637a;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chip.active {
  border-color: #bed6ff;
  color: var(--primary);
  background: #edf4ff;
}

.filter-selects {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.order-batch-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.order-batch-toolbar .danger {
  color: #a53030;
  border-color: #f1c6c6;
}

.order-batch-toolbar .danger:hover {
  background: #fff5f5;
  border-color: #f7c2c2;
}

.filter-selects select,
.filter-selects input,
.form-grid input,
.form-grid select,
.form-grid textarea,
.currency-summary input {
  height: 33px;
  border-radius: 8px;
  border: 1px solid #dfe4ee;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
}

.form-grid textarea {
  height: auto;
  padding-top: 8px;
}

.order-table-card {
  flex: 1;
  min-height: 0;
}

#order-table-summary-row {
  background: #f8fbff;
  position: sticky;
  bottom: 0;
  z-index: 3;
}

#order-table-summary-row td {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  border-top: 2px solid #d9e4f2;
}

.freight-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 10px;
}

.tree-pane,
.template-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
  min-height: 0;
}

.template-pane {
  display: flex;
  flex-direction: column;
}

.template-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.tree-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: calc(100% - 52px);
  overflow: auto;
}

.tree-item {
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: #3f4b64;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-item:hover {
  background: #edf4ff;
}

.tree-item .branch {
  font-weight: 600;
  color: #2f3b53;
}

.tree-city {
  font-weight: 600;
  color: #203052;
}

.tree-region {
  margin-left: 22px;
}

.tree-district {
  margin-left: 44px;
  color: #55607d;
}

.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pane-head h3 {
  margin: 0;
  font-size: 14px;
}

.profit-up {
  color: #1f9a5b;
  font-weight: 600;
}

.profit-down {
  color: #d95454;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 25, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99;
}

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

.modal-card {
  width: min(1480px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
}

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

.modal-foot {
  border-bottom: none;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 8px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 10px 12px;
  overflow: auto;
  min-height: 0;
}

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

.modal-body .form-grid label {
  min-height: 61px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #4d566a;
}

.span-2 {
  grid-column: span 2;
}

.form-grid label.hidden {
  display: none;
}

.detail-tab-head {
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.modal-tab {
  display: none;
  padding-top: 9px;
}

.modal-tab.active {
  display: block;
}

.switch-note {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.fee-table-wrap {
  border: 1px solid #ebeff6;
  border-radius: 10px;
  overflow: auto;
}

.fee-table-wrap.hidden {
  display: none;
}

.fee-upload-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fee-upload-btn {
  height: 24px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f4f8ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 7px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.fee-upload-btn .material-symbols-outlined {
  font-size: 15px;
  min-width: 15px;
}

.fee-upload-btn.uploaded {
  border-color: #bfe7ce;
  background: #eefaf2;
  color: #1f7a45;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tag {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid #dfe7f7;
  background: #f5f9ff;
  color: #355c93;
}

.tag.active {
  background: #dbe8ff;
  border-color: #8cb6ff;
  color: #103e7f;
}

.template-select-row {
  display: flex;
  gap: 6px;
}

.template-select-row .ghost-btn {
  white-space: nowrap;
}

.driver-cost-summary {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #dfe9fb;
  background: #f6f9ff;
  color: #344a68;
  font-size: 12px;
  line-height: 1.6;
}

.template-info {
  margin-top: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #dfe9fb;
  background: #f6f9ff;
  font-size: 12px;
  color: #344a68;
}

.currency-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.currency-summary label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #4d566a;
}

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

.attachment-list {
  margin-top: 10px;
  border: 1px dashed #cfd8eb;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: #4d566a;
  background: #f9fbff;
}

.attachment-filter-btn.active {
  color: var(--primary);
  border-color: #bed6ff;
  background: #edf4ff;
}

.file-upload-btn {
  position: relative;
  overflow: hidden;
}

.file-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.muted-note {
  color: #607188;
  font-size: 12px;
  margin: 0 0 6px;
}

.attachment-list-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 6px;
  background: #fff;
}

.attachment-list-name {
  font-size: 12px;
  color: #34445d;
}

.attachment-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #d6e1f5;
  background: #f5f8ff;
}

.badge-success {
  color: #1d7f4f;
  border-color: #bbe3c7;
  background: #edf9f1;
}

.badge-warning {
  color: #8b5300;
  border-color: #ffd6a8;
  background: #fff4e0;
}

.hidden {
  display: none !important;
}

@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

/* P0.2 独立业务页面 */
.simple-page-panel {
  min-height: calc(100vh - 132px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--border);
}

.section-strip h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

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

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

.mini-stat-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.fill-table-card {
  flex: 1;
  min-height: 420px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 420px;
}

.sub-card,
.kanban-lane {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  padding: 16px;
}

.sub-card h4,
.kanban-lane h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}

.list-row-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, .9fr) minmax(120px, .9fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f7;
}

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

.list-row-card strong,
.list-row-card b {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.list-row-card span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.soft-alert {
  justify-self: end;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  border: 1px solid #dce6f7;
  background: #f7faff;
  color: #526176;
  white-space: nowrap;
}

.soft-alert.ok {
  color: #16834f;
  border-color: #bfe8d0;
  background: #effaf3;
}

.soft-alert.warn {
  color: #9a5a00;
  border-color: #f5d39c;
  background: #fff7e8;
}

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

.kanban-lane h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-lane h4 span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}

.task-card {
  border: 1px solid #e9eef7;
  background: #fbfcff;
  border-radius: 14px;
  padding: 11px;
  margin-bottom: 10px;
}

.task-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f7;
}

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

.rank-row b {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #edf4ff;
  color: var(--primary);
}

.rank-row span {
  color: var(--text);
  font-weight: 600;
}

.rank-row strong {
  color: #0a8f5a;
}

@media (max-width: 1280px) {
  .compact-stats,
  .kanban-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

/* 客户/供应商资料弹窗 */
.customer-edit-card {
  max-width: 880px;
}

.customer-modal-pane {
  display: none;
  margin-top: 10px;
}

.customer-modal-pane.active {
  display: block;
}

.customer-edit-card .form-grid label {
  min-width: 0;
}

.local-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

.nav-item .local-icon {
  width: 22px;
  min-width: 22px;
  font-size: 15px;
}

.icon-btn .local-icon,
.primary-btn .local-icon,
.ghost-btn .local-icon {
  margin-right: 4px;
}

.table-op .local-icon {
  min-width: 24px;
  font-size: 12px;
}

/* 左侧菜单恢复上一版图标风格 */
.menu-icon {
  width: 22px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
