/* ── PR357 Dispatch Readiness CSS ────────────────────────────────────────
   TradeRail brand: primary orange #FF6B00, dark #1A1A2E
   All classes scoped to .pr357-* to avoid collisions.
   ──────────────────────────────────────────────────────────────────────── */

.pr357-dispatch-wrap {
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1A1A2E;
  max-width: 900px;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.pr357-dispatch-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid #FF6B00;
  padding-bottom: 10px;
}

.pr357-dispatch-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0;
  letter-spacing: -0.2px;
}

.pr357-dispatch-header-date {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* ── Summary bar ─────────────────────────────────────────────────────── */
.pr357-dispatch-summary {
  background: #f4f6f8;
  border-left: 4px solid #FF6B00;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pr357-dispatch-summary-count {
  font-size: 22px;
  font-weight: 800;
  color: #FF6B00;
  line-height: 1;
}

/* ── TRai insight bar ────────────────────────────────────────────────── */
.pr357-trai-bar {
  background: #1A1A2E;
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pr357-trai-bar-label {
  background: #FF6B00;
  color: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Worker row ──────────────────────────────────────────────────────── */
.pr357-dispatch-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.pr357-dispatch-row:hover {
  border-color: #FF6B00;
  box-shadow: 0 1px 4px rgba(255, 107, 0, 0.1);
}

.pr357-worker-info {
  flex: 1 1 180px;
  min-width: 0;
}

.pr357-worker-name {
  font-size: 14px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr357-worker-role-chip {
  display: inline-block;
  background: #f0f1f3;
  color: #444;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.pr357-assignment-info {
  flex: 2 1 200px;
  min-width: 0;
}

.pr357-assignment-project {
  font-size: 13px;
  font-weight: 600;
  color: #1A1A2E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.pr357-assignment-date {
  font-size: 12px;
  color: #888;
}

/* ── Status badges ───────────────────────────────────────────────────── */
.pr357-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pr357-status-badge-notified {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pr357-status-badge-pending {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.pr357-status-badge-reminder {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ── Action buttons ──────────────────────────────────────────────────── */
.pr357-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pr357-notify-btn {
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.pr357-notify-btn:hover {
  background: #e05e00;
}

.pr357-notify-btn:active {
  background: #c45200;
}

.pr357-notify-btn-secondary {
  background: #fff;
  color: #1A1A2E;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.pr357-notify-btn-secondary:hover {
  border-color: #FF6B00;
  color: #FF6B00;
  background: #fff7f0;
}

.pr357-notify-btn-secondary.pr357-btn-confirming {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.pr357-dispatch-empty {
  text-align: center;
  color: #888;
  padding: 32px 16px;
  font-size: 14px;
}

/* ── Day group section header ────────────────────────────────────────── */
.pr357-day-group-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  margin: 18px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}

/* ── Publish All header button ───────────────────────────────────────── */
.p226-hdr-publish-all-btn {
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 4px;
  transition: background 0.15s;
  vertical-align: middle;
}

.p226-hdr-publish-all-btn:hover {
  background: #e05e00;
}

/* ── Publish button in action menu ───────────────────────────────────── */
.p226-menu-item-publish {
  color: #15803d;
  font-weight: 600;
  border-top: 1px solid #f0f0f0;
}

.p226-menu-item-publish:hover {
  background: #f0fdf4;
}
