:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f8f9fa;
  --panel-hover: #f2f4f6;
  --line: #f3c99e;
  --line-soft: #e5e7eb;
  --text: #17191c;
  --muted: #69707a;
  --gold: #d96f00;
  --orange: #f28a1a;
  --green: #239b62;
  --red: #d84c3f;
  --sidebar-width: 252px;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

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

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.55fr);
  background: #f5f6f8;
}

.login-visual {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 82%);
}

.login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
}

.visual-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 44%, rgba(245, 246, 248, 0.96) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.56));
}

.brand-lockup {
  position: absolute;
  left: clamp(40px, 7vw, 112px);
  bottom: clamp(48px, 9vh, 96px);
  z-index: 3;
}

.brand-eyebrow,
.panel-eyebrow,
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-name {
  margin-top: 12px;
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
}

.brand-sub {
  margin-top: 12px;
  color: #ffe0bd;
  font-size: 17px;
  font-weight: 700;
}

.login-panel {
  position: relative;
  align-self: center;
  width: min(388px, calc(100% - 48px));
  margin: 32px auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(17, 24, 39, 0.14);
}

.login-panel::before {
  position: absolute;
  top: -1px;
  right: 36px;
  left: 36px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.panel-title {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.panel-note {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

label {
  display: block;
  margin-bottom: 18px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #3f454d;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  outline: none;
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(246, 201, 120, 0.25);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(246, 201, 120, 0.72);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(246, 201, 120, 0.08);
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.primary,
.ghost,
.small-btn,
.danger,
.text-action {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.primary:hover,
.ghost:hover,
.small-btn:hover,
.danger:hover {
  transform: translateY(-1px);
}

.primary {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  border: 0;
  background: var(--orange);
  box-shadow: 0 12px 26px rgba(242, 138, 26, 0.2);
}

.primary:hover {
  box-shadow: 0 14px 34px rgba(242, 138, 26, 0.28);
}

.ghost {
  color: var(--gold);
  border: 1px solid rgba(246, 201, 120, 0.34);
  background: rgba(246, 201, 120, 0.06);
}

.small-btn {
  color: #fff;
  border: 0;
  background: var(--orange);
}

.danger {
  color: #fff;
  border: 1px solid rgba(255, 123, 101, 0.3);
  background: rgba(255, 123, 101, 0.7);
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 22px;
  border-right: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(246, 201, 120, 0.04), transparent 20%),
    var(--bg-soft);
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #17110a;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--orange), var(--gold));
  box-shadow: 0 9px 24px rgba(242, 138, 26, 0.18);
  font-size: 21px;
  font-weight: 950;
}

.logo-main {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-sub {
  margin-top: 4px;
  color: var(--gold);
  font-size: 11px;
}

nav {
  display: grid;
  gap: 5px;
  margin-top: 20px;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #69707a;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: #f5f6f8;
}

.nav-indicator {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #c8cdd3;
  transition: width 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.nav-item.active {
  color: var(--text);
  border-color: rgba(246, 201, 120, 0.16);
  background: linear-gradient(90deg, rgba(242, 138, 26, 0.15), rgba(246, 201, 120, 0.035));
  font-weight: 800;
}

.nav-item.active .nav-indicator {
  width: 16px;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(242, 138, 26, 0.6);
}

.logout {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
}

.main {
  min-width: 0;
  padding: 30px clamp(24px, 3vw, 44px) 48px;
}

.topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 34px);
  letter-spacing: -0.04em;
}

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

.account-pill,
.tag,
.count-badge,
.status-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.account-pill {
  color: #3f454d;
  border: 1px solid var(--line-soft);
  background: #fff;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 213, 138, 0.55);
}

.dashboard-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.update-time {
  color: #6f7378;
  font-size: 11px;
}

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

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

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

.card {
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
}

.metric-card {
  position: relative;
  min-height: 148px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  right: -24px;
  bottom: -44px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  content: "";
  background: rgba(246, 201, 120, 0.035);
  filter: blur(2px);
}

.metric-top,
.metric-value,
.card-heading,
.inventory-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-label {
  color: #3f454d;
  font-size: 14px;
  font-weight: 800;
}

.metric-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(246, 201, 120, 0.45);
}

.metric-card.healthy .metric-dot {
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 213, 138, 0.45);
}

.metric-value {
  justify-content: flex-start;
  margin-top: 16px;
}

.metric-num {
  color: var(--text);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.metric-unit {
  align-self: flex-end;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.metric-line {
  position: absolute;
  right: 20px;
  bottom: 16px;
  left: 20px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceff2;
}

.metric-line::after {
  display: block;
  width: 42%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, var(--orange), var(--gold));
}

.dashboard-focus {
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  margin-top: 16px;
}

.task-card,
.inventory-health {
  min-height: 286px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 12px;
}

.recent-head {
  margin-top: 28px;
}

.section-title {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.application-search {
  width: min(340px, 100%);
}

.application-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.application-tab {
  padding: 9px 16px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}

.application-tab.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.application-result-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.application-type {
  display: inline-flex;
  padding: 5px 9px;
  color: #8a4a00;
  border-radius: 999px;
  background: #fff2df;
  font-size: 12px;
  font-weight: 800;
}

.application-type.store {
  color: #245f48;
  background: #e8f7ef;
}

.material-summary {
  display: grid;
  gap: 3px;
}

.material-summary strong {
  color: var(--text);
  font-size: 13px;
}

.material-summary span {
  color: var(--muted);
  font-size: 11px;
}

.count-badge {
  color: var(--gold);
  border: 1px solid rgba(246, 201, 120, 0.2);
  background: rgba(246, 201, 120, 0.07);
}

.task-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.task-row {
  display: grid;
  min-height: 56px;
  align-items: center;
  grid-template-columns: 92px minmax(0, 1fr) 24px;
  gap: 12px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f8f9fa;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.task-row:hover {
  border-color: rgba(246, 201, 120, 0.16);
  background: rgba(246, 201, 120, 0.055);
  transform: translateX(2px);
}

.task-type {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.task-copy {
  min-width: 0;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-arrow {
  color: #696c70;
  text-align: right;
}

.inventory-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 28px;
}

.inventory-total strong {
  color: var(--gold);
  font-size: 48px;
  line-height: 1;
}

.inventory-total span {
  color: #696c70;
  font-size: 24px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceff2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  box-shadow: 0 0 18px rgba(242, 138, 26, 0.3);
}

.inventory-caption {
  align-items: flex-start;
  flex-direction: column;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

/* ===== 库存概况卡片 ===== */
.inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.inv-stat {
  border: 1px solid #eceff2;
  border-radius: 10px;
  background: rgba(236, 239, 242, 0.35);
  padding: 10px 12px;
}

.inv-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.inv-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #1c1f24;
}

.inv-coverage {
  margin-top: 16px;
}

.inv-coverage .progress-track {
  margin-top: 0;
}

.inv-coverage .inventory-caption {
  margin-top: 12px;
}

.cov-num {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.inv-status-line {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
}

.inv-status-line.risk {
  color: var(--red);
}

.inv-status-line.tight {
  color: var(--orange);
}

.inv-status-line.ok {
  color: var(--green);
}

.inv-counts {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(236, 239, 242, 0.5);
  color: #1c1f24;
  font-size: 12px;
  font-weight: 700;
}

.restock-list {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eceff2;
}

.restock-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.restock-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}

.restock-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.restock-meta {
  flex-shrink: 0;
  color: var(--muted);
  white-space: nowrap;
}

.restock-cov {
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

.restock-empty {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.inv-empty {
  margin-top: 18px;
  padding: 16px 12px;
  border-radius: 10px;
  background: rgba(236, 239, 242, 0.5);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.text-action {
  color: var(--gold);
  border: 0;
  background: transparent;
}

.text-action:hover {
  color: #b85d00;
}

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

.product-create-card {
  margin-bottom: 16px;
  border-color: rgba(246, 201, 120, 0.22);
}

.product-form-grid {
  margin-top: 22px;
}

.product-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 4px;
}

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

.product-table-card input {
  min-width: 92px;
}

.product-table-card {
  overflow-x: auto;
}

.product-table-card table {
  min-width: 1500px;
}

.toolbar .product-search {
  width: min(280px, 38vw);
  min-width: 210px;
  min-height: 40px;
  background: #fff;
}

.provider-stock-head {
  margin-top: 30px;
}

.provider-stock-table table {
  min-width: 1120px;
}

.provider-stock-table input {
  min-width: 92px;
}

.provider-display-stock {
  color: var(--gold);
}

.warranty-search-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.warranty-search-copy {
  max-width: 440px;
}

.warranty-filters {
  display: grid;
  width: min(610px, 58%);
  grid-template-columns: minmax(280px, 1fr) 160px;
  gap: 12px;
}

.warranty-filters label {
  margin: 0;
}

.warranty-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 2px 10px;
  color: #777b80;
  font-size: 12px;
}

.warranty-result-meta span:first-child {
  color: var(--gold);
  font-weight: 800;
}

.warranty-table-card table {
  min-width: 1380px;
}

.cell-stack,
.warranty-period,
.empty-result {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cell-stack span,
.warranty-period span,
.empty-result span {
  color: var(--muted);
  font-size: 12px;
}

.warranty-id,
.mileage-value {
  color: #9c4f00;
}

.warranty-period {
  white-space: nowrap;
}

.empty-result {
  align-items: center;
  padding: 30px 16px;
  text-align: center;
}

.table-card {
  padding: 0;
  overflow-x: auto;
}

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

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--gold);
  background: #fff8f0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:hover {
  background: #f8f9fa;
}

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

.status-ok {
  color: var(--green);
}

.status-wait {
  color: var(--gold);
}

.status-bad {
  color: var(--red);
}

.status-chip {
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid currentColor;
  background: #fff;
  font-weight: 800;
}

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

.form-grid .wide {
  grid-column: span 3;
}

.toast {
  position: fixed;
  top: 26px;
  left: 50%;
  z-index: 99;
  padding: 11px 17px;
  color: #15100a;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  font-size: 13px;
  font-weight: 900;
  transform: translateX(-50%);
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 220px;
  }

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

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

  .inventory-health {
    min-height: 230px;
  }
}

@media (max-width: 760px) {
  .login-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 42vh;
  }

  .brand-lockup {
    left: 24px;
    bottom: 34px;
  }

  .brand-name {
    font-size: 42px;
  }

  .login-panel {
    margin: -24px auto 32px;
  }

  .sidebar {
    position: static;
    height: auto;
    padding-bottom: 18px;
  }

  nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

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

  .logout {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .main {
    padding: 22px 16px 36px;
  }

  .topbar,
  .dashboard-intro,
  .section-head,
  .warranty-search-card,
  .warranty-result-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .two,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: span 1;
  }

  .warranty-filters {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .product-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .product-search {
    width: 100%;
    min-width: 0;
  }

  .task-row {
    grid-template-columns: 78px minmax(0, 1fr) 18px;
  }

  .modal-overlay {
    padding: 24px 12px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid .full {
    grid-column: span 1;
  }

  .pagination {
    justify-content: center;
  }
}

/* ===== API 接入后的新增组件样式 ===== */

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.toolbar {
  gap: 10px;
}

.toolbar select,
.status-filter select {
  width: auto;
  min-width: 148px;
}

.search-field {
  flex: 1 1 240px;
  min-width: 200px;
}

.req-mark {
  margin-left: 2px;
  color: var(--red);
}

.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.masked-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* 列表加载 / 空 / 错误状态 */
.state-box {
  padding: 40px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.state-box .state-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.state-box .retry-btn {
  margin-top: 14px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
}

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

.page-btn {
  min-height: 32px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.page-btn:hover:not(:disabled) {
  color: var(--gold);
  border-color: var(--gold);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.5);
}

.modal {
  width: min(560px, 100%);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal.wide {
  width: min(880px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-title {
  font-size: 16px;
  font-weight: 900;
}

.modal-close {
  padding: 2px 6px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.modal-body {
  padding: 20px 22px;
}

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

.modal-error {
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 20px;
}

.modal-actions .small-btn,
.modal-actions .danger,
.modal-actions .ghost {
  min-height: 36px;
}

.modal-body label {
  margin-bottom: 14px;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 7px;
}

.field-with-action input { min-width: 0; }
.field-with-action .ghost { min-width: 88px; white-space: nowrap; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* 物流详情：与 Figma 设计稿保持一致，突出承运商、状态和时间轴 */
.modal.logistics-modal {
  width: min(720px, 100%);
  border-radius: 20px;
  overflow: hidden;
}

.logistics-modal .modal-head {
  min-height: 76px;
  padding: 18px 28px;
}

.logistics-modal .modal-title {
  font-size: 20px;
}

.logistics-modal .modal-body {
  padding: 24px 28px 28px;
}

.logistics-loading {
  padding: 52px 0;
  color: var(--muted);
  text-align: center;
}

.logistics-status-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff7ea;
}

.logistics-carrier-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--orange);
}

.logistics-carrier-icon::before {
  position: absolute;
  left: 11px;
  top: 14px;
  width: 17px;
  height: 12px;
  border: 2px solid #fff;
  content: "";
}

.logistics-carrier-icon::after {
  position: absolute;
  right: 7px;
  top: 19px;
  width: 8px;
  height: 9px;
  border: 2px solid #fff;
  border-left: 0;
  content: "";
}

.logistics-carrier-icon span::before,
.logistics-carrier-icon span::after {
  position: absolute;
  bottom: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.logistics-carrier-icon span::before { left: 14px; }
.logistics-carrier-icon span::after { right: 8px; }

.logistics-carrier-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.logistics-carrier-copy strong {
  font-size: 18px;
}

.logistics-carrier-copy span,
.logistics-section-head span,
.logistics-trace span {
  color: var(--muted);
  font-size: 12px;
}

.logistics-state {
  padding: 7px 12px;
  color: var(--green);
  border-radius: 999px;
  background: #e8f8f0;
  font-size: 13px;
  font-weight: 700;
}

.logistics-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 12px;
}

.logistics-message {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #9a5a00;
  border-radius: 10px;
  background: #fff8e7;
  font-size: 12px;
}

.logistics-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

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

.logistics-timeline {
  margin-top: 10px;
}

.logistics-trace {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  min-height: 68px;
  padding: 8px 4px;
}

.logistics-trace i {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #c0c5cf;
}

.logistics-trace:not(:last-child) i::after {
  position: absolute;
  top: 14px;
  left: 4px;
  width: 2px;
  height: 44px;
  background: var(--line-soft);
  content: "";
}

.logistics-trace.is-latest i { background: var(--orange); }

.logistics-trace > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.logistics-trace strong {
  font-size: 13px;
}

.logistics-empty,
.logistics-error {
  padding: 34px 18px;
  color: var(--muted);
  border-radius: 12px;
  background: var(--panel-2);
  text-align: center;
}

.logistics-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logistics-error strong { color: var(--text); }

@media (max-width: 640px) {
  .logistics-status-card { grid-template-columns: 44px minmax(0, 1fr); }
  .logistics-state { grid-column: 2; justify-self: start; }
  .logistics-modal .modal-body { padding: 20px; }
}

/* 详情分组 */
.detail-group {
  margin-bottom: 20px;
}

.detail-group:last-child {
  margin-bottom: 0;
}

.detail-group-title {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.detail-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
}

.detail-item dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.detail-item dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}

.detail-item dd.muted {
  color: var(--muted);
  font-weight: 400;
}

/* 审核记录 */
.review-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-item {
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  border-radius: 0 10px 10px 0;
  background: var(--panel-2);
}

.review-item strong {
  font-size: 13px;
}

.review-item .meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

/* 证照 */
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
}

.doc-row:last-child {
  margin-bottom: 0;
}

.doc-name {
  font-size: 13px;
  font-weight: 700;
}

.doc-status {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.doc-preview {
  position: relative;
  text-align: center;
}

.doc-preview img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

.doc-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: rgba(217, 111, 0, 0.4);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  transform: rotate(-18deg);
}

/* 质保变更对比 */
.diff-table {
  min-width: 0;
}

.diff-table th {
  background: var(--panel-2);
}

.diff-table td,
.diff-table th {
  border: 1px solid var(--line-soft);
}

.diff-original {
  color: var(--red);
  text-decoration: line-through;
}

.diff-new {
  color: var(--green);
  font-weight: 800;
}

/* 表格内联编辑 */
.product-table-card select,
.provider-stock-table select {
  width: auto;
  min-height: 36px;
}
.settings-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:24px;max-width:1120px}.settings-form,.settings-preview{padding:28px}.settings-form label{display:block;font-weight:600;margin:24px 0 12px}.settings-form input,.settings-form textarea{display:block;width:100%;box-sizing:border-box;margin-top:12px;padding:14px;border:1px solid #e5e7eb;border-radius:12px;font:inherit}.settings-muted{font-size:14px;color:#7a818b;line-height:1.8}.settings-preview{text-align:center;align-self:start}.settings-preview img{max-width:220px;max-height:220px;margin:24px auto}.settings-preview p{white-space:pre-wrap;overflow-wrap:anywhere}.settings-preview-confirm{display:block;background:#f28b13;color:#fff;padding:14px;border-radius:12px;margin-top:24px}.nav-section-label{padding:20px 18px 7px;color:#949aa3;font-size:11px;letter-spacing:1px}@media(max-width:850px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:850px){.nav-section-label{display:none}}
.toolbar input,.toolbar select,.catalog-toolbar input,.catalog-toolbar select{box-sizing:border-box;min-height:44px}.modal-body input:not([type=checkbox]):not([type=radio]):not([type=file]),.modal-body select{box-sizing:border-box;min-height:44px}.modal-body textarea{box-sizing:border-box;min-height:104px;resize:vertical}.actions{gap:8px}.settings-form,.settings-preview{min-width:0}
.sidebar{display:flex;flex-direction:column;box-sizing:border-box}.sidebar .logo-block{flex-shrink:0}.sidebar nav{flex:1;min-height:0;overflow-y:auto;align-content:start;padding-bottom:12px}.sidebar .logout{position:static;flex-shrink:0;width:100%;margin-top:14px}.nav-section-label{padding-top:12px;padding-bottom:4px}@media(max-width:760px){.sidebar{height:auto}.sidebar nav{flex:none;overflow-x:auto}}
.assistant-file-row{display:flex;align-items:center;gap:8px}.settings-form .assistant-file-row input{min-width:0;flex:1}.assistant-remove-qr{flex:none;width:36px;height:36px;padding:0;font-size:26px;line-height:1;border-radius:8px;margin-top:12px}.assistant-remove-qr[hidden]{display:none}
.assistant-contact-row{display:flex;align-items:center;justify-content:center;gap:12px;margin:16px 0}.assistant-contact-row p{min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.assistant-contact-row .assistant-copy{flex:none;padding:6px 12px;font-size:13px;min-height:34px}.assistant-copy:disabled{opacity:.5;cursor:not-allowed}
