/* ============================================================
   PR336 — Project Genesis Engine Styles
   TradeRail Field Portal
   Tenant-neutral. No hardcoded company names.
   Lily bar: purple left border #7C3AED, bg #f5f0ff
   Confirm button: orange #FF6B00
   ============================================================ */

/* ── Panel container ─────────────────────────────────────────── */
.genesis-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin: 0 0 24px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1a202c;
}

.genesis-panel-header {
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
}

.genesis-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 4px 0;
}

.genesis-lily-subtitle {
  font-size: 12px;
  color: #7C3AED;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ── Bid awarded My Day card ─────────────────────────────────── */
.genesis-card-bid-awarded {
  background: #f8fafc;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  transition: box-shadow 0.15s ease;
}

.genesis-card-bid-awarded:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.genesis-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.genesis-bid-id {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  background: #edf2f7;
  color: #4a5568;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.genesis-bid-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  flex: 1;
}

.genesis-bid-type {
  font-size: 11px;
  color: #718096;
  background: #edf2f7;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: capitalize;
}

/* ── Step list ───────────────────────────────────────────────── */
.genesis-step-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  counter-reset: genesis-step;
}

.genesis-step-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 13px;
  color: #718096;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  gap: 8px;
  counter-increment: genesis-step;
}

.genesis-step-item::before {
  content: counter(genesis-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #718096;
  font-size: 11px;
  font-weight: 600;
}

/* Pending state (default) */
.genesis-step-item.pending {
  color: #a0aec0;
}

/* Active / in-progress state */
.genesis-step-item.active {
  background: #fffbeb;
  border-color: #f6c144;
  color: #744210;
}

.genesis-step-item.active::before {
  background: #f6c144;
  color: #744210;
  animation: genesis-pulse 1.2s ease-in-out infinite;
}

@keyframes genesis-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.9); }
}

/* Complete state */
.genesis-step-item.complete {
  background: #f0fff4;
  border-color: #68d391;
  color: #22543d;
}

.genesis-step-item.complete::before {
  content: '';
  background: #48bb78;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 6l3 3 5-5-1-1-4 4-2-2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}

/* Failed state */
.genesis-step-item.failed {
  background: #fff5f5;
  border-color: #fc8181;
  color: #742a2a;
}

.genesis-step-item.failed::before {
  content: 'X';
  background: #fc8181;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

/* ── Review form ─────────────────────────────────────────────── */
.genesis-review-form {
  margin: 12px 0;
}

.genesis-field-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.genesis-field-row label {
  width: 140px;
  min-width: 140px;
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  padding-top: 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.genesis-field-row input {
  flex: 1;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  color: #2d3748;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}

.genesis-field-row input:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

/* ── Milestone list ──────────────────────────────────────────── */
.genesis-milestone-list {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
}

.genesis-milestone-list strong {
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 6px;
}

.genesis-milestone-list ul {
  margin: 0;
  padding: 0 0 0 16px;
  color: #4a5568;
  line-height: 1.8;
}

.genesis-milestone-list li {
  border-bottom: 1px solid #edf2f7;
  padding: 2px 0;
}

.genesis-milestone-list li:last-child {
  border-bottom: none;
}

/* ── Permit checklist ────────────────────────────────────────── */
.genesis-permit-list {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
}

.genesis-permit-list strong {
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 6px;
}

.genesis-permit-list ul {
  margin: 0;
  padding: 0 0 0 16px;
  color: #4a5568;
  line-height: 1.8;
}

.genesis-permit-list li {
  border-bottom: 1px solid #edf2f7;
  padding: 2px 0;
}

.genesis-permit-list li:last-child {
  border-bottom: none;
}

/* ── Crew suggestion ─────────────────────────────────────────── */
.genesis-crew-suggestion {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 13px;
  color: #4a5568;
}

.genesis-crew-gap {
  display: inline-block;
  background: #fed7d7;
  color: #742a2a;
  font-weight: 600;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* ── Confirm button ──────────────────────────────────────────── */
.genesis-confirm-btn {
  display: inline-block;
  background: #FF6B00;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

.genesis-confirm-btn:hover {
  background: #e05f00;
}

.genesis-confirm-btn:active {
  transform: scale(0.98);
  background: #cc5500;
}

.genesis-confirm-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
}

/* ── Lily insight bar ────────────────────────────────────────── */
.genesis-insight-tier {
  border-left: 4px solid #7C3AED;
  background: #f5f0ff;
  padding: 10px 14px;
  margin: 12px 0 0 0;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #4c1d95;
  display: flex;
  align-items: center;
  gap: 8px;
}

.genesis-insight-icon {
  font-size: 11px;
  font-weight: 700;
  background: #7C3AED;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Tier-specific accent tints */
.genesis-insight-tier-a {
  border-left-color: #7C3AED;
  background: #f5f0ff;
  color: #4c1d95;
}

.genesis-insight-tier-b {
  border-left-color: #d69e2e;
  background: #fffff0;
  color: #744210;
}

.genesis-insight-tier-b .genesis-insight-icon {
  background: #d69e2e;
}

.genesis-insight-tier-c {
  border-left-color: #e53e3e;
  background: #fff5f5;
  color: #742a2a;
}

.genesis-insight-tier-c .genesis-insight-icon {
  background: #e53e3e;
}

.genesis-insight-tier-d {
  border-left-color: #dd6b20;
  background: #fffaf0;
  color: #7b341e;
}

.genesis-insight-tier-d .genesis-insight-icon {
  background: #dd6b20;
}

/* ── Public works flag ───────────────────────────────────────── */
.genesis-public-works-flag {
  background: #fffaf0;
  border: 1px solid #f6ad55;
  border-left: 4px solid #ed8936;
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 13px;
  color: #7b341e;
}

.genesis-public-works-flag strong {
  font-weight: 700;
  color: #c05621;
}

/* ── Already-created badge ───────────────────────────────────── */
.genesis-already-created {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 13px;
  color: #276749;
}

.genesis-already-created a {
  color: #2b6cb0;
  font-weight: 600;
  text-decoration: none;
}

.genesis-already-created a:hover {
  text-decoration: underline;
}

/* ── Responsive adjustments ──────────────────────────────────── */
@media (max-width: 640px) {
  .genesis-field-row {
    flex-direction: column;
    gap: 4px;
  }

  .genesis-field-row label {
    width: auto;
    min-width: auto;
    padding-top: 0;
  }

  .genesis-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
