/* Import procurement P1 — PR → PO → Supplier Confirmation → Payments */

.log-flow-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
}

.log-flow-banner span:nth-child(even) {
  color: #94a3b8;
  font-weight: 400;
}

.log-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.log-st-draft { background: #f3f4f6; color: #4b5563; }
.log-st-submitted, .log-st-pending, .log-st-planned { background: #fef3c7; color: #92400e; }
.log-st-approved, .log-st-confirmed, .log-st-supplier-confirmed, .log-st-posted { background: #d1fae5; color: #065f46; }
.log-st-rejected, .log-st-void, .log-st-cancelled { background: #fee2e2; color: #991b1b; }
.log-st-sent-to-supplier { background: #dbeafe; color: #1e40af; }
.log-st-partially-paid { background: #e0e7ff; color: #3730a3; }
.log-st-fully-paid { background: #bbf7d0; color: #14532d; }
.log-st-converted-to-po { background: #ede9fe; color: #5b21b6; }
.log-st-shipment-created { background: #e0f2fe; color: #0369a1; }
.log-st-containers-created { background: #dbeafe; color: #1d4ed8; }
.log-st-booking-assigned { background: #c7d2fe; color: #4338ca; }
.log-st-in-transit { background: #fef3c7; color: #b45309; }
.log-st-customs-clearance { background: #ffedd5; color: #c2410c; }
.log-st-cleared { background: #d1fae5; color: #047857; }
.log-st-inland-transit { background: #fef9c3; color: #a16207; }
.log-st-warehouse-receiving { background: #ecfccb; color: #4d7c0f; }
.log-st-stock-reconciliation { background: #f3e8ff; color: #7e22ce; }

.log-sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.log-sub-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-m, #6b7280);
}

.log-sub-tabs button.active {
  background: var(--odoo-blue, #714B67);
  color: #fff;
  border-color: var(--odoo-blue, #714B67);
}

.log-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.log-kpi {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.log-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--odoo-blue, #714B67);
  font-family: monospace;
}

.log-kpi-lbl {
  font-size: 11px;
  color: var(--text-m, #6b7280);
  margin-top: 4px;
  font-weight: 600;
}

.log-timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}

.log-tl-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.log-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  margin-bottom: 4px;
}

.log-tl-step.done .log-tl-dot,
.log-tl-step.active .log-tl-dot {
  background: #059669;
}

.log-tl-step.active .log-tl-dot {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.log-tl-lbl {
  font-size: 9px;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
  max-width: 72px;
}

.log-tl-step.done .log-tl-lbl,
.log-tl-step.active .log-tl-lbl {
  color: #047857;
  font-weight: 700;
}

.log-tl-line {
  flex: 0 0 12px;
  height: 2px;
  background: #cbd5e1;
  margin-bottom: 18px;
}

.log-tl-line.done {
  background: #059669;
}

.log-empty {
  text-align: center;
  color: var(--text-s, #9ca3af);
  padding: 20px !important;
  font-size: 13px;
}

.log-warn {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

.log-row:hover td {
  background: rgba(59, 130, 246, 0.04);
}

@media (max-width: 900px) {
  .log-grid.grid-2 {
    grid-template-columns: 1fr !important;
  }
}
