.scenario-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--table-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: rgba(21, 27, 35, 0.85);
}

.table tbody tr:hover {
  background: rgba(43, 165, 143, 0.12);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scenario-metrics {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.metric-card {
  background: rgba(21, 27, 35, 0.85);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-card h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.metric-caption {
  color: var(--color-text-subtle);
  font-size: 0.85rem;
}

.scenario-filters {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.scenario-filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.scenario-filters .filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.scenario-filters input,
.scenario-filters select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(8, 12, 19, 0.75);
  color: var(--text);
}

.scenario-form {
  background: rgba(21, 27, 35, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--table-radius);
  margin: 0;
}

.table-responsive .table {
  min-width: 640px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

@media (min-width: 720px) {
  .scenario-filters {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
  }

  .scenario-filters .filter-actions {
    justify-content: flex-end;
  }

  .table-responsive .table {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .breadcrumb {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .table th,
  .table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .table tbody tr {
    border-radius: var(--radius-sm);
  }
}

.scenario-layout {
  display: grid;
  gap: 1.5rem;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 960px) {
  .header-actions {
    justify-content: flex-start;
  }

  .scenario-layout {
    grid-template-columns: 1.1fr 1.9fr;
    align-items: start;
  }
}
