/* ============================================
   NEXOR 360 — Components
   ============================================ */

/* --- Tables --- */
.proposal-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.proposal-table thead th {
  background: var(--green-primary);
  color: var(--white);
  font-weight: var(--weight-semibold);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border: none;
}

.proposal-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
  line-height: var(--leading-normal);
}

.proposal-table tbody tr:nth-child(even) {
  background: var(--green-very-light);
}

.proposal-table tbody tr:last-child td {
  border-bottom: none;
}

.proposal-table tbody tr.total-row {
  background: var(--green-light);
  font-weight: var(--weight-semibold);
}

.proposal-table tbody td:first-child {
  font-weight: var(--weight-medium);
}

/* --- Callout Box --- */
.callout {
  background: var(--green-very-light);
  border-left: 4px solid var(--green-primary);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--gray-700);
}

.callout p {
  margin: 0;
  max-width: none;
}

.callout strong {
  color: var(--dark-text);
  font-style: normal;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.badge-p0 {
  background: var(--green-primary);
  color: var(--white);
}

.badge-p1 {
  background: var(--green-light);
  color: var(--green-dark);
}

.badge-confidential {
  background: transparent;
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

/* --- Metric Cards --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: box-shadow var(--ease-default);
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
}

.metric-card__id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--green-primary);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.metric-card__name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.metric-card__target {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* --- Team Cards --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: box-shadow var(--ease-default);
}

.team-card:hover {
  box-shadow: var(--shadow-md);
}

.team-card__role {
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--green-primary);
  font-size: var(--text-sm);
}

.team-card__desc {
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.team-card__dedication {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--gray-500);
}

/* --- Gantt Chart --- */
.gantt {
  margin: var(--space-6) 0;
  overflow-x: auto;
}

.gantt-grid {
  display: grid;
  grid-template-columns: 160px repeat(6, 1fr);
  gap: 2px;
  min-width: 700px;
  font-size: var(--text-sm);
}

.gantt-header {
  display: contents;
}

.gantt-header-label {
  background: var(--gray-100);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-semibold);
  color: var(--gray-500);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.gantt-header-week {
  background: var(--green-primary);
  color: var(--white);
  padding: var(--space-3) var(--space-2);
  font-weight: var(--weight-semibold);
  text-align: center;
  font-size: var(--text-xs);
}

.gantt-header-week:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.gantt-row {
  display: contents;
}

.gantt-label {
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
}

.gantt-cell {
  padding: var(--space-2);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gantt-bar {
  width: 100%;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--white);
}

.gantt-bar--setup { background: var(--gray-700); }
.gantt-bar--orq { background: var(--orq-border); }
.gantt-bar--preventa { background: var(--preventa-border); }
.gantt-bar--cfo { background: var(--cfo-border); }
.gantt-bar--radar { background: var(--radar-border); }
.gantt-bar--frontend { background: #00838F; }
.gantt-bar--e2e { background: var(--green-primary); }

/* --- Steps (Proximos Pasos) --- */
.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
}

.steps-list li {
  counter-increment: step;
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

.steps-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
}

/* --- Risk Tags --- */
.risk-high { color: var(--state-error-border); font-weight: var(--weight-semibold); }
.risk-medium { color: var(--orq-border); font-weight: var(--weight-semibold); }
.risk-low { color: var(--radar-border); font-weight: var(--weight-semibold); }

/* --- Section intro --- */
.section-intro {
  font-size: var(--text-lg);
  color: var(--gray-700);
  margin-bottom: var(--space-8);
  max-width: 65ch;
}

/* --- Two column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
