/* WHITE GOLD MEDIA CRM — Deliveries v205
   High-contrast, delivery-only presentation. No workflow rules live here. */

body:has(#app [data-page="deliveries"]),
body:has(.delivery-health) {
  --delivery-navy: #18293f;
  --delivery-blue: #2d5d87;
  --delivery-mint: #eaf5ef;
  --delivery-amber: #fff4da;
  --delivery-red: #fff0ee;
}

.delivery-health {
  overflow: hidden;
  border-color: #cbd7e3 !important;
  box-shadow: 0 8px 24px rgba(24,41,63,.07) !important;
}

.delivery-health .table-toolbar {
  background: #f6f9fc;
  border-bottom: 1px solid #d9e2eb;
}

.delivery-health .table-title {
  color: var(--delivery-navy);
  font-size: 13px;
}

.delivery-health .kpi-card {
  min-height: 104px;
  border: 1px solid #d8e1e9;
  background: #fff;
  box-shadow: none;
}

.delivery-health .kpi-card.green { border-color: #9bc8ae; background: var(--delivery-mint); }
.delivery-health .kpi-card.amber,
.delivery-health .kpi-card.gold { border-color: #ddb861; background: var(--delivery-amber); }
.delivery-health .kpi-card.red { border-color: #e6a39c; background: var(--delivery-red); }
.delivery-health .kc-label { color: #425466; }
.delivery-health .kc-val { color: #172b3f; }
.delivery-health .kc-sub { color: #5c6e7e; line-height: 1.4; }

.delivery-health-note {
  padding: 2px 14px 12px;
  color: #526475;
  font-size: 11px;
  line-height: 1.55;
}

.delivery-queue {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #d7e0e8;
  border-radius: 12px;
  background: #fff;
}

.delivery-attention {
  border-color: #e2bf70;
  background: #fffbf2;
}

.delivery-queue-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.delivery-queue-title {
  color: #23384d;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}

.delivery-queue-explain,
.delivery-queue-foot {
  margin-top: 3px;
  color: #667687;
  font-size: 10px;
  line-height: 1.45;
}

.delivery-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 9px;
}

.delivery-queue-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e1e8;
  border-left: 4px solid #d1a847;
  border-radius: 9px;
  background: #fff;
  color: #20364b;
}

.delivery-queue-card--overdue { border-left-color: #b9453e; }
.delivery-queue-meta { color: #617283; font-size: 11px; line-height: 1.45; }
.delivery-card-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; }

.delivery-record {
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid #d7e1e9;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(24,41,63,.055);
}

.delivery-record--pending { border-left: 4px solid #d1a847; }
.delivery-record--sent { border-left: 4px solid #4f8f6b; background: #fbfdfc; opacity: 1; }

@media (max-width: 720px) {
  .delivery-health > div:nth-child(2) { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .delivery-health .kpi-card { min-height: 92px; }
  .delivery-queue { padding: 11px; }
  .delivery-queue-heading { align-items: stretch; flex-direction: column; }
  .delivery-queue-heading .btn { align-self: flex-start; }
  .delivery-queue-grid { grid-template-columns: 1fr; }
  .delivery-card-actions .btn { flex: 1 1 145px; }
  .delivery-record { padding: 13px; }
}

@media (max-width: 430px) {
  .delivery-health > div:nth-child(2) { grid-template-columns: 1fr !important; }
}
