/* Primitivas globais alinhadas ao design system do AprendizPro. */
:root {
  --navy: #0f172a;
  --blue: #2a47ff;
  --blue-dark: #1b2fcc;
  --brand-light: #eef1ff;
  --muted: #64748b;
  --line: #e2e8f0;
}

html,
body,
button,
input,
select,
textarea,
optgroup,
option {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.workspace {
  color: #0f172a;
}

/* Cabeçalho único para todas as páginas internas. */
.page-heading,
.page-hero:has(h1) {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: initial;
  min-height: 116px;
  padding: 22px 24px;
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.page-heading > div:first-of-type,
.page-hero:has(h1) > div:first-of-type {
  grid-column: 2;
  min-width: 0;
}

.page-heading > svg,
.page-hero:has(h1) > svg,
.estagios-heading-source-icon {
  display: none !important;
}

.estagios-page-heading-icon {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eef1ff;
  color: #2a47ff;
}

.estagios-page-heading-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.7;
}

.page-heading > .button,
.page-heading > [class*="actions"],
.page-hero:has(h1) > .button,
.page-hero:has(h1) > [class*="actions"] {
  grid-column: 3;
  justify-self: end;
}

.page-heading .eyebrow,
.page-hero:has(h1) .eyebrow {
  margin: 0 0 2px;
  color: #8aa0c0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading h1,
.page-hero:has(h1) h1 {
  margin: 0 0 3px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.page-heading p:not(.eyebrow),
.page-hero:has(h1) p:not(.eyebrow) {
  max-width: 900px;
  margin: 0;
  color: #52627d;
  font-size: 14px;
  line-height: 1.45;
}

/* Superfícies e cards reutilizados em todas as áreas. */
.panel,
.metric-card,
.profile-card,
.master-section-card,
.master-summary-card,
.operational-summary-card {
  border-color: #e2e8f0;
}

.panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.panel__heading h2,
.catalog-section-heading h2 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.panel__heading p,
.catalog-section-heading p {
  color: #52627d;
  font-size: 13px;
  line-height: 1.45;
}

.metric-card,
.profile-card,
.master-summary-card,
.operational-summary-card {
  border-radius: 16px;
}

.workspace .metric-card__icon,
.workspace .profile-card__icon,
.workspace .master-section-card__icon,
.workspace .master-stack-row__icon,
.workspace .master-summary-card__icon,
.workspace .operational-summary-card__icon,
.workspace .recent-views-list__icon,
.workspace .session-list__icon,
.workspace .actionable-alert__icon {
  border-radius: 999px;
  background: #eef1ff;
  color: #2a47ff;
}

.workspace .metric-card__icon svg,
.workspace .profile-card__icon svg,
.workspace .master-section-card__icon svg,
.workspace .master-stack-row__icon svg,
.workspace .master-summary-card__icon svg,
.workspace .operational-summary-card__icon svg,
.workspace .recent-views-list__icon svg,
.workspace .session-list__icon svg,
.workspace .actionable-alert__icon svg {
  stroke-width: 1.7;
}

/* Tabelas com a mesma escala, borda e raio do AprendizPro. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff;
  box-shadow: none;
  isolation: isolate;
}

.table-wrap > table,
.table-wrap table {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  background: #fff;
}

.table-wrap thead,
.table-wrap thead tr,
.table-wrap thead th,
.table-wrap thead td {
  background: #f8fafc !important;
}

.table-wrap thead th,
.table-wrap thead td {
  border-top: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.table-wrap thead:first-child tr:first-child > :first-child {
  border-top-left-radius: 15px;
}

.table-wrap thead:first-child tr:first-child > :last-child {
  border-top-right-radius: 15px;
}

.table-wrap th {
  padding: 13px 14px;
  color: #8aa0c0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: left;
  text-transform: uppercase;
}

.table-wrap td {
  padding: 16px 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: middle;
}

.table-wrap tbody tr:not(:last-child) > td,
.table-wrap tbody tr:not(:last-child) > th {
  border-bottom: 1px solid #f1f5f9;
}

.table-wrap tbody tr:last-child > td,
.table-wrap tbody tr:last-child > th {
  border-bottom: 0;
}

.table-wrap td strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.table-wrap td small {
  margin-top: 3px;
  color: #8490a6;
  font-size: 12px;
  line-height: 1.4;
}

.table-wrap .table-select,
.table-wrap select {
  font-size: 12px;
}

.table-wrap td:has(> .empty-state) {
  height: 158px;
  padding: 0 !important;
}

/* Estado vazio único para listas, cards e tabelas. */
.empty-state {
  display: flex;
  min-width: 0;
  min-height: 142px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px;
  color: #a9a9a9;
  text-align: center;
}

.empty-state > svg,
.empty-state > .estagios-empty-source-icon {
  display: none !important;
}

.estagios-empty-state-icon {
  display: inline-flex;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
}

.estagios-empty-state-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.empty-state strong,
.empty-state h3,
.empty-state p {
  margin: 0;
  color: #a9a9a9 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 20px;
}

.empty-state:has(> strong) > p,
.empty-state:has(> h3) > p {
  display: none !important;
}

.profile-card__title strong,
.master-section-card__heading h2,
.operational-summary-card strong,
.session-list strong,
.recent-views-list strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.profile-card p,
.master-section-card p,
.operational-summary-card p,
.session-list p,
.recent-views-list p {
  color: #52627d;
  font-size: 12px;
  line-height: 1.45;
}

.estagios-generated-empty-state {
  width: 100%;
}

@media (max-width: 760px) {
  .page-heading,
  .page-hero:has(h1) {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding: 18px;
  }

  .estagios-page-heading-icon {
    width: 44px;
    height: 44px;
  }

  .page-heading > .button,
  .page-heading > [class*="actions"],
  .page-hero:has(h1) > .button,
  .page-hero:has(h1) > [class*="actions"] {
    grid-column: 2;
    justify-self: start;
  }

  .page-heading h1,
  .page-hero:has(h1) h1 {
    font-size: 20px;
  }

  .table-wrap th {
    padding: 11px 12px;
    font-size: 10px;
  }

  .table-wrap td {
    padding: 13px 12px;
    font-size: 13px;
  }
}
