/* DCompt — replenishment, unmet customer demand and resources */
.customer-request-layout{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  gap:20px;
  align-items:start;
}
.customer-request-panel h3{margin:0 0 12px;font-size:1rem;}
.customer-request-recent{display:grid;gap:10px;}
.customer-request-recent-row{
  display:flex;justify-content:space-between;gap:12px;align-items:center;
  padding:12px 14px;border:1px solid var(--line,#e5e7eb);border-radius:14px;background:var(--surface,#fff);
}
.customer-request-recent-row>div{display:grid;gap:3px;min-width:0;}
.customer-request-recent-row span,.customer-request-recent-row small{color:var(--muted,#64748b);}
.customer-request-hint{margin-top:14px;}
.customer-opportunity-panel .customer-request-table td:first-child{min-width:210px;}
.po-request-badge{display:inline-flex;margin-top:6px;}
.po-quantity-help{margin:14px 0;}
.po-qty-input.is-editing-empty{outline:2px solid rgba(245,158,11,.35);}
.po-toolbar{align-items:center;justify-content:flex-end;flex-wrap:wrap;}
.po-save-status{font-size:.78rem;color:var(--muted,#64748b);font-weight:700;}
.resource-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;overflow:hidden;position:relative;}
.resource-hero h2{margin:.2rem 0 .4rem;font-size:clamp(1.35rem,3vw,2rem);}
.resources-section{overflow:hidden;}
.resource-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.resource-card{
  min-width:0;display:flex;flex-direction:column;gap:12px;padding:18px;
  border:1px solid var(--line,#e5e7eb);border-radius:18px;background:var(--surface,#fff);
}
.resource-card-icon{
  width:42px;height:42px;border-radius:13px;display:grid;place-items:center;
  background:rgba(15,118,110,.09);font-weight:900;font-size:1.05rem;
}
.resource-card h3{margin:4px 0 6px;font-size:1rem;line-height:1.35;}
.resource-card p{margin:0;color:var(--muted,#64748b);font-size:.9rem;line-height:1.55;}
.resource-kicker{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:var(--muted,#64748b);}
.resource-link{margin-top:auto;text-decoration:none;text-align:center;display:inline-flex;align-items:center;justify-content:center;min-height:42px;}
.resources-shop-highlight{border:1px solid rgba(245,158,11,.35);box-shadow:0 12px 32px rgba(15,23,42,.06);}
.resource-shop-card{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98));}
@media (max-width:980px){
  .customer-request-layout{grid-template-columns:1fr;}
  .resource-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:640px){
  .resource-hero{align-items:flex-start;}
  .resource-card-grid{grid-template-columns:1fr;}
  .resource-card{padding:15px;border-radius:16px;}
  .customer-request-recent-row{align-items:flex-start;}
  .po-toolbar{width:100%;justify-content:stretch;}
  .po-toolbar button{flex:1 1 100%;}
  .po-save-status{width:100%;}
  .purchase-order-table .po-qty-input,.purchase-order-table .po-price-input{min-width:92px;}
}

/* ==========================================================
   DCOMPT ENGAGEMENT GUIDANCE V1
   ========================================================== */
.dcompt-engagement-card {
  position: fixed;
  z-index: 2147483000;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px 17px;
  border: 1px solid rgba(25, 74, 60, .16);
  border-radius: 20px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 55px rgba(17, 40, 33, .22);
  backdrop-filter: blur(12px);
  animation: dcomptEngagementIn .22s ease-out;
}

.dcompt-engagement-card.tone-warning { border-color: rgba(170, 103, 0, .28); }
.dcompt-engagement-card.tone-opportunity { border-color: rgba(26, 123, 96, .30); }
.dcompt-engagement-card.tone-action { border-color: rgba(28, 100, 181, .24); }

.dcompt-engagement-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #0a8f68;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.dcompt-engagement-copy { min-width: 0; padding-right: 18px; }
.dcompt-engagement-kicker {
  display: block;
  margin-bottom: 3px;
  color: #08765a;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dcompt-engagement-copy > strong {
  display: block;
  color: #13251f;
  font-size: 17px;
  line-height: 1.28;
}
.dcompt-engagement-copy > p {
  margin: 6px 0 0;
  color: #53635d;
  font-size: 13.5px;
  line-height: 1.48;
}
.dcompt-engagement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.dcompt-engagement-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 800;
}
.dcompt-engagement-close {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5b6863;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.dcompt-engagement-close:hover { background: #eef4f1; }

@keyframes dcomptEngagementIn {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
  .dcompt-engagement-card {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    width: calc(100vw - 18px);
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 13px 14px;
    border-radius: 17px;
  }
  .dcompt-engagement-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
  .dcompt-engagement-copy { padding-right: 12px; }
  .dcompt-engagement-copy > strong { font-size: 15px; }
  .dcompt-engagement-copy > p { font-size: 12.8px; }
  .dcompt-engagement-actions { display: grid; grid-template-columns: 1fr; }
  .dcompt-engagement-actions button { width: 100%; min-height: 42px; }
}
