.qx-view,
.qx-dialog {
  --qx-ink: #1e302c;
  --qx-dim: #5c6e65;
  --qx-line: #dce3dc;
  --qx-pale: #f4f7f2;
  --qx-leaf: #126952;
  --qx-surface: #fff;
  box-sizing: border-box;
  color: var(--qx-ink);
  font-family: inherit;
}
.qx-view *,
.qx-dialog * {
  box-sizing: border-box;
}
.qx-view h1,
.qx-view h2,
.qx-view h3,
.qx-view p,
.qx-dialog h2,
.qx-dialog h3,
.qx-dialog h4,
.qx-dialog p {
  margin: 0;
}
.qx-header,
.qx-panel-head,
.qx-history-bar,
.qx-modal-head,
.qx-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.qx-header {
  margin-bottom: 25px;
}
.qx-header h1 {
  font-size: clamp(25px, 2.1vw, 34px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.25;
}
.qx-header p,
.qx-modal-head p {
  color: var(--qx-dim);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}
.qx-view button,
.qx-dialog button,
.qx-view input,
.qx-view textarea,
.qx-view select {
  font: inherit;
}
.qx-btn,
.qx-icon-btn,
.qx-history-actions button {
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--qx-ink);
}
.qx-btn {
  border: 1px solid #cbd6cd;
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px !important;
  font-weight: 600 !important;
  min-height: 39px;
  padding: 8px 15px;
  white-space: nowrap;
}
.qx-btn:hover {
  background: #f2f6f0;
}
.qx-accent {
  color: #fff;
  border-color: var(--qx-leaf);
  background: var(--qx-leaf);
}
.qx-accent:hover {
  background: #0d5541;
}
.qx-btn:disabled {
  opacity: 0.47;
  cursor: default;
}
.qx-icon {
  flex: none;
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
}
.qx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(234px, 27%);
  gap: 18px;
  align-items: start;
}
.qx-panel {
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  background: var(--qx-surface);
  overflow: hidden;
}
.qx-panel h2,
.qx-modal-head h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
  font-weight: 650;
  line-height: 1.5;
}
.qx-panel-head,
.qx-history-bar {
  padding: 17px 20px;
  min-height: 65px;
}
.qx-count {
  color: var(--qx-leaf);
  background: #e6f1e8;
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 12px;
  vertical-align: 2px;
  font-weight: 700;
}
.qx-tier-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
  color: var(--qx-dim);
}
.qx-select,
.qx-field input,
.qx-field textarea,
.qx-money-input,
.qx-search {
  color: var(--qx-ink);
  border: 1px solid var(--qx-line);
  border-radius: 6px;
  background: #fff;
}
.qx-select,
.qx-field input,
.qx-field textarea {
  font-size: 13px !important;
  padding: 8px 9px;
  max-width: 100%;
  outline-offset: 2px;
}
.qx-line,
.qx-line-head {
  display: grid;
  grid-template-columns:
    minmax(135px, 1.9fr) minmax(92px, 0.86fr) minmax(83px, 0.9fr)
    25px;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--qx-line);
}
.qx-line-head,
.qx-history-cols {
  color: var(--qx-dim);
  font-size: 11px !important;
  background: var(--qx-pale);
  font-weight: 500;
}
.qx-line-head {
  padding-block: 9px;
}
.qx-product {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.qx-product-title,
.qx-history-key b {
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
  display: block;
  line-height: 1.55;
}
.qx-product small,
.qx-history-key small {
  display: block;
  color: var(--qx-dim);
  font-size: 11px;
  line-height: 1.55;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.qx-thumb,
.qx-paper-pic {
  border: 1px solid #e4eae2;
  border-radius: 6px;
  background: #f6f7f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qx-thumb {
  width: 49px;
  height: 49px;
  flex: none;
}
.qx-thumb img,
.qx-paper-pic img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.qx-noimage {
  font-size: 10px;
  color: #768578;
}
.qx-pricing .qx-select {
  width: 100%;
  font-size: 12px !important;
}
.qx-money-input {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  min-height: 32px;
}
.qx-money-input span {
  font-size: 12px;
  color: var(--qx-dim);
}
.qx-money-input input,
.qx-fee input {
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--qx-ink);
  width: 100%;
  min-width: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.qx-money-input:focus-within,
.qx-fee:focus-within,
.qx-search:focus-within {
  outline: 2px solid #64a58b;
  outline-offset: 1px;
}
.qx-money-input input::-webkit-inner-spin-button,
.qx-fee input::-webkit-inner-spin-button {
  appearance: none;
}
.qx-fee {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  color: var(--qx-dim);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 5px;
}
.qx-fee input {
  width: 43px;
  text-align: center;
  background: var(--qx-pale);
  padding: 2px 3px;
  border-radius: 3px;
  font-size: 11px;
}
.qx-icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 30px;
  padding: 3px;
  border-radius: 5px;
  color: var(--qx-dim);
}
.qx-icon-btn:hover {
  background: var(--qx-pale);
  color: var(--qx-ink);
}
.qx-settings {
  padding: 20px;
}
.qx-settings h2 {
  margin-bottom: 20px;
}
.qx-field,
.qx-period legend {
  font-size: 12px;
  color: var(--qx-dim);
  font-weight: 550;
}
.qx-field {
  display: block;
  margin: 17px 0;
}
.qx-field input,
.qx-field textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  line-height: 1.5;
  font-weight: 400;
}
.qx-field textarea {
  resize: vertical;
  min-height: 70px;
}
.qx-period {
  border: none;
  padding: 0;
  margin: 17px 0;
}
.qx-period legend {
  padding: 0;
  margin-bottom: 7px;
}
.qx-period > div {
  display: flex;
  gap: 5px;
}
.qx-period label {
  position: relative;
  flex: 1;
  cursor: pointer;
}
.qx-period input {
  position: absolute;
  opacity: 0;
}
.qx-period label span {
  display: block;
  text-align: center;
  padding: 6px 8px;
  border: 1px solid var(--qx-line);
  border-radius: 6px;
  font-size: 13px;
}
.qx-period input:checked + span {
  color: var(--qx-leaf);
  border-color: #91b9a4;
  background: #eef6ef;
  font-weight: 650;
}
.qx-period input:focus-visible + span {
  outline: 2px solid var(--qx-leaf);
}
.qx-period small {
  font-size: 11px;
  display: block;
  color: var(--qx-dim);
  margin-top: 6px;
}
.qx-seal {
  padding: 14px 0;
  border-block: 1px solid var(--qx-line);
  font-size: 12px;
  line-height: 1.65;
}
.qx-seal span {
  color: var(--qx-dim);
  margin-right: 10px;
}
.qx-status {
  color: var(--qx-dim);
  font-size: 12px;
  margin: 15px 0 8px;
}
.qx-warn {
  color: #945016;
}
.qx-wide {
  width: 100%;
}
.qx-empty {
  padding: 48px 14px 52px;
  text-align: center;
}
.qx-empty h3 {
  font-size: 16px;
  margin: 10px 0;
}
.qx-empty p {
  font-size: 13px;
  color: var(--qx-dim);
  margin: 0 auto 15px;
}
.qx-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: #ecf3ec;
  color: var(--qx-leaf);
}
.qx-dialog {
  margin: auto;
  width: min(690px, calc(100vw - 30px));
  max-width: none;
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--qx-line);
  border-radius: 13px;
  background: white;
  box-shadow: 0 20px 80px #14291f36;
}
.qx-dialog[open] {
  display: flex;
  flex-direction: column;
}
.qx-dialog::backdrop {
  background: #13281f72;
}
.qx-modal-head,
.qx-modal-foot {
  padding: 15px 21px;
  flex: none;
}
.qx-modal-head p {
  margin-top: 3px;
  font-size: 12px;
}
.qx-modal-foot {
  border-top: 1px solid var(--qx-line);
  justify-content: space-between;
}
.qx-paper-wrap {
  overflow: auto;
  background: #eaf0e9;
  border-top: 1px solid var(--qx-line);
  padding: 22px;
}
.qx-paper {
  border-top: 5px solid var(--qx-leaf);
  margin: auto;
  background: #fff;
  max-width: 440px;
  padding: 25px;
  min-height: 360px;
  box-shadow: 0 1px 7px #26382d16;
}
.qx-paper-company {
  color: var(--qx-leaf);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.qx-paper h2 {
  margin: 4px 0 17px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.qx-paper-meta {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: baseline;
  gap: 3px 6px;
  font-size: 11px;
  line-height: 1.4;
}
.qx-paper-meta span,
.qx-paper-item p,
.qx-paper-item small,
.qx-paper-note p {
  color: var(--qx-dim);
}
.qx-paper-meta b {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.qx-paper-section {
  background: #edf4ec;
  border-radius: 3px;
  color: var(--qx-leaf);
  font-size: 12px;
  padding: 6px 9px;
  margin: 18px 0 2px !important;
}
.qx-paper-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 13px;
  padding: 10px 0;
  border-bottom: 1px solid #e4e9e2;
}
.qx-paper-pic {
  width: 70px;
  height: 70px;
}
.qx-paper-item small {
  font-size: 10px;
}
.qx-paper-item h4 {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
}
.qx-paper-item p,
.qx-paper-note p {
  font-size: 11px;
  line-height: 1.55;
}
.qx-paper-item strong {
  font-size: 16px;
  color: var(--qx-leaf);
}
.qx-paper-item strong small {
  font-weight: normal;
  color: inherit;
}
.qx-paper-item .qx-paper-fee {
  font-size: 10px;
}
.qx-paper-note {
  border-top: 1px solid var(--qx-line);
  margin-top: 18px;
  padding-top: 12px;
  font-size: 12px;
}
.qx-paper-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.qx-paper-disclosure {
  font-size: 10px;
  color: var(--qx-dim);
  margin-top: 16px;
}
.qx-view .qx-money-input input,
.qx-view .qx-search input {
  border: 0;
  padding: 3px;
  background: transparent;
  border-radius: 0;
}
.qx-view .qx-fee input {
  padding: 2px 4px;
}
.qx-modal-head .qx-file-view {
  margin-left: auto;
  border: 0;
  color: var(--qx-leaf);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.qx-file-view:hover {
  text-decoration: underline;
}
.qx-paper-wrap:has(iframe) {
  padding: 0;
}
.qx-paper-wrap iframe {
  display: block;
  border: 0;
  width: 100%;
  height: min(65dvh, 760px);
}
.qx-history-bar {
  flex-wrap: wrap;
}
.qx-search {
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qx-search .qx-icon {
  width: 15px;
  color: var(--qx-dim);
}
.qx-search input {
  min-width: 0;
  width: 170px;
  height: 34px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
}
.qx-history-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 0.6fr 0.85fr 0.85fr minmax(
      110px,
      1fr
    );
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--qx-line);
  font-size: 13px;
}
.qx-history-cols {
  padding-block: 9px;
}
.qx-history-key {
  display: flex;
  align-items: center;
  gap: 11px;
}
.qx-history-key > .qx-icon {
  color: var(--qx-leaf);
}
.qx-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.qx-history-actions button {
  padding: 4px 0;
  color: var(--qx-leaf);
  font-size: 12px;
  font-weight: 550;
}
.qx-history-actions button:hover {
  text-decoration: underline;
}
@media (max-width: 1100px) {
  .qx-grid {
    grid-template-columns: 1fr;
  }
  .qx-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 20px;
  }
  .qx-settings h2,
  .qx-settings .qx-seal {
    grid-column: 1/-1;
  }
  .qx-settings .qx-field,
  .qx-settings .qx-period,
  .qx-settings h2 {
    margin: 0;
  }
  .qx-settings > .qx-field:has(textarea) {
    grid-column: 1/-1;
  }
  .qx-seal {
    padding: 8px 0;
  }
  .qx-settings .qx-status {
    margin: auto 0;
  }
}
@media (max-width: 700px) {
  .qx-grid {
    gap: 12px;
  }
  .qx-line,
  .qx-line-head {
    grid-template-columns:
      minmax(100px, 1.3fr) minmax(70px, 0.8fr) minmax(60px, 0.75fr)
      22px;
    gap: 5px;
    padding-inline: 8px;
  }
  .qx-product {
    gap: 6px;
  }
  .qx-thumb {
    width: 34px;
    height: 34px;
  }
  .qx-product-title {
    font-size: 12px;
  }
  .qx-select {
    padding: 6px 3px;
  }
  .qx-header p {
    font-size: 12px;
  }
  .qx-panel-head,
  .qx-history-bar {
    padding: 12px;
  }
  .qx-history-row {
    grid-template-columns: 1.3fr 0.5fr 1fr;
    gap: 8px;
    padding: 11px;
  }
  .qx-history-row > :nth-child(3),
  .qx-history-row > :nth-child(4) {
    display: none;
  }
  .qx-search input {
    width: 135px;
  }
  .qx-paper-wrap {
    padding: 10px;
  }
  .qx-paper {
    padding: 16px;
  }
  .qx-paper-item {
    grid-template-columns: 60px 1fr;
  }
  .qx-paper-pic {
    width: 60px;
    height: 60px;
  }
}

.qx-header-actions,
.qx-status-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.qx-header-actions {
  justify-content: flex-end;
}
.qx-status-area {
  margin: 12px 0;
}
.qx-status-area .qx-status {
  margin: 0;
}
.qx-line.qx-needs-price {
  background: #fff8ee;
}
.qx-line .qx-money-input:has([aria-invalid="true"]) {
  border-color: #b5743f;
}
.qx-reset {
  margin-top: 4px;
  font-size: 11px;
}
.qx-view [hidden],
.qx-dialog [hidden] {
  display: none;
}
.qx-export-error {
  padding: 8px 20px;
  color: #954724;
  background: #fff5ec;
}
@media (max-width: 550px) {
  .qx-header {
    align-items: flex-start;
  }
  .qx-header-actions {
    gap: 3px;
  }
  .qx-panel-head,
  .qx-tier-label {
    flex-wrap: wrap;
  }
}
