:root {
  --blue: #234a86;
  --blue-hover: #163964;
  --blue-soft: #edf3fb;
  --ink: #1d2b40;
  --muted: #607086;
  --line: #dce2ea;
  --bg: #f2f4f7;
  --red: #b92e24;
  --green: #287759;
  --amber: #9b6714;
  --sidebar: 206px;
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #79a5e2;
  outline-offset: 2px;
}
::selection {
  background: #c9dbf6;
}
input,
textarea {
  caret-color: var(--blue);
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
select,
textarea {
  border: 1px solid #cbd4df;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #788698;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  padding: 0;
}
input[type="number"] {
  font-variant-numeric: tabular-nums;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 21px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 15px;
}
.button {
  border: 1px solid #cbd4df;
  border-radius: 4px;
  min-height: 34px;
  padding: 7px 13px;
  background: white;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.button:hover {
  background: #f3f6fa;
  border-color: #a9b9cc;
}
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.button.primary:hover {
  background: var(--blue-hover);
}
.button.small {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 12px;
}
.button.danger {
  color: var(--red);
  border-color: #e7c3c0;
}
.button.text {
  background: transparent;
  border-color: transparent;
  padding: 4px 8px;
  color: var(--blue);
}
.icon-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px;
  font-size: 22px;
  line-height: 1;
}
.working {
  cursor: wait;
}
.initial-loading {
  padding: 40px;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  width: var(--sidebar);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  padding: 20px 20px 16px;
  font-size: 18px;
  font-weight: 650;
  color: #244a7d;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
}
.brand small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.sidebar nav {
  padding: 7px 9px;
  overflow: auto;
  flex: 1;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #344359;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 4px;
  min-height: 40px;
  text-align: left;
  font-size: 14px;
}
.nav-item:hover {
  background: #f1f4f8;
}
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.65;
  fill: none;
  flex: none;
}
.nav-separator {
  height: 1px;
  background: var(--line);
  margin: 10px 11px;
}
.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 54px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 15;
}
.topbar-left,
.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.topbar select {
  padding: 5px 8px;
  border-color: transparent;
  font-weight: 600;
  color: var(--blue);
}
.environment {
  font-size: 12px;
  color: #7b693e;
  background: #f8f3e9;
  padding: 4px 7px;
  border-radius: 3px;
}
.topbar-right {
  font-size: 12px;
  color: var(--muted);
}
.menu-toggle {
  display: none;
}
main {
  padding: 20px 22px 30px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}
.panel-head {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 15px;
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 12px;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-flex;
  background: #eff2f7;
  color: #536176;
  font-size: 11px;
  border-radius: 3px;
  padding: 3px 6px;
  white-space: nowrap;
}
.tag.good {
  background: #e7f3ed;
  color: #276f53;
}
.tag.warn {
  background: #fcf1dc;
  color: #89621d;
}
.tag.bad {
  background: #fae9e7;
  color: #a83227;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  background: #f7f9fc;
  color: #536176;
  font-weight: 600;
  white-space: nowrap;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  border-bottom: 1px solid #edf0f5;
  padding: 10px 12px;
  vertical-align: middle;
  line-height: 1.5;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f9fbfd;
}
td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--muted);
}
.empty p {
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field > span {
  font-size: 12px;
  color: #536176;
}
.field b {
  color: var(--red);
  font-weight: 500;
}
.span-2 {
  grid-column: 1/-1;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
}
.check-label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
}
.password-feedback {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
}
.dialog {
  border: 1px solid #cbd4df;
  border-radius: 7px;
  max-width: min(620px, calc(100vw - 26px));
  width: 620px;
  padding: 0;
  box-shadow: 0 16px 55px #182b4633;
  color: var(--ink);
}
.dialog.wide {
  width: 1000px;
  max-width: min(1000px, calc(100vw - 26px));
}
.dialog::backdrop {
  background: #20304765;
}
.dialog-head {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.dialog-body {
  padding: 20px;
  max-height: 80vh;
  overflow: auto;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}
.dialog iframe {
  width: 100%;
  height: 67vh;
  border: 1px solid var(--line);
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 8px);
  background: #263c5b;
  color: #fff;
  max-width: calc(100vw - 32px);
  padding: 11px 17px;
  border-radius: 5px;
  box-shadow: 0 5px 20px #20304b20;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out;
  z-index: 1000;
  font-size: 13px;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: #a62e28;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
  background: #f5f7fa;
}
.login-intro {
  padding: 70px 7vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro .brand {
  padding: 0;
  margin-bottom: 32px;
}
.login-intro h1 {
  font-size: 29px;
  line-height: 1.6;
}
.login-intro p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  margin-top: 20px;
  max-width: 420px;
}
.login-steps {
  display: flex;
  gap: 16px;
  color: #405575;
  margin-top: 32px;
  font-size: 13px;
}
.login-side {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-left: 1px solid var(--line);
}
.login-form {
  width: 100%;
  max-width: 350px;
}
.login-form h2 {
  font-size: 23px;
  margin-bottom: 20px;
}
.login-form .field {
  margin-bottom: 16px;
}
.login-form .button.primary {
  width: 100%;
  margin-top: 5px;
  min-height: 42px;
}
.login-foot {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.quote-meta {
  display: grid;
  grid-template-columns: 1.15fr 1.3fr 1fr 1fr;
  gap: 12px;
  padding: 14px 15px;
}
.quote-meta .field > span {
  font-size: 12px;
}
.meta-more {
  padding: 0 15px 14px;
}
.meta-more summary {
  font-size: 12px;
  color: var(--blue);
  cursor: pointer;
  margin-bottom: 10px;
}
.meta-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quote-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  flex-wrap: wrap;
}
.catalog-toolbar input {
  flex: 1;
  min-width: 180px;
}
.catalog-toolbar select {
  max-width: 160px;
}
.category-pills {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 0 15px 11px;
  scrollbar-width: thin;
}
.category-pills button {
  border: 1px solid var(--line);
  background: white;
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  color: #59677a;
}
.category-pills button.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: #a9c1e2;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 0 15px 15px;
  max-height: 340px;
  overflow: auto;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.product-card:hover {
  border-color: #9eb5d7;
  background: #fcfdff;
}
.product-image {
  height: 93px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafc;
  border-radius: 3px;
  margin-bottom: 3px;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-image .image-missing {
  font-size: 11px;
  color: #8794a5;
}
.product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 35px;
  overflow-wrap: anywhere;
}
.product-zh {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 16px;
}
.product-price {
  font-size: 14px;
  font-weight: 600;
  color: #a84b22;
}
.product-price small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: auto;
}
.catalog-count {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.demand-area {
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.demand-area textarea {
  width: 100%;
  min-height: 120px;
}
.drop-zone {
  border: 1px dashed #afbdd0;
  border-radius: 4px;
  padding: 15px;
  text-align: center;
  color: #677990;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: #f8faff;
  font-size: 12px;
}
.drop-zone.dragover {
  background: #e4efff;
  border-color: var(--blue);
}
.drop-zone input[type="file"] {
  max-width: 100%;
  border: 0;
  padding: 4px;
  background: transparent;
}
.demand-results {
  padding: 0 15px 15px;
}
.result-row {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 70px 70px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.result-original {
  overflow-wrap: anywhere;
  color: #59677a;
}
.line-toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}
.line-toolbar .toolbar-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.quote-lines table {
  min-width: 850px;
}
.quote-lines td {
  padding: 8px;
}
.quote-lines th {
  padding: 9px 8px;
  position: sticky;
  top: 0;
}
.quote-lines input,
.quote-lines select {
  font-size: 12px;
  padding: 6px 7px;
  min-height: 30px;
}
.quote-lines input.numeric {
  width: 72px;
  text-align: right;
}
.quote-lines .name-cell {
  min-width: 180px;
  max-width: 300px;
}
.name-cell strong {
  font-weight: 600;
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.name-cell small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.line-child {
  background: #fafbfd;
  font-size: 12px;
}
.line-child .name-cell {
  padding-left: 22px;
}
.line-row .number {
  white-space: nowrap;
  text-align: right;
}
.line-row .note-input {
  width: 125px;
}
.delete-line {
  font-size: 17px;
  color: #9b5a58;
  padding: 4px;
}
.person-sub {
  font-size: 11px;
  color: var(--muted);
}
.quote-bottom {
  position: sticky;
  bottom: 0;
  z-index: 12;
  background: white;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 12px 15px;
  box-shadow: 0 -3px 14px #263b5610;
  margin-top: 14px;
}
.quote-totals {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.total-detail {
  font-size: 12px;
  color: #647185;
}
.total-detail b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.grand-total {
  margin-left: auto;
  text-align: right;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}
.grand-total strong {
  font-size: 25px;
  font-weight: 650;
  margin-left: 7px;
  font-variant-numeric: tabular-nums;
}
.quote-bottom-actions {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.quote-issues {
  font-size: 11px;
  color: #9b6714;
  line-height: 1.6;
  max-width: 65%;
}
.quote-issues.error {
  color: var(--red);
}
.quote-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.discount-input {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.discount-input input {
  width: 66px;
  padding: 5px;
  text-align: right;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  margin-bottom: 18px;
}
.summary-stat {
  padding: 17px;
  border-right: 1px solid var(--line);
}
.summary-stat:last-child {
  border-right: 0;
}
.summary-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
}
.summary-stat strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.inline-notice {
  padding: 11px 14px;
  background: #fbf4e7;
  color: #836121;
  font-size: 12px;
  line-height: 1.7;
  border-bottom: 1px solid #efdfc0;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}
.detail-field span {
  font-size: 11px;
  color: var(--muted);
}
.detail-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.detail-section h3 {
  margin-bottom: 12px;
}
.detail-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.detail-metrics {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 13px 0;
}
.detail-metrics span {
  font-size: 12px;
  color: var(--muted);
}
.detail-metrics strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  margin-top: 5px;
}
.tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
  overflow: auto;
}
.tabs button {
  padding: 11px 15px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.tabs button.active {
  box-shadow: inset 0 -2px var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, minmax(140px, 1fr));
  min-width: 890px;
  background: var(--line);
  gap: 1px;
}
.schedule-cell {
  background: white;
  padding: 12px;
  min-height: 80px;
}
.schedule-cell.header {
  min-height: auto;
  background: #f8fafd;
  font-weight: 600;
  text-align: center;
}
.schedule-person {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.schedule-task {
  display: block;
  padding: 8px;
  background: #edf3fb;
  border: 1px solid #c5d5ec;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.7;
  width: 100%;
  text-align: left;
  margin-bottom: 7px;
  color: #2c4d7b;
}
.calendar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  flex-wrap: wrap;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.month-day {
  min-height: 100px;
  padding: 8px;
  background: white;
  font-size: 12px;
}
.month-day.today {
  background: #f0f6ff;
}
.stock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stock-track {
  height: 22px;
  position: relative;
  background: #eef2f7;
  min-width: 220px;
  border-radius: 3px;
}
.stock-block {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: #a8bedf;
  border: 1px solid #6389bd;
  border-radius: 2px;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 4px;
  color: #244572;
}
.shop-shell {
  background: #f5f7fa;
  min-height: 100vh;
}
.shop-top {
  background: var(--blue);
  color: white;
  padding: 9px max(20px, calc((100vw - 1240px) / 2));
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 12px;
}
.shop-top a {
  color: white;
}
.shop-header {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 22px max(20px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
}
.shop-brand {
  font-size: 24px;
  font-weight: 650;
  color: var(--blue);
  white-space: nowrap;
}
.shop-search {
  display: flex;
  flex: 1;
  max-width: 580px;
}
.shop-search input {
  flex: 1;
  border: 1px solid var(--blue);
  border-radius: 4px 0 0 4px;
}
.shop-search button {
  border-radius: 0 4px 4px 0;
}
.shop-body {
  max-width: 1280px;
  margin: auto;
  padding: 20px;
}
.shop-controls {
  background: white;
  border: 1px solid var(--line);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.shop-layout {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 16px;
}
.shop-categories {
  border: 1px solid var(--line);
  background: white;
  padding: 8px;
  height: max-content;
}
.shop-categories button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px;
  font-size: 13px;
  color: #4c5d73;
}
.shop-categories button.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}
.shop-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.shop-products .product-image {
  height: 155px;
  background: white;
}
.shop-products .product-card {
  padding: 13px;
  gap: 9px;
}
.shop-products .product-name {
  font-size: 14px;
  min-height: 40px;
}
.shop-products .product-price {
  font-size: 18px;
}
.shop-footer {
  padding: 25px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
}
.cart-row {
  display: grid;
  grid-template-columns: 75px 1.5fr 90px 130px 80px;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 13px;
}
.cart-row img {
  width: 65px;
  height: 60px;
  object-fit: contain;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding-top: 20px;
}
.file-list a {
  display: block;
  font-size: 12px;
  margin: 8px 0;
}
.save-state {
  font-size: 11px;
  color: var(--muted);
}
.toolbar-input {
  max-width: 320px;
}
.upload-input {
  max-width: 100%;
  font-size: 12px;
}
.mobile-shade {
  display: none;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.7;
  background: #f6f8fb;
  padding: 12px;
  border-radius: 4px;
}
.code-value {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.print-code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.file-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 188px;
  }
  main {
    padding: 17px;
  }
  .topbar {
    padding: 0 17px;
  }
  .quote-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .meta-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quote-totals {
    gap: 13px;
  }
  .grand-total strong {
    font-size: 23px;
  }
}
@media (max-width: 900px) {
  .quote-bottom {
    position: static;
    box-shadow: none;
  }
  :root {
    --sidebar: 64px;
  }
  .brand {
    padding: 17px;
  }
  .brand > span:not(.brand-mark),
  .nav-item > span,
  .sidebar-foot > span {
    display: none;
  }
  .sidebar nav {
    padding: 7px;
  }
  .nav-item {
    justify-content: center;
    padding: 12px 5px;
  }
  .sidebar-foot {
    padding: 12px 8px;
    justify-content: center;
  }
  .topbar-right .account-name {
    display: none;
  }
  .environment {
    font-size: 10px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-stat:nth-child(2) {
    border-right: 0;
  }
  .summary-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-header {
    gap: 14px;
    padding: 18px;
  }
  .shop-brand {
    font-size: 20px;
  }
  .shop-layout {
    grid-template-columns: 130px 1fr;
  }
  .shop-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-issues {
    max-width: 50%;
  }
}
@media (max-width: 640px) {
  :root {
    --sidebar: 0px;
  }
  .shell {
    display: block;
  }
  .workspace {
    width: 100%;
  }
  .sidebar {
    width: 214px;
    transform: translateX(-100%);
    transition: transform 0.16s ease-out;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar.open .brand > span,
  .sidebar.open .nav-item > span,
  .sidebar.open .sidebar-foot > span {
    display: inline;
  }
  .sidebar.open .nav-item {
    justify-content: flex-start;
    padding: 10px 11px;
  }
  .mobile-shade.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: #20304765;
    z-index: 19;
  }
  .menu-toggle {
    display: block;
  }
  .topbar {
    height: 50px;
    padding: 0 12px;
    gap: 5px;
  }
  .topbar-left,
  .topbar-right {
    gap: 7px;
  }
  .topbar select {
    font-size: 13px;
    max-width: 115px;
  }
  .environment {
    display: none;
  }
  main {
    padding: 13px 11px 24px;
  }
  .page-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .page-head h1 {
    font-size: 19px;
  }
  .head-actions {
    justify-content: flex-end;
    gap: 5px;
  }
  .button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .button.small {
    min-height: 32px;
  }
  .quote-meta {
    padding: 12px;
    gap: 10px;
  }
  .field > span {
    font-size: 11px;
  }
  .quote-meta input {
    padding: 8px;
    font-size: 12px;
  }
  .panel-head {
    padding: 11px 12px;
  }
  .catalog-toolbar {
    padding: 10px 12px;
    gap: 7px;
  }
  .catalog-toolbar input {
    min-width: 100%;
    order: -1;
  }
  .catalog-toolbar select {
    max-width: 135px;
    font-size: 12px;
    padding: 7px;
  }
  .category-pills {
    padding: 0 12px 10px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 12px 12px;
    max-height: 350px;
    gap: 8px;
  }
  .product-card {
    padding: 8px;
  }
  .product-image {
    height: 87px;
  }
  .product-name {
    font-size: 12px;
    min-height: 33px;
  }
  .product-price {
    font-size: 13px;
  }
  .demand-area {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .drop-zone {
    min-height: 100px;
  }
  .result-row {
    grid-template-columns: 1fr 65px 65px;
    gap: 7px;
  }
  .result-original {
    grid-column: 1/-1;
  }
  .line-toolbar {
    padding: 10px 12px;
    gap: 5px;
  }
  .line-toolbar .toolbar-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .quote-lines table {
    min-width: 0;
    display: block;
  }
  .quote-lines thead {
    display: none;
  }
  .quote-lines tbody {
    display: block;
  }
  .quote-lines tr {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    gap: 4px;
  }
  .quote-lines td {
    border: 0;
    padding: 3px;
    display: block;
  }
  .quote-lines td.name-cell {
    grid-column: 1/3;
    min-width: 0;
    max-width: none;
  }
  .quote-lines td.source-cell {
    grid-column: 3;
    grid-row: 1;
  }
  .quote-lines td[data-label]:before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 4px;
  }
  .quote-lines td.line-note {
    grid-column: 1/3;
  }
  .quote-lines td.line-delete {
    grid-column: 3;
    text-align: right;
  }
  .quote-lines input.numeric {
    width: 100%;
    font-size: 12px;
  }
  .quote-lines .note-input {
    width: 100%;
  }
  .quote-lines .number {
    white-space: normal;
  }
  .line-child {
    padding-left: 21px !important;
  }
  .line-child .name-cell {
    padding-left: 0;
  }
  .quote-bottom {
    padding: 10px 12px;
    position: static;
  }
  .quote-totals {
    gap: 9px;
  }
  .total-detail {
    font-size: 10px;
  }
  .total-detail b {
    font-size: 12px;
  }
  .grand-total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 5px;
    border-top: 1px solid var(--line);
  }
  .grand-total strong {
    font-size: 24px;
  }
  .quote-bottom-actions {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
  }
  .quote-issues {
    max-width: 100%;
    font-size: 10px;
    margin-bottom: 8px;
  }
  .quote-actions {
    justify-content: flex-end;
    gap: 6px;
  }
  .quote-actions .button {
    min-height: 38px;
  }
  .meta-options {
    grid-template-columns: 1fr 1fr;
  }
  .summary-stat {
    padding: 12px;
  }
  .summary-stat strong {
    font-size: 19px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dialog-body {
    padding: 15px;
    max-height: 82vh;
  }
  .dialog-head {
    padding: 12px 15px;
  }
  .form-grid {
    gap: 11px;
  }
  .form-grid .field {
    grid-column: 1/-1;
  }
  .dialog .button {
    min-height: 40px;
  }
  .login-screen {
    display: block;
    min-height: 100vh;
  }
  .login-intro {
    padding: 28px 25px 15px;
  }
  .login-intro .brand {
    margin-bottom: 14px;
  }
  .login-intro h1 {
    font-size: 22px;
  }
  .login-intro p,
  .login-steps {
    display: none;
  }
  .login-side {
    padding: 25px;
    border: 0;
    background: transparent;
  }
  .login-form {
    max-width: 400px;
    background: white;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 5px;
  }
  .login-form h2 {
    font-size: 20px;
  }
  .shop-top {
    padding: 8px 12px;
    font-size: 10px;
  }
  .shop-header {
    flex-wrap: wrap;
    padding: 15px 12px;
    gap: 12px;
  }
  .shop-brand {
    font-size: 21px;
  }
  .shop-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .shop-body {
    padding: 12px;
  }
  .shop-controls {
    padding: 11px;
    gap: 8px;
    font-size: 12px;
  }
  .shop-controls input {
    font-size: 12px;
    max-width: 145px;
    padding: 7px;
  }
  .shop-layout {
    display: block;
  }
  .shop-categories {
    display: flex;
    overflow: auto;
    padding: 5px;
    margin-bottom: 12px;
  }
  .shop-categories button {
    width: auto;
    white-space: nowrap;
    padding: 8px;
    font-size: 12px;
  }
  .shop-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .shop-products .product-card {
    padding: 10px;
    gap: 7px;
  }
  .shop-products .product-image {
    height: 116px;
  }
  .shop-products .product-name {
    font-size: 12px;
    min-height: 35px;
  }
  .shop-products .product-price {
    font-size: 15px;
  }
  .cart-row {
    grid-template-columns: 48px 1fr 65px;
    gap: 8px;
  }
  .cart-row img {
    width: 44px;
    height: 45px;
  }
  .cart-row .cart-amount {
    grid-column: 2;
  }
  .cart-row .cart-remove {
    grid-column: 3;
  }
  .cart-total {
    flex-wrap: wrap;
  }
  .calendar-tools input {
    max-width: 145px;
  }
  .month-day {
    min-height: 90px;
    font-size: 10px;
    padding: 5px;
  }
  .month-day .schedule-task {
    font-size: 9px;
    padding: 3px;
  }
  .discount-input input {
    width: 55px;
  }
  th,
  td {
    padding: 9px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.quantity-unit {
  display: block;
  text-align: right;
  color: var(--muted, #607086);
  font-size: 11px;
  margin-top: 3px;
}
.original-materials {
  padding: 12px 16px;
  border-top: 1px solid var(--border, #d9e0e9);
}
.original-materials summary {
  cursor: pointer;
  font-weight: 600;
}
.source-material {
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #d9e0e9);
}
.source-material pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  max-height: 160px;
  overflow: auto;
  background: #f5f7fa;
  padding: 10px;
}
.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
@media (max-width: 900px) {
  .topbar .environment {
    display: inline-block;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
  }
}
@media (max-width: 640px) {
  .topbar .environment {
    max-width: 82px;
    padding: 3px 4px;
  }
  .menu-toggle {
    min-width: 28px;
  }
}
