/* Focused consignment management UI */

.consignment-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.consignment-entry-card {
  position: sticky;
  top: 92px;
}

.consignment-balance-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.consignment-balance-box article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
}

.consignment-balance-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.consignment-balance-box strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consignment-table-card {
  min-width: 0;
}

.consignment-table {
  min-width: 980px;
}

.consignment-table th,
.consignment-table td {
  vertical-align: middle;
}

.consignment-identity {
  display: grid;
  gap: 4px;
  min-width: 210px;
}

.consignment-identity strong,
.consignment-identity span,
.consignment-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consignment-identity strong {
  font-size: 14px;
}

.consignment-identity span {
  color: #3f4943;
  font-size: 13px;
  font-weight: 650;
}

.consignment-identity small {
  color: var(--muted);
  font-size: 11px;
}

.consignment-qty-grid,
.consignment-money-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px 12px;
}

.consignment-qty-grid div,
.consignment-money-grid div {
  display: grid;
  gap: 2px;
}

.consignment-qty-grid span,
.consignment-money-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.consignment-qty-grid strong,
.consignment-money-grid strong {
  font-size: 13px;
  white-space: nowrap;
}

.consignment-money-grid .is-profit strong {
  color: #148955;
}

.consignment-liability {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.consignment-liability strong {
  font-size: 15px;
}

.consignment-liability small {
  color: var(--muted);
  font-size: 11px;
}

.consignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 160px;
}

.consignment-actions .button {
  min-height: 34px;
  padding: 7px 11px;
}

.consignment-dialog {
  width: min(92vw, 560px);
  max-height: 88vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(13, 28, 20, .3);
}

.consignment-dialog::backdrop {
  background: rgba(10, 24, 16, .58);
  backdrop-filter: blur(3px);
}

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

.consignment-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.consignment-dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: #f0f3f1;
  color: #36413b;
  font-size: 20px;
  cursor: pointer;
}

.consignment-dialog-body {
  max-height: calc(88vh - 90px);
  overflow-y: auto;
  padding: 20px 22px 22px;
}

.consignment-dialog-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.consignment-dialog-summary article {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dfe6e1;
  border-radius: 12px;
  background: #f8fbf9;
}

.consignment-dialog-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.consignment-dialog-summary strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consignment-dialog .stack-form {
  gap: 14px;
}

.consignment-dialog-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.consignment-account-balances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.consignment-account-balances div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.consignment-account-balances span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.consignment-account-balances strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .consignment-layout {
    grid-template-columns: 1fr;
  }

  .consignment-entry-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .consignment-balance-box,
  .consignment-account-balances,
  .consignment-dialog-summary {
    grid-template-columns: 1fr;
  }

  .consignment-dialog {
    width: calc(100vw - 20px);
  }

  .consignment-dialog-head,
  .consignment-dialog-body {
    padding-inline: 16px;
  }
}
