.pcb-quote-client {
  --green: #49ad65;
  --green-dark: #389b54;
  --ink: #333;
  --muted: #777;
  --line: #d9dfe2;
  --soft: #f5f7f8;
  --header: #252b2f;
  width: min(1200px, calc(100vw - 32px));
  max-width: none;
  margin-left: 50%;
  color: var(--ink);
  background: #fff;
  font: 12px/1.45 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  transform: translateX(-50%);
  touch-action: manipulation;
}

.pcb-quote-client, .pcb-quote-client * { box-sizing: border-box; }

.pcb-quote-client button, .pcb-quote-client input, .pcb-quote-client select, .pcb-quote-client textarea { font: inherit; }
.pcb-quote-client button { cursor: pointer; }
.pcb-quote-client [hidden] { display: none !important; }

.language-switch { display: flex; border: 1px solid #cfd5d8; }
.language-switch button { height: 27px; padding: 0 8px; color: #555; background: #fff; border: 0; border-right: 1px solid #cfd5d8; }
.language-switch button:last-child { border-right: 0; }
.language-switch button[aria-pressed="true"] { color: #fff; background: var(--green); }

.header-button, .toolbar-button, .secondary-button {
  color: #555;
  background: #fff;
  border: 1px solid #cfd5d8;
  border-radius: 1px;
}
.header-button { min-height: 29px; padding: 0 13px; }

.quote-page { width: 100%; margin: 0 auto; padding: 16px 0 28px; }

.quote-progress {
  height: 35px;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  color: #9aa1a5;
  background: #eef1f3;
  overflow: hidden;
}
.quote-progress li { position: relative; display: flex; align-items: center; justify-content: center; }
.quote-progress li::after { content: ""; position: absolute; top: 5px; right: -12px; width: 24px; height: 24px; background: inherit; border-top: 1px solid #fff; border-right: 1px solid #fff; transform: rotate(45deg); z-index: 1; }
.quote-progress .is-current { color: #805b43; background: #f6e7da; }

.product-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.product-tab {
  position: relative;
  height: 73px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #444;
  background: linear-gradient(#fff, #edf0f1);
  border: 1px solid #cbd1d4;
}
.product-tab img { max-width: 70px; max-height: 48px; object-fit: contain; }
.product-tab[aria-pressed="true"] { color: #222; background: #fff; border: 2px solid var(--green); }
.product-tab[aria-pressed="true"]::after { content: ""; position: absolute; right: 7px; bottom: 5px; width: 7px; height: 4px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.new-badge { position: absolute; top: -6px; right: 6px; padding: 1px 5px; color: #fff; background: #f16824; font-size: 10px; font-style: normal; }

.quote-toolbar { width: 850px; min-height: 46px; margin-top: 10px; display: grid; grid-template-columns: auto auto 1fr 1fr; gap: 12px; align-items: center; }
.quote-toolbar button { height: 30px; }
.toolbar-button { background: #f8f9f9; }
.calculate-button { color: #fff; background: var(--green); border: 1px solid var(--green-dark); border-radius: 1px; }
.calculate-button:hover { background: var(--green-dark); }

.quote-shell { display: grid; grid-template-columns: 850px 330px; gap: 20px; align-items: start; }
.spec-workspace, .quote-summary { border: 1px solid var(--line); background: #fff; }

.workspace-heading { min-height: 58px; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fafbfb; }
.workspace-title { display: flex; align-items: center; gap: 10px; }
.workspace-title img { width: 31px; height: 27px; object-fit: contain; }
.workspace-kicker { margin: 0 0 2px; color: #777; font-size: 9px; letter-spacing: .06em; }
.workspace-heading h1 { margin: 0; font-size: 16px; font-weight: 700; }
.workspace-meta { display: grid; justify-items: end; color: #777; }
.workspace-note { color: var(--green-dark); }

.form-fields { padding: 0 14px 12px; }
.quote-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #777; }
.loading-dot { width: 12px; height: 12px; border: 2px solid #dfe7e1; border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage-section { padding: 15px 0 10px; border-bottom: 1px solid #edf0f1; }
.stage-section:last-child { border-bottom: 0; }
.stage-section-header { margin: 0 0 8px; }
.stage-section-header h2 { margin: 0; font-size: 13px; font-weight: 700; }
.stage-section-header p { margin: 3px 0 0; color: #8aa451; font-size: 11px; }

.field-grid { display: grid; gap: 0; }
.field-row { min-height: 40px; display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; }
.field-row.is-wide { align-items: start; padding: 5px 0; }
.field-label { padding-right: 10px; color: #666; text-align: right; }
.field-label .required { color: #dc4e41; }
.field-label .help { margin-left: 4px; color: #8ab85d; font-weight: 700; }
.field-control { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.choice-option { position: relative; display: inline-flex; }
.choice-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-option label {
  min-height: 27px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #555;
  background: #fff;
  border: 1px solid #d7dcdf;
  white-space: nowrap;
  cursor: pointer;
}
.choice-option input:checked + label { color: #333; border: 2px solid var(--green); padding: 4px 9px; }
.choice-option input:checked + label::after { content: ""; width: 5px; height: 3px; margin-left: 1px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.choice-option input:focus-visible + label { outline: 2px solid #2368c4; outline-offset: 1px; }
.swatch { width: 10px; height: 10px; border: 1px solid rgba(0,0,0,.22); background: var(--swatch, #aaa); }

.text-input, .number-input, .textarea-input {
  color: #333;
  background: #fff;
  border: 1px solid #cfd5d8;
  border-radius: 0;
  outline: none;
}
.text-input, .number-input { height: 29px; padding: 0 8px; }
.number-input { width: 150px; }
.textarea-input { width: 100%; min-height: 74px; padding: 8px; resize: vertical; }
.text-input:focus, .number-input:focus, .textarea-input:focus { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.input-with-unit { display: inline-flex; align-items: stretch; }
.input-unit { min-width: 42px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; color: #666; background: #f2f4f5; border: 1px solid #cfd5d8; border-left: 0; }
.check-option { display: inline-flex; align-items: center; gap: 6px; }
.check-option input { accent-color: var(--green); }

.advanced-section { margin: 10px 0 0; color: #555; background: #f6f8f8; border: 1px solid var(--line); }
.advanced-section summary { min-height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.advanced-section summary span { color: #a49352; font-weight: 400; }
.advanced-section > .field-grid { padding: 10px 12px; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; background: #fff; border-top: 1px solid var(--line); }
.advanced-section .field-row { min-height: 27px; display: block; }
.advanced-section .field-label { display: none; }

.quote-summary { position: sticky; top: 8px; padding: 12px; }
.quote-summary > h2 { margin: 0; padding-bottom: 10px; font-size: 14px; border-bottom: 1px solid var(--line); }
.result-empty { min-height: 105px; padding: 13px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-bottom: 1px solid var(--line); }
.result-empty strong { color: var(--green-dark); }
.result-empty p { margin: 6px 0 10px; color: #777; }
.result-empty .calculate-button { width: 118px; height: 28px; }
.result-content { padding: 12px 0; border-bottom: 1px solid var(--line); }
.inquiry-ready { padding: 9px; background: #f4f7f4; border-left: 3px solid var(--green); }
.inquiry-ready p { margin: 5px 0 0; color: #777; }
.inquiry-submit { margin-top: 10px; display: grid; gap: 7px; }
.inquiry-submit .calculate-button { height: 31px; }
.inquiry-submit p { min-height: 18px; margin: 0; color: var(--green-dark); }

.order-summary { padding: 13px 0; border-bottom: 1px solid var(--line); }
.order-summary h3 { margin: 0 0 8px; font-size: 13px; }
.order-summary dl { margin: 0; }
.order-summary dl div { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
.order-summary dt { color: #777; }
.order-summary dd { margin: 0; text-align: right; }
.summary-disclaimer { margin: 11px 0 0; color: #888; font-size: 11px; }

.action-bar { grid-column: 1 / -1; padding: 12px 0; display: grid; grid-template-columns: 1fr 180px 350px; gap: 10px; align-items: center; }
.action-bar p { margin: 0; color: var(--green-dark); }
.action-bar button { height: 34px; }

.terms-note { margin: 0; padding: 8px 0; color: #777; font-size: 10px; }
.inquiry-dialog { width: 760px; max-height: 80vh; padding: 0; border: 1px solid #aeb5b8; box-shadow: 0 12px 40px rgba(0,0,0,.24); }
.inquiry-dialog::backdrop { background: rgba(0,0,0,.36); }
.dialog-card { padding: 18px; }
.dialog-heading { margin: -18px -18px 16px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--header); }
.dialog-heading button { color: #fff; background: transparent; border: 0; font-size: 20px; }
.dialog-search { margin-top: 7px; display: grid; grid-template-columns: 1fr 130px; gap: 8px; }
.dialog-search button { height: 29px; }
#lookup-feedback { color: #c8463b; }
.inquiry-list { max-height: 52vh; overflow: auto; }
.inquiry-item { margin: 8px 0; border: 1px solid var(--line); }
.inquiry-item summary { padding: 9px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; cursor: pointer; }
.inquiry-item summary em { color: var(--green-dark); font-style: normal; }
.inquiry-item > div { padding: 0 10px 10px; }
.inquiry-item table { width: 100%; border-collapse: collapse; }
.inquiry-item td { padding: 5px; border: 1px solid #e3e6e8; }

@media (max-width: 600px) {
  .pcb-quote-client { width: 1200px; zoom: .325; }
}

@media (prefers-reduced-motion: reduce) {
  .pcb-quote-client *, .pcb-quote-client *::before, .pcb-quote-client *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
