.trade-page {
  background: #ffffff;
}

.trade-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 48px;
}

.trade-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.trade-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 16px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(31, 122, 22, 0.12), transparent 48%),
    #f6f6f6;
}

.trade-hero span,
.trade-hero small {
  display: block;
  color: #7b7b7b;
}

.trade-hero strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 32px;
}

.trade-hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 34px;
  border-radius: 17px;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.trade-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 18px 0;
  padding: 4px;
  border-radius: 24px;
  background: #f4f4f4;
}

.trade-mode-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #777777;
  font-weight: 900;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.trade-mode-tabs button.active {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.trade-mode-tabs button:not(.active):focus,
.trade-mode-tabs button:not(.active):focus-visible,
.trade-mode-tabs button:not(.active):active {
  background: transparent;
  color: #777777;
  box-shadow: none;
}

.trade-panel {
  display: none;
}

.trade-panel.active {
  display: block;
  animation: trade-panel-in 160ms ease;
}

@keyframes trade-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-heading {
  margin: 20px 0 14px;
}

.panel-heading h2 {
  margin: 0 0 7px;
  font-size: 22px;
}

.panel-heading span {
  display: block;
  color: #777777;
  font-size: 13px;
  line-height: 1.5;
}

.quick-form {
  display: grid;
  gap: 14px;
}

.field-block,
.quick-form label,
.join-row label {
  display: grid;
  gap: 8px;
  color: #666666;
  font-size: 13px;
}

.quick-form input,
.join-row input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7f7;
  color: #111111;
  padding: 0 14px;
}

.amount-input-card {
  display: grid;
  gap: 8px;
  color: #666666;
  font-size: 13px;
}

.amount-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.amount-entry-row,
.join-input-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #f7f7f7;
}

.amount-input-card input {
  min-height: 48px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 28px;
  font-weight: 900;
}

.amount-input-card b {
  justify-self: end;
  color: #111111;
  font-size: 17px;
}

.quote-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #f7f7f7;
}

.quote-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quote-card span {
  color: #777777;
}

.quote-card strong {
  font-size: 18px;
}

.wide-button {
  width: 100%;
}

.trade-page .form-status {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.trade-page .form-status[data-type="error"] {
  color: #e84d5b;
}

.trade-page .form-status[data-type="success"] {
  color: var(--green);
}

.group-order {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.group-order.welfare-order {
  border-color: rgba(24, 128, 20, 0.28);
  background: linear-gradient(180deg, #f1fbf2 0%, #ffffff 54%);
  box-shadow: 0 14px 34px rgba(24, 128, 20, 0.13);
}

.welfare-ribbon {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #188014;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.group-order.welfare-order .order-top b {
  background: #111111;
  color: #ffffff;
}

.group-order.welfare-order .order-metrics div,
.group-order.welfare-order .order-note,
.group-order.welfare-order .join-input-row {
  background: rgba(24, 128, 20, 0.07);
}

.group-order.welfare-order .progress-line i {
  background: #111111;
}

.order-top,
.order-state,
.order-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-top strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.order-top span,
.order-state,
.order-bottom span {
  color: #777777;
  font-size: 12px;
}

.order-top b {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 13px;
  background: #e9f8ee;
  color: var(--green-2);
  font-size: 12px;
}

.order-top b.done {
  background: #111111;
  color: #ffffff;
}

.order-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.order-metrics div {
  min-height: 70px;
  padding: 10px;
  border-radius: 12px;
  background: #f7f7f7;
}

.order-metrics span {
  display: block;
  margin-bottom: 8px;
  color: #777777;
  font-size: 11px;
}

.order-metrics strong {
  font-size: 15px;
}

.progress-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeeee;
}

.progress-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.order-note {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  background: #f7f7f7;
  color: #666666;
  font-size: 12px;
  line-height: 1.5;
}

.order-note svg {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--green);
}

.join-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
  align-items: end;
}

.join-amount-card {
  display: grid;
  gap: 8px;
}

.join-input-row {
  min-height: 58px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f7f7f7;
}

.join-input-row input {
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
}

.join-input-row b {
  justify-self: end;
  color: #111111;
  font-size: 16px;
  font-weight: 800;
}

.join-row .primary-pill {
  min-height: 50px;
}

.order-bottom strong {
  font-size: 14px;
}
