.metric-link {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  color: inherit;
}

.metric-link small {
  display: block;
  margin-top: auto;
  padding-top: 12px;
  color: var(--green);
  font-weight: 800;
}

.metric-link .metric-alert {
  color: #d92d20;
  text-align: right;
  line-height: 1.45;
}

.metric-link:hover {
  border-color: #a8dccb;
  box-shadow: 0 9px 28px rgba(8, 127, 91, .10);
}

.web-order-detail {
  display: grid;
  gap: 18px;
}

dialog:has(.web-order-detail) {
  width: min(920px, 94vw);
}

.order-detail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.order-allocation-list {
  display: grid;
  gap: 12px;
}

.order-allocation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafb;
}

.order-product-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-product-copy b { font-size: 17px; }
.order-product-copy span { font-weight: 700; color: #344054; }
.order-product-copy small { color: var(--muted); line-height: 1.6; }
.order-product-copy em { color: #d92d20; font-size: 13px; font-style: normal; font-weight: 800; }

.order-quantity-control {
  display: grid;
  grid-template-columns: 42px 70px 42px;
  gap: 7px;
  align-items: center;
}

.order-quantity-control button,
.order-quantity-control input {
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.order-quantity-control button { color: var(--blue); font-size: 20px; }
.order-quantity-control input { width: 70px; padding: 0 5px; }
.delivery-summary { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; }
.delivery-summary p { margin: 8px 0 0; color: #475467; line-height: 1.7; }

.order-confirm-panel {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid #c9e9de;
  border-radius: 12px;
  background: #f2f8f6;
}

.order-confirm-panel > p { margin: 0; color: var(--muted); font-size: 13px; }
.order-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.order-action-buttons,
.order-next-step { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.order-next-step { padding: 16px; border: 1px solid #bfe4d7; border-radius: 12px; background: #f2faf7; }
.form-status { margin: 0; color: var(--muted); }
.form-status.error { color: #d92d20; font-weight: 700; }
.order-logistics-fulfillments{display:grid;gap:12px;padding:16px;border:1px solid #cbe8dd;border-radius:12px;background:#f7fbf9}.order-logistics-head p{margin:5px 0 0;color:var(--muted);font-size:13px}.order-logistics-row{display:grid;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}.order-logistics-row header,.order-logistics-row footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.order-logistics-row header>div{display:grid;gap:3px}.order-logistics-row header small,.order-logistics-row footer small{color:var(--muted)}.order-logistics-row ul,.logistics-handoff-confirm ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.order-logistics-row li,.logistics-handoff-confirm li{display:grid;grid-template-columns:minmax(120px,1fr) minmax(100px,1fr) auto;gap:10px;padding:7px 0;border-bottom:1px solid #eef2f5}.order-logistics-row li span,.logistics-handoff-confirm li span{color:var(--muted)}.order-logistics-row footer{padding-top:2px;color:#087f5b}.logistics-handoff-confirm{display:grid;gap:16px}.logistics-handoff-confirm>p{margin:0;color:#475467;line-height:1.7}.logistics-handoff-confirm dl{display:grid;gap:8px;margin:0;padding:14px;border-radius:10px;background:#f7faf9}.logistics-handoff-confirm dl div{display:grid;grid-template-columns:90px 1fr;gap:10px}.logistics-handoff-confirm dt{color:var(--muted)}.logistics-handoff-confirm dd{margin:0;font-weight:700}
.order-fulfillment-summary{display:grid;gap:12px;padding:16px;border:1px solid #bfe4d7;border-radius:12px;background:#f8fcfa}.order-fulfillment-summary>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.order-fulfillment-summary>header p{margin:4px 0 0;color:var(--muted);font-size:13px}.order-fulfillment-summary-list{display:grid;gap:10px}.order-fulfillment-summary-list article{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,3fr);gap:14px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}.order-fulfillment-product{display:grid;align-content:start;gap:4px}.order-fulfillment-product span{color:var(--muted);font-size:13px}.order-fulfillment-summary dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px;margin:0}.order-fulfillment-summary dl div{padding:8px;border-radius:8px;background:#f4f7f6}.order-fulfillment-summary dt{color:var(--muted);font-size:12px}.order-fulfillment-summary dd{margin:3px 0 0;font-weight:800}.order-fulfillment-summary .signed dd{color:#087f5b}.order-fulfillment-summary .transit dd{color:#1769aa}.order-fulfillment-summary .pending dd{color:#a55b00}.order-fulfillment-summary .exception{background:#fff1f0}.order-fulfillment-summary .exception dd{color:#c0392b}

@media (max-width: 760px) {
  .order-detail-status { align-items: flex-start; flex-direction: column; }
  .order-allocation-item { grid-template-columns: 1fr; }
  .order-quantity-control { justify-content: start; }
  .order-fields { grid-template-columns: 1fr; }
  .order-action-buttons button { flex: 1; min-width: 120px; }
  .order-logistics-row li,.logistics-handoff-confirm li{grid-template-columns:1fr auto}.order-logistics-row li span,.logistics-handoff-confirm li span{grid-column:1/-1}
}

.order-customer-portrait{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px}.order-customer-portrait.compact{max-width:280px}.order-customer-tags{display:flex;gap:5px;flex-wrap:wrap}.order-customer-tags span{padding:4px 7px;border-radius:999px;background:#edf9f3;color:#087f5b;font-size:12px;font-weight:700}.order-customer-portrait small{color:#9a6700}.order-customer-unlinked{margin-top:7px;color:#7a899d;font-size:12px}.order-customer-context-panel{padding:15px;border:1px solid #cbe8dd;border-radius:12px;background:#f3faf7}.order-customer-context-panel>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.order-customer-context-panel p{margin:9px 0 5px;color:#475467}.order-customer-context-panel small{color:#7a5a18}.order-allocation-price-item{grid-template-columns:minmax(240px,1fr) auto;align-items:start}.order-price-context{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;padding:13px;border-radius:10px;background:#fff}.order-price-context>div{display:flex;justify-content:space-between;gap:12px}.order-price-context span,.order-price-context p,.order-price-context small{color:#68758b}.order-price-context p{grid-column:1/-1;margin:0}.order-price-context details{grid-column:1/-1}.order-price-context details small{display:block;padding:5px 0}.order-final-price{grid-column:1/-1;display:grid;grid-template-columns:minmax(140px,220px) 150px auto minmax(140px,1fr);align-items:center;gap:10px;font-weight:800}.order-final-price input{height:44px;border:1px solid #8fcdb9;border-radius:9px;padding:8px 11px;font-weight:800}.order-final-price>span,.order-final-price>small{color:#64748b}.order-final-price>small b{color:#087f5b}.order-fields strong{display:flex;align-items:center;min-height:48px;font-size:22px;color:#087f5b}
@media (max-width:760px){.order-allocation-price-item,.order-price-context{grid-template-columns:1fr}.order-final-price{grid-template-columns:1fr}.order-final-price input{width:100%}}
