:root {
  --ink: #17201d;
  --ink-soft: #34423d;
  --muted: #6f7b76;
  --muted-light: #97a19d;
  --line: #dfe5e2;
  --line-strong: #cbd4d0;
  --surface: #ffffff;
  --canvas: #f4f6f5;
  --canvas-strong: #edf1ef;
  --green: #147a57;
  --green-dark: #0d5f43;
  --green-soft: #e8f3ee;
  --orange: #bd5a24;
  --orange-soft: #fff0e7;
  --red: #b43c3c;
  --red-soft: #fcecec;
  --yellow: #8a6508;
  --yellow-soft: #f8f1dc;
  --shadow: 0 12px 34px rgba(22, 35, 30, 0.12);
  --sidebar-width: 228px;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px 18px;
  background: var(--canvas-strong);
}

.auth-panel {
  width: min(100%, 410px);
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 16px 44px rgba(22, 35, 30, .1);
}

.auth-brand { display: flex; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-brand .brand-mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.auth-brand > div:last-child { margin-left: 11px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 14px; }
.auth-brand span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.auth-heading { padding: 27px 0 20px; }
.auth-heading h1 { font-size: 22px; }
.auth-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.auth-field { display: block; margin-bottom: 15px; }
.auth-field > span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.auth-field > div { display: flex; height: 42px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); }
.auth-field > div:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 122, 87, .09); }
.auth-field input { width: 100%; height: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); font-size: 12px; }
.auth-field input::placeholder { color: #a2aaa7; }
.remember-row { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 17px; color: var(--muted); font-size: 10px; cursor: pointer; }
.remember-row input { width: 14px; height: 14px; accent-color: var(--green); }
.auth-error { margin: 0 0 14px; padding: 9px 11px; background: var(--red-soft); border-left: 3px solid var(--red); color: #923434; font-size: 10px; line-height: 1.5; }
.auth-submit { width: 100%; min-height: 41px; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: var(--muted-light); font-size: 9px; }
.auth-security .icon { width: 12px; height: 12px; }

button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  background: #17201d;
  color: #e8eeeb;
  border-right: 1px solid #29332f;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid #2c3733;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 36px;
  border: 1px solid #4e625a;
  border-radius: 5px;
  color: #f3f7f5;
  font-size: 11px;
  font-weight: 800;
}

.brand-copy { min-width: 0; margin-left: 11px; }
.brand-copy strong { display: block; color: #fff; font-size: 14px; }
.brand-copy span { display: block; margin-top: 3px; color: #9fafaa; font-size: 11px; }

.main-nav { padding: 18px 12px; }

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 5px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #aab8b3;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover { background: #222c28; color: #eef4f1; }
.nav-item.is-active { background: #25332e; border-color: #34473f; color: #fff; }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 23px; background: #45ad81; }
.nav-item .icon { width: 18px; height: 18px; }

.nav-count {
  min-width: 23px;
  padding: 2px 6px;
  border: 1px solid #3f514a;
  border-radius: 999px;
  color: #b9c7c2;
  font-size: 10px;
  text-align: center;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 20px;
  border-top: 1px solid #2c3733;
}

.connection-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #75817d; box-shadow: 0 0 0 4px rgba(117, 129, 125, .12); }
.connection-dot.is-online { background: #4bb789; box-shadow: 0 0 0 4px rgba(75, 183, 137, .12); }
.connection-dot.is-error { background: #df7474; box-shadow: 0 0 0 4px rgba(223, 116, 116, .12); }
.sidebar-foot .connection-copy { min-width: 0; flex: 1; }
.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { color: #dfe8e4; font-size: 11px; }
.sidebar-foot div span { margin-top: 2px; color: #7f918a; font-size: 10px; }
.sidebar-icon-button { display: grid; width: 29px; height: 29px; place-items: center; padding: 0; background: transparent; border: 1px solid #34423d; border-radius: 4px; color: #8fa099; cursor: pointer; }
.sidebar-icon-button:hover { background: #26312d; color: #fff; }
.sidebar-icon-button .icon { width: 14px; height: 14px; }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-title span, .topbar-title strong { display: block; }
.topbar-title span { color: var(--muted-light); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.topbar-title strong { margin-top: 3px; font-size: 15px; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.updated-at { color: var(--muted); font-size: 11px; }

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .segmented-control button:focus-visible, .text-button:focus-visible, .row-action:focus-visible, input:focus-visible { outline: 3px solid rgba(20, 122, 87, .18); outline-offset: 2px; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink-soft); }
.button-secondary:hover { background: var(--canvas); border-color: #aebbb5; }
.button-danger { background: var(--surface); border-color: #e1b9b9; color: var(--red); }
.button-danger:hover { background: var(--red-soft); border-color: #d79999; }
.button[disabled] { opacity: .58; cursor: wait; }

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.icon-button:hover { background: var(--canvas); }
.mobile-menu { display: none; }

.content-wrap { width: 100%; max-width: 1640px; margin: 0 auto; padding: 30px 30px 60px; }
.view { animation: viewIn .2s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.compact-heading { margin-bottom: 19px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.page-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.scope-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.scope-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.metric-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-item { min-height: 126px; padding: 22px 21px; border-right: 1px solid var(--line); }
.metric-item:last-child { border-right: 0; }
.metric-item span, .metric-item strong, .metric-item small { display: block; }
.metric-item span { color: var(--muted); font-size: 11px; }
.metric-item strong { margin-top: 11px; font-size: 27px; line-height: 1; }
.metric-item small { margin-top: 9px; color: var(--muted-light); font-size: 10px; }
.metric-profit strong { color: var(--green); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .72fr); gap: 20px; margin-top: 20px; }
.section-block { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.section-heading { display: flex; min-height: 71px; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 14px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 5px; background: none; border: 0; color: var(--green); font-size: 11px; font-weight: 650; cursor: pointer; }
.text-button .icon { width: 14px; height: 14px; }

.recent-list { min-height: 294px; }
.recent-row { display: grid; min-height: 73px; grid-template-columns: 48px minmax(180px, 1fr) 88px 118px 98px 22px; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { background: #f9fbfa; }
.recent-row:focus-visible { outline: 3px solid rgba(20, 122, 87, .16); outline-offset: -3px; }
.recent-copy { min-width: 0; }
.recent-title { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.recent-price { font-size: 12px; font-weight: 700; }
.recent-spec { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { color: var(--muted-light); font-size: 10px; }
.recent-row > .icon { width: 15px; height: 15px; color: var(--muted-light); }

.thumb {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  flex: 0 0 46px;
  background: var(--canvas-strong);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb .icon { width: 18px; height: 18px; color: #a9b3af; }

.readiness-list { padding: 8px 19px 17px; }
.readiness-row { padding: 14px 0 8px; }
.readiness-row > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.readiness-row span { color: var(--ink-soft); font-size: 11px; }
.readiness-row strong { font-size: 11px; }
.progress { height: 5px; overflow: hidden; background: var(--canvas-strong); border-radius: 999px; }
.progress i { display: block; width: 0; height: 100%; background: var(--green); border-radius: inherit; transition: width .35s ease; }

.loading-lines::before, .loading-lines::after { content: ""; display: block; height: 52px; margin: 16px 18px; background: #eff2f1; animation: loadingPulse 1.1s ease-in-out infinite alternate; border-radius: 4px; }
@keyframes loadingPulse { to { background: #f7f9f8; } }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.search-box { display: flex; width: min(420px, 100%); height: 39px; align-items: center; gap: 9px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 122, 87, .09); }
.search-box input { width: 100%; min-width: 0; height: 100%; padding: 0; background: none; border: 0; color: var(--ink); outline: 0; font-size: 12px; }
.search-box input::placeholder { color: #9ca6a2; }

.segmented-control { display: inline-flex; padding: 3px; background: var(--canvas-strong); border: 1px solid var(--line); border-radius: 5px; }
.segmented-control button { min-width: 58px; height: 31px; padding: 0 12px; background: transparent; border: 0; border-radius: 3px; color: var(--muted); font-size: 11px; cursor: pointer; }
.segmented-control button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 42, 37, .1); font-weight: 650; }

.table-frame { position: relative; min-height: 405px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.data-table { width: 100%; min-width: 1240px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.data-table th { position: sticky; top: 0; z-index: 4; height: 43px; padding: 0 12px; background: #f3f6f4; border-bottom: 1px solid var(--line-strong); color: #596660; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; vertical-align: top; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover td { background: #fafcfb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:focus-visible { outline: 3px solid rgba(20, 122, 87, .15); outline-offset: -3px; }
.image-column { width: 76px; }
.product-column { width: 250px; }
.price-column { width: 92px; }
.spec-column { width: 270px; }
.action-column { width: 48px; }

.product-cell { display: flex; min-width: 0; flex-direction: column; }
.product-cell strong { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-cell small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.needs-recapture { color: var(--yellow) !important; }
.price-value { color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.money-value { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.suggested-value { color: var(--green); font-size: 12px; font-weight: 750; white-space: nowrap; }
.margin-value { display: inline-flex; min-width: 46px; justify-content: center; padding: 3px 6px; background: var(--green-soft); border-radius: 3px; color: var(--green-dark); font-size: 10px; font-weight: 700; }
.empty-value { color: #a2aaa7; }

.platform-badge { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 800; }
.platform-1688 { background: var(--orange-soft); color: var(--orange); }
.platform-temu { background: var(--green-soft); color: var(--green-dark); }
.platform-other { background: var(--canvas-strong); color: var(--muted); }

.spec-stack { display: grid; gap: 6px; line-height: 1.45; }
.spec-group { display: grid; grid-template-columns: 36px 1fr; gap: 5px; }
.spec-label { color: var(--muted-light); font-size: 9px; }
.spec-values { color: var(--ink-soft); font-size: 10px; overflow-wrap: anywhere; }
.variant-lines { display: grid; grid-column: 1 / -1; gap: 3px; margin-top: 1px; padding: 5px 7px; background: var(--canvas); border-left: 2px solid var(--line-strong); }
.variant-line { color: #596660; font-size: 9px; overflow-wrap: anywhere; }

.row-action { display: grid; width: 27px; height: 27px; place-items: center; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--muted); cursor: pointer; }
.row-action:hover { background: var(--canvas-strong); border-color: var(--line); color: var(--ink); }
.row-action .icon { width: 15px; height: 15px; }

.state-panel { position: absolute; inset: 43px 0 0; display: flex; min-height: 360px; align-items: center; justify-content: center; flex-direction: column; padding: 32px; background: var(--surface); text-align: center; }
.state-panel strong { margin-top: 13px; font-size: 13px; }
.state-panel span:not(.spinner) { max-width: 390px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.state-panel .button { margin-top: 16px; }
.state-icon { width: 33px; height: 33px; fill: none; stroke: #9ca8a3; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.state-error .state-icon { color: var(--red); stroke: currentColor; }
.spinner { width: 27px; height: 27px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-spinning { animation: spin .75s linear infinite; }

.recent-empty { display: flex; min-height: 294px; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; }
.recent-empty .state-icon { width: 31px; height: 31px; }
.recent-empty strong { margin-top: 12px; font-size: 12px; }
.recent-empty span { margin-top: 6px; color: var(--muted); font-size: 10px; }

.pricing-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.pricing-summary > div { min-height: 105px; padding: 18px 19px; border-right: 1px solid var(--line); }
.pricing-summary > div:last-child { border-right: 0; }
.pricing-summary span, .pricing-summary strong, .pricing-summary small { display: block; }
.pricing-summary span { color: var(--muted); font-size: 10px; }
.pricing-summary strong { margin-top: 10px; font-size: 20px; font-variant-numeric: tabular-nums; }
.pricing-summary small { margin-top: 6px; color: var(--muted-light); font-size: 9px; }
.pricing-summary .summary-emphasis strong { color: var(--green); }
.pricing-table { min-width: 960px; }
.pricing-table th:first-child { width: 300px; }
.pricing-table-frame { min-height: 360px; }
.pricing-product { display: flex; align-items: center; gap: 10px; }
.pricing-product .thumb { width: 40px; height: 40px; flex-basis: 40px; }
.pricing-product strong { display: -webkit-box; overflow: hidden; color: var(--ink); line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.markup-value { color: var(--muted); font-size: 10px; }

.drawer-backdrop, .sidebar-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(18, 26, 23, .34); }
.detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 90; display: flex; width: min(570px, 94vw); flex-direction: column; background: var(--surface); box-shadow: var(--shadow); transform: translateX(102%); transition: transform .24s ease; }
.detail-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; min-height: 70px; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drawer-header span, .drawer-header strong { display: block; }
.drawer-header span { color: var(--muted); font-size: 10px; }
.drawer-header strong { margin-top: 3px; font-size: 13px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-footer { display: flex; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); }
.drawer-footer .button-primary { flex: 1; }

.drawer-product { display: grid; grid-template-columns: 122px 1fr; gap: 17px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.drawer-image { display: grid; width: 122px; height: 122px; place-items: center; overflow: hidden; background: var(--canvas); border: 1px solid var(--line); border-radius: 5px; }
.drawer-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.drawer-image .icon { width: 28px; height: 28px; color: #aab4b0; }
.drawer-product h2 { margin: 2px 0 9px; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-tag { display: inline-flex; min-height: 23px; align-items: center; padding: 0 7px; background: var(--canvas); border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 9px; }
.drawer-status { margin-top: 11px; color: var(--muted); font-size: 10px; }

.detail-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin: 0 0 13px; font-size: 12px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.detail-section-heading h3 { margin: 0; }
.edit-pricing-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; background: transparent; border: 0; color: var(--green); font-size: 10px; font-weight: 650; cursor: pointer; }
.edit-pricing-button .icon { width: 13px; height: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; }
.detail-field span, .detail-field strong { display: block; }
.detail-field span { color: var(--muted); font-size: 9px; }
.detail-field strong { margin-top: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.pricing-breakdown { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 5px; }
.pricing-breakdown div { padding: 12px 9px; border-right: 1px solid var(--line); }
.pricing-breakdown div:last-child { border-right: 0; }
.pricing-breakdown span, .pricing-breakdown strong { display: block; }
.pricing-breakdown span { color: var(--muted); font-size: 8px; }
.pricing-breakdown strong { margin-top: 6px; font-size: 11px; white-space: nowrap; }
.pricing-breakdown .suggested-box { background: var(--green-soft); }
.pricing-breakdown .suggested-box strong { color: var(--green-dark); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chip { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; background: var(--canvas); border: 1px solid var(--line); border-radius: 3px; color: var(--ink-soft); font-size: 10px; }
.variant-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
.variant-table { width: 100%; min-width: 430px; border-collapse: collapse; }
.variant-table th { padding: 8px 9px; background: var(--canvas); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: left; }
.variant-table td { padding: 9px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; vertical-align: top; overflow-wrap: anywhere; }
.variant-table tr:last-child td { border-bottom: 0; }
.raw-variant-list { display: grid; gap: 6px; }
.raw-variant { padding: 8px 10px; background: var(--canvas); border-left: 2px solid var(--line-strong); color: var(--ink-soft); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }

.pricing-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.pricing-editor label { display: block; }
.pricing-editor label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.money-input { display: flex; height: 37px; align-items: center; gap: 6px; padding: 0 9px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }
.money-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 122, 87, .08); }
.money-input input { width: 100%; height: 100%; min-width: 0; padding: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.pricing-preview { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; }
.pricing-preview div { padding: 10px 11px; }
.pricing-preview div + div { border-left: 1px solid var(--line); background: var(--green-soft); }
.pricing-preview span, .pricing-preview strong { display: block; }
.pricing-preview span { color: var(--muted); font-size: 8px; }
.pricing-preview strong { margin-top: 5px; font-size: 12px; }
.pricing-preview div:last-child strong { color: var(--green-dark); }
.pricing-editor-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 130; background: rgba(18, 26, 23, .42); }
.confirm-dialog { position: fixed; top: 50%; left: 50%; z-index: 140; width: min(390px, calc(100vw - 30px)); padding: 25px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: var(--shadow); transform: translate(-50%, -50%); }
.confirm-icon { display: grid; width: 38px; height: 38px; place-items: center; background: var(--red-soft); border-radius: 5px; color: var(--red); }
.confirm-dialog h2 { margin: 17px 0 0; font-size: 16px; }
.confirm-dialog p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: 360px; padding: 12px 15px; background: var(--ink); border-radius: 5px; box-shadow: var(--shadow); color: #fff; font-size: 11px; line-height: 1.5; }

@media (max-width: 1220px) {
  .metric-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-item:nth-child(3) { border-right: 0; }
  .metric-item:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .metric-item:nth-child(4) { grid-column: span 1; }
  .metric-item:nth-child(5) { grid-column: span 2; }
  .overview-grid { grid-template-columns: 1fr; }
  .recent-row { grid-template-columns: 48px minmax(180px, 1fr) 80px 110px 90px 22px; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-101%); transition: transform .2s ease; }
  .sidebar.is-open { z-index: 100; transform: translateX(0); }
  .workspace { margin-left: 0; }
  .sidebar-backdrop { z-index: 95; }
  .mobile-menu { display: inline-grid; margin-right: 12px; }
  .topbar { justify-content: flex-start; padding-inline: 20px; }
  .topbar-actions { margin-left: auto; }
  .pricing-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pricing-summary > div:nth-child(3) { border-right: 0; }
  .pricing-summary > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .pricing-summary > div:nth-child(4) { grid-column: span 1; }
  .pricing-summary > div:nth-child(5) { grid-column: span 2; }
}

@media (max-width: 700px) {
  .content-wrap { padding: 22px 14px 48px; }
  .topbar { min-height: 62px; padding: 9px 14px; }
  .updated-at { display: none; }
  .button span { display: none; }
  .auth-submit span, .confirm-dialog .button span { display: inline; }
  .topbar .button { width: 36px; padding: 0; }
  .page-heading { align-items: flex-start; }
  .scope-label { display: none; }
  h1 { font-size: 22px; }
  .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-item { min-height: 112px; padding: 18px 16px; }
  .metric-item:nth-child(2), .metric-item:nth-child(4) { border-right: 0; }
  .metric-item:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-item:nth-child(4) { grid-column: auto; border-bottom: 1px solid var(--line); }
  .metric-item:nth-child(5) { grid-column: span 2; }
  .overview-grid { gap: 14px; margin-top: 14px; }
  .recent-row { grid-template-columns: 48px minmax(0, 1fr) 64px 18px; gap: 9px; padding-inline: 12px; }
  .recent-spec, .recent-time { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .segmented-control { align-self: flex-start; }
  .pricing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-summary > div { min-height: 92px; padding: 15px; }
  .pricing-summary > div:nth-child(2), .pricing-summary > div:nth-child(4) { border-right: 0; }
  .pricing-summary > div:nth-child(3) { border-right: 1px solid var(--line); }
  .pricing-summary > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .pricing-summary > div:nth-child(4) { grid-column: auto; }
  .pricing-summary > div:nth-child(5) { grid-column: span 2; }
  .drawer-body { padding: 17px; }
  .drawer-product { grid-template-columns: 94px 1fr; gap: 13px; }
  .drawer-image { width: 94px; height: 94px; }
  .pricing-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-breakdown div { border-bottom: 1px solid var(--line); }
  .pricing-breakdown div:nth-child(2), .pricing-breakdown div:nth-child(4) { border-right: 0; }
  .pricing-breakdown div:last-child { grid-column: span 2; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
