:root {
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #17233d;
  --ink-700: #45516a;
  --ink-500: #778299;
  --ink-400: #9ba5b7;
  --line: #e4e9f1;
  --line-strong: #d5dde9;
  --green: #356fc8;
  --green-dark: #234b93;
  --green-soft: #eef4ff;
  --green-card: #ffffff;
  --green-table: #ffffff;
  --pink-card: #ffffff;
  --pink-line: #dfe3e0;
  --pink-deep: #45504a;
  --orange: #ed7837;
  --blue: #2f6cf6;
  --shadow: 0 16px 38px rgba(45, 72, 112, 0.08);
  --shadow-soft: 0 8px 20px rgba(45, 72, 112, 0.055);
  --radius: 17px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
  cursor: pointer;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

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

.app-header {
  width: min(960px, calc(100% - 56px));
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 10px;
  color: #fff;
  background: var(--green-dark);
  box-shadow: 0 8px 17px rgba(38, 90, 186, 0.16);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.top-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 26px;
}

.top-nav button {
  position: relative;
  padding: 0 1px;
  border: 0;
  color: var(--ink-400);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.top-nav button:hover {
  color: var(--ink-700);
}

.top-nav button.active {
  color: var(--blue);
}

.top-nav button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.header-divider {
  width: 1px;
  height: 31px;
  margin-left: 4px;
  background: var(--line);
}

.global-search {
  position: relative;
  width: min(355px, 31%);
}

.global-search > svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 14px;
  height: 14px;
  color: #8e99aa;
  transform: translateY(-50%);
}

.global-search input {
  width: 100%;
  height: 37px;
  padding: 0 52px 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 9px;
  transition:
    border 150ms ease,
    box-shadow 150ms ease;
}

.global-search input:focus {
  border-color: #91b1f8;
  box-shadow: 0 0 0 3px rgba(47, 108, 246, 0.08);
}

.global-search input::placeholder {
  color: #a8b0bd;
}

.global-search kbd {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 3px 6px;
  border: 1px solid #e2e7ef;
  border-radius: 5px;
  color: #99a3b3;
  background: #f8f9fc;
  font-family: inherit;
  font-size: 7px;
  transform: translateY(-50%);
}

.header-title span {
  display: block;
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 700;
}

.header-title small {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.local-state {
  padding: 6px 9px;
  border: 1px solid #e1e4e7;
  border-radius: 20px;
  color: var(--ink-500);
  background: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
}

.local-state,
.local-dot {
  display: none;
}

.local-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7a8791;
  box-shadow: 0 0 0 3px rgba(122, 135, 145, 0.1);
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink-500);
  background: transparent;
  display: grid;
  place-items: center;
}

.icon-button:hover {
  border-color: var(--line);
  background: #fff;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.account {
  margin-left: 6px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  color: #37659f;
  background: #e8f0fb;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.account strong {
  display: block;
  font-size: 9px;
}

.account small {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: 7px;
}

.notification-button {
  position: relative;
}

.notification-button > span {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #ff6c64;
}

.intake-layout {
  width: min(960px, calc(100% - 56px));
  margin: 27px auto 50px;
  display: grid;
  grid-template-columns: 220px 500px;
  align-items: start;
  justify-content: center;
  gap: 34px;
}

.orders-column {
  position: sticky;
  top: 22px;
  width: 220px;
  min-width: 0;
}

.orders-heading {
  min-height: 51px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
}

.orders-heading h1 {
  margin: 5px 0 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.orders-count {
  margin-bottom: 2px;
  color: var(--ink-500);
  font-size: 8px;
}

.new-order-button {
  width: 100%;
  min-height: 80px;
  margin: 13px 0 12px;
  padding: 18px;
  border: 1px solid #d8ddda;
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border 160ms ease;
}

.new-order-button:hover {
  border-color: #a9c3fa;
  box-shadow: 0 13px 28px rgba(60, 101, 179, 0.1);
  transform: translateY(-2px);
}

.new-order-plus {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border: 1px solid #d9e5fb;
  border-radius: 10px;
  color: var(--blue);
  background: #edf3ff;
  display: grid;
  place-items: center;
}

.new-order-plus svg {
  width: 17px;
  height: 17px;
}

.new-order-button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.new-order-button strong {
  display: block;
  font-size: 14px;
}

.new-order-button small {
  display: block;
  margin-top: 5px;
  color: var(--ink-500);
  font-size: 8px;
}

.new-order-arrow {
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.orders-list {
  max-height: calc(100vh - 365px);
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.orders-list::-webkit-scrollbar {
  width: 4px;
}

.orders-list::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #e4d5df;
}

.order-card {
  position: relative;
  width: 100%;
  min-height: 80px;
  margin-bottom: 5px;
  margin-top: 5px;
  padding: 14px;
  border: 1px solid #dfe3e0;
  border-radius: 17px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition:
    border 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.order-card:hover {
  border-color: #b7c7df;
  box-shadow: 0 2px 4px rgba(6, 6, 6, 0.06);
  transform: translateY(-1px);
}

.order-card.active {
  border: 1px solid var(--blue);
  box-shadow: 0 2px 4px rgba(6, 6, 6, 0.06);
}

.order-card-head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-card-price {
  flex: 0 1 auto;
  overflow: hidden;
  color: #ff5000;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-card-time {
  flex: 0 0 auto;
  color: #8993a0;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.order-specs {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-specs span {
  color: #69726d;
  display: block;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-specs b {
  color: #7c8680;
  font-weight: 600;
}

.orders-empty {
  min-height: 110px;
  padding: 16px;
  border: 1px dashed #d9e0d9;
  border-radius: 14px;
  color: var(--ink-400);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 8px;
  line-height: 1.7;
}

.editor-column {
  width: 500px;
  min-width: 0;
}

.editor-heading {
  min-height: 58px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.editor-heading h2 {
  margin: 7px 0 5px;
  font-size: clamp(25px, 2.4vw, 33px);
  letter-spacing: -0.04em;
}

.editor-heading p {
  margin: 0;
  color: var(--ink-500);
  font-size: 9px;
}

.button {
  min-height: 37px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 700;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 14px;
  height: 14px;
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink-700);
  background: #fff;
}

.button-secondary:hover {
  background: var(--surface-soft);
}

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 108, 246, 0.2);
}

.button-primary:hover {
  background: #245fdf;
}

.button-quiet {
  border-color: transparent;
  color: var(--ink-500);
  background: transparent;
}

.button-quiet:hover {
  color: var(--blue);
}

.order-info-card {
  padding: 19px 21px 0;
  border: 1px solid #dfe3e0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.order-info-head {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.order-info-head h3,
.hardware-head h3 {
  margin: 5px 0 0;
  font-size: 15px;
}

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

.field-order-price {
  order: 1;
}

.field-order-wechat {
  order: 2;
}

.field-order-freight {
  order: 3;
}

.field-order-tracking {
  order: 4;
}

.field-order-channel {
  order: 5;
}

.field-order-xianyu {
  order: 6;
}

.info-field {
  min-width: 0;
}

.info-field > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-700);
  font-size: 8px;
  font-weight: 700;
}

.info-field b {
  color: #cf4d42;
}

.info-field > input,
.info-field > select,
.money-input {
  width: 100%;
  height: 39px;
  border: 1px solid #dfe3e0;
  border-radius: 8px;
  outline: 0;
  color: #352c32;
  background: #fafbfa;
  transition:
    border 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.info-field > input,
.info-field > select {
  padding: 0 11px;
  font-size: 9px;
}

.info-field > input:focus,
.info-field > select:focus,
.money-input:focus-within {
  border-color: #9aaba1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(70, 92, 80, 0.07);
}

.info-field input::placeholder {
  color: #a7aeaa;
}

.channel-options {
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.channel-option {
  min-width: 0;
  border: 0;
  color: var(--ink-700);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font-size: 9px;
  cursor: pointer;
  transition: color 150ms ease;
}

.channel-option:hover {
  color: var(--blue);
}

.channel-option input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--blue);
}

.channel-option:has(input:checked) {
  color: #285ba8;
}

.money-input {
  display: flex;
  align-items: center;
}

.money-input i {
  padding-left: 11px;
  color: var(--ink-400);
  font-size: 9px;
  font-style: normal;
}

.money-input input {
  width: 100%;
  height: 100%;
  padding: 0 10px 0 5px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-size: 9px;
}

.money-input input::placeholder {
  color: #a7aeaa;
}

.cost-summary {
  min-height: 78px;
  margin: 18px -21px 0;
  padding: 14px 21px;
  border-top: 1px solid #e7e9e7;
  background: #f7f8f7;
  display: flex;
  align-items: center;
  gap: 25px;
}

.cost-summary-main {
  min-width: 185px;
  padding-right: 22px;
  border-right: 1px solid #e0e3e1;
}

.cost-summary-main > span {
  display: block;
  color: var(--ink-500);
  font-size: 8px;
}

.cost-summary-main strong {
  display: inline-block;
  margin: 4px 6px 0 0;
  color: var(--blue);
  font-size: 22px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.cost-summary-main small {
  color: var(--ink-400);
  font-size: 7px;
}

.cost-summary-detail {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cost-summary-detail span {
  color: var(--ink-500);
  font-size: 8px;
}

.cost-summary-detail b {
  margin-left: 5px;
  color: var(--ink-700);
  font-size: 9px;
}

.hardware-card {
  margin-top: 15px;
  padding: 18px 20px;
  border: 1px solid #dfe3e0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hardware-head {
  margin-bottom: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
}

.hardware-head h3 {
  color: var(--ink);
}

.hardware-head p {
  margin: 0 0 1px;
  color: var(--ink-500);
  font-size: 8px;
  text-align: right;
}

.hardware-table {
  overflow: hidden;
  border: 1px solid #dfe3e0;
  border-radius: 11px;
  background: #fff;
}

.hardware-table-head,
.hardware-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 72px 48px;
  align-items: center;
}

.hardware-table-head {
  min-height: 36px;
  color: var(--ink-500);
  background: #f4f7fc;
  font-size: 7px;
  font-weight: 700;
}

.hardware-table-head span {
  text-align: center;
}

.hardware-table-head span,
.hardware-row > * {
  padding-right: 14px;
  padding-left: 14px;
}

.hardware-table-head span + span,
.hardware-row > * + * {
  border-left: 1px solid #e8eae8;
}

.hardware-row {
  min-height: 46px;
  border-top: 1px solid #eceeec;
  background: #fff;
  transition: background 150ms ease;
}

.hardware-row:nth-child(even) {
  background: #fbfcff;
}

.hardware-row:focus-within,
.hardware-row.is-filled {
  background: #f5f8ff;
}

.hardware-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  justify-content: center;
  text-align: center;
}

.hardware-name strong {
  display: block;
  width: 3em;
  min-width: 3em;
  font-size: 10px;
  text-align: justify;
  text-align-last: justify;
  white-space: nowrap;
}

.hardware-code {
  color: #7b8792;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hardware-spec {
  min-width: 0;
}

.hardware-spec input {
  width: 100%;
  height: 33px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: 0;
  color: #28352c;
  background: transparent;
  font-size: 10px;
  text-align: center;
  transition:
    border 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.hardware-spec input::placeholder {
  color: #aebcb0;
}

.hardware-spec input:focus {
  border-color: #aab8b0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(70, 92, 80, 0.06);
}

.hardware-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.hardware-amount input {
  width: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--orange);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}

.hardware-amount input::-webkit-inner-spin-button,
.hardware-amount input::-webkit-outer-spin-button {
  appearance: none;
}

.hardware-delete {
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hardware-delete-button {
  min-width: 30px;
  height: 23px;
  padding: 0 4px;
  border: 0;
  border-radius: 5px;
  color: #9a6464;
  background: transparent;
  font-size: 7px;
}

.hardware-delete-button:hover {
  color: #a13f3f;
  background: #fbeded;
}

.hardware-empty-row {
  grid-column: 1 / -1;
  min-height: 52px;
  color: var(--ink-400);
  background: #fbfcff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
}

.add-hardware-button {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px dashed #d6dcda;
  border-radius: 9px;
  color: var(--ink-700);
  background: #fafbfa;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.add-hardware-button:hover {
  border-color: #b6c0ba;
  background: #f4f6f5;
}

.expand-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  color: var(--blue);
  background: #eaf1ff;
  display: grid;
  place-items: center;
}

.expand-icon svg {
  width: 13px;
  height: 13px;
}

.add-hardware-button > span:nth-child(2) {
  flex: 1;
}

.add-hardware-button strong {
  display: block;
  color: var(--ink-700);
  font-size: 9px;
}

.add-hardware-button small {
  display: block;
  margin-top: 3px;
  color: var(--ink-400);
  font-size: 7px;
}

.editor-footer {
  min-height: 64px;
  margin-top: 14px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-hint {
  color: var(--ink-400);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #87918b;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-save {
  min-width: 126px;
  min-height: 41px;
  font-size: 10px;
}

.detail-dialog {
  width: min(620px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(24, 45, 31, 0.23);
}

.detail-dialog::backdrop {
  background: rgba(30, 45, 34, 0.4);
  backdrop-filter: blur(2px);
}

.import-dialog {
  width: min(720px, calc(100% - 30px));
}

.import-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.import-intro {
  margin: 0;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.7;
}

.import-template-card {
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background: #f8fafc;
}

.import-template-head {
  min-height: 42px;
  padding: 7px 10px 7px 13px;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-template-head strong {
  color: var(--ink-700);
  font-size: 9px;
}

.import-copy-button {
  min-height: 29px;
  padding: 0 10px;
  font-size: 8px;
}

.import-template-card pre {
  max-height: 190px;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  color: #48566a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 8px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.import-json-field {
  display: block;
}

.import-json-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-700);
  font-size: 8px;
  font-weight: 700;
}

.import-json-field textarea {
  width: 100%;
  min-height: 170px;
  padding: 12px;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.6;
  resize: vertical;
}

.import-json-field textarea:focus {
  border-color: #91b1f8;
  box-shadow: 0 0 0 3px rgba(47, 108, 246, 0.08);
}

.import-json-field textarea::placeholder {
  color: #a8b0bd;
}

.import-error {
  margin: -3px 0 0;
  padding: 8px 10px;
  border-radius: 7px;
  color: #a94e4e;
  background: #fdf1f1;
  font-size: 8px;
}

.import-dialog-footer {
  justify-content: space-between;
}

.hardware-picker-dialog {
  width: min(460px, calc(100% - 30px));
}

.hardware-picker-body {
  min-height: 145px;
}

.hardware-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.hardware-type-option {
  min-width: 0;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  cursor: pointer;
  transition:
    border 150ms ease,
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.hardware-type-option:hover {
  border-color: #a9c3fa;
  background: #f8faff;
}

.hardware-type-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--blue);
}

.hardware-type-option:has(input:checked) {
  border-color: #7ea6f5;
  color: #285ba8;
  background: #f3f7ff;
  box-shadow: 0 0 0 2px rgba(47, 108, 246, 0.06);
}

.hardware-type-option small {
  margin-left: auto;
  color: #a1a9b4;
  font-size: 7px;
}

.hardware-picker-empty {
  margin: 12px 0 0;
  color: var(--ink-500);
  font-size: 8px;
  text-align: center;
}

.dialog-head {
  padding: 20px 21px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head > div > span {
  color: var(--ink-500);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dialog-head h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

.dialog-body {
  padding: 19px 21px;
  overflow-y: auto;
}

.dialog-footer {
  padding: 13px 21px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
  display: flex;
  justify-content: flex-end;
}

.import-dialog .dialog-footer {
  gap: 10px;
  justify-content: flex-end;
}

.hardware-picker-dialog .dialog-footer {
  gap: 10px;
  justify-content: flex-end;
}

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

.detail-item {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f7f9f6;
}

.detail-item span {
  display: block;
  color: var(--ink-400);
  font-size: 7px;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 9px;
}

.detail-hardware {
  margin-top: 15px;
}

.detail-hardware h3 {
  margin: 0 0 8px;
  font-size: 10px;
}

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

.detail-hardware-row {
  padding: 8px 9px;
  border: 1px solid #e4ebe2;
  border-radius: 7px;
  background: #fbfcfa;
}

.detail-hardware-row span {
  display: block;
  color: var(--ink-400);
  font-size: 7px;
}

.detail-hardware-row strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 8px;
}

.detail-total {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #e0e4e1;
  border-radius: 9px;
  background: #f7f8f7;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.detail-total span {
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.7;
}

.detail-total strong {
  color: var(--ink);
  font-size: 21px;
}

.toast-root {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 235px;
  max-width: 350px;
  padding: 12px 14px;
  border-radius: 9px;
  color: #fff;
  background: #29343e;
  box-shadow: 0 16px 40px rgba(33, 42, 49, 0.22);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  animation: toast-in 180ms ease both;
}

.toast.error {
  background: #a34e4e;
}

.toast svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 1120px) {
  .app-header,
  .intake-layout {
    width: min(960px, calc(100% - 36px));
  }

  .intake-layout {
    grid-template-columns: 220px 500px;
    gap: 24px;
  }

  .cost-summary {
    gap: 17px;
  }

}

@media (max-width: 900px) {
  .app-header {
    width: calc(100% - 28px);
    min-height: 70px;
  }

  .header-title,
  .header-divider,
  .local-state {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .global-search {
    width: auto;
    margin-left: 14px;
    flex: 1;
  }

  .intake-layout {
    width: calc(100% - 28px);
    margin-top: 20px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .orders-column,
  .editor-column {
    width: 100%;
    max-width: 100%;
  }

  .orders-column {
    position: static;
  }

  .orders-heading {
    align-items: center;
  }

  .new-order-button {
    min-height: 76px;
    margin-bottom: 10px;
  }

  .orders-list {
    max-height: none;
    padding: 2px 2px 7px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .order-card {
    width: 255px;
    min-width: 255px;
    min-height: 94px;
    margin-bottom: 0;
  }

  .orders-empty {
    width: 100%;
    min-height: 75px;
  }

  .editor-heading {
    margin-top: 6px;
  }
}

@media (max-width: 640px) {
  .app-header {
    width: calc(100% - 24px);
    min-height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small,
  .header-actions > .icon-button,
  .account > span:last-child {
    display: none;
  }

  .global-search {
    margin-left: 2px;
  }

  .global-search kbd {
    display: none;
  }

  .global-search input {
    padding-right: 12px;
  }

  .account {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
  }

  .account-avatar {
    width: 29px;
    height: 29px;
  }

  .intake-layout {
    width: calc(100% - 22px);
    margin-top: 17px;
    margin-bottom: 34px;
  }

  .new-order-button {
    min-height: 72px;
    padding: 14px;
  }

  .new-order-button small {
    display: none;
  }

  .order-card {
    width: 230px;
    min-width: 230px;
    min-height: 94px;
  }

  .editor-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .editor-heading h2 {
    font-size: 26px;
  }

  .order-info-card,
  .hardware-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .order-info-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .order-info-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .cost-summary {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .cost-summary-main {
    min-width: 0;
    flex: 1;
  }

  .cost-summary-detail {
    flex: 1;
  }

  .hardware-table-head,
  .hardware-row {
    grid-template-columns: 72px minmax(0, 1fr) 58px 42px;
  }

  .hardware-table-head span,
  .hardware-row > * {
    padding-right: 8px;
    padding-left: 8px;
  }

  .hardware-name strong {
    font-size: 9px;
  }

  .hardware-spec input {
    padding: 0 5px;
    font-size: 9px;
    text-align: left;
  }

  .hardware-amount input {
    width: 42px;
    font-size: 10px;
  }

  .add-hardware-button small {
    display: none;
  }

  .editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-actions {
    width: 100%;
  }

  .footer-actions .button-save {
    flex: 1;
  }

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

  .detail-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-template-card pre {
    max-height: 150px;
  }

  .import-json-field textarea {
    min-height: 145px;
  }

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

  .toast-root {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    width: 100%;
    min-width: 0;
  }
}
