/* Semantix Partner Hub: visual da marca Semantix (variação A do redesenho, "sóbria"):
   menu lateral claro com ícones e grupos, faixa de boas-vindas com cantos de blueprint,
   cartões com cantos suaves, selos de status com ponto e tabelas com destaque na linha. */
@font-face {
  font-family: 'Geist';
  src: url('/hub/assets/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f6f4fb;
  --surface: #f4f1fa;
  --card: #fff;
  --text: #16121f;
  --muted: #6b6478;
  --divider: #e7e2f1;
  --brand: #5a179a;
  --accent: #7f35fd;
  --a50: #faf7ff;
  --a100: #f4edff;
  --a200: #e6d7ff;
  --a300: #cfb2ff;
  --a500: #9860fd;
  --a700: #5a179a;
  --a800: #3f1070;
  --a900: #25084a;
  --ok: #1e7a45;
  --ok-bg: #e6f4ec;
  --warn: #9a5b00;
  --warn-bg: #fff2dc;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --info: #1d5fa8;
  --info-bg: #e8f0fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(37 8 74 / 4%);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font:
    15px/1.5 Geist,
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
a {
  color: var(--a700);
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 600;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 8px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.pre {
  white-space: pre-wrap;
  margin: 0;
}
.loading {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Cantos de blueprint, como no site da Semantix */
.bp {
  --bpc: var(--accent);
  background-image:
    linear-gradient(var(--bpc), var(--bpc)), linear-gradient(var(--bpc), var(--bpc)),
    linear-gradient(var(--bpc), var(--bpc)), linear-gradient(var(--bpc), var(--bpc)),
    linear-gradient(var(--bpc), var(--bpc)), linear-gradient(var(--bpc), var(--bpc)),
    linear-gradient(var(--bpc), var(--bpc)), linear-gradient(var(--bpc), var(--bpc));
  background-repeat: no-repeat;
  background-size:
    14px 1.5px,
    1.5px 14px,
    14px 1.5px,
    1.5px 14px,
    14px 1.5px,
    1.5px 14px,
    14px 1.5px,
    1.5px 14px;
  background-position:
    0 0,
    0 0,
    100% 0,
    100% 0,
    0 100%,
    0 100%,
    100% 100%,
    100% 100%;
}

/* Marca */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  display: block;
  height: 19px;
  width: auto;
}
.brand-tag {
  white-space: nowrap;
  padding: 2px 7px;
  border: 1px solid var(--a300);
  border-radius: 4px;
  color: var(--a700);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Botões e campos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -10px rgb(127 53 253 / 90%);
}
.btn-primary:hover:not(:disabled) {
  background: #6d24e0;
}
.btn-secondary {
  background: #fff;
  border-color: var(--divider);
  color: var(--a800);
}
.btn-secondary:hover {
  border-color: var(--a300);
  background: var(--a50);
}
.btn-ghost {
  background: transparent;
  color: var(--a700);
  padding: 8px 10px;
}
.btn-ghost:hover {
  background: var(--a100);
}
.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
.input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.input:hover {
  border-color: var(--a300);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--a100);
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea.input {
  resize: vertical;
}
.field {
  display: grid;
  gap: 5px;
}
.field.wide,
.wide {
  grid-column: 1 / -1;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.check input {
  accent-color: var(--accent);
}
.form {
  display: grid;
  gap: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.form-section {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  font-size: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--a700);
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}
.copy {
  margin-top: 8px;
}

/* Avisos e selos */
.alert {
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid;
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 14px;
}
.alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.alert-info {
  background: var(--info-bg);
  border-color: color-mix(in srgb, var(--info) 25%, transparent);
  border-left-color: var(--info);
}
.alert-ok {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
  border-left-color: var(--ok);
}
.alert-warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
  border-left-color: var(--warn);
}
.alert-bad {
  background: var(--bad-bg);
  border-color: color-mix(in srgb, var(--bad) 25%, transparent);
  border-left-color: var(--bad);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-neutral {
  background: var(--surface);
  color: var(--muted);
}
.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.badge-brand {
  background: var(--a100);
  color: var(--a700);
}
.badge-info {
  background: var(--info-bg);
  color: var(--info);
}
.empty {
  padding: 28px;
  border: 1px dashed var(--a300);
  border-radius: var(--radius);
  background: var(--a50);
  color: var(--muted);
  text-align: center;
}

/* Login e telas públicas */
.auth {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 24px;
  background:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(80% 90% at 85% 0%, #7f35fd 0%, transparent 55%),
    linear-gradient(135deg, var(--a900), var(--a800) 60%, var(--a700));
}
.auth-card {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 34px;
  border-radius: 14px;
  background-color: #fff;
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / 50%);
}
.auth-card h1 {
  margin-top: 12px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}
.auth-foot {
  color: rgb(255 255 255 / 70%);
  font-size: 13px;
  text-align: center;
  margin: 0;
}
.lede {
  color: var(--muted);
  margin: 6px 0 0;
  max-width: 72ch;
}

/* Estrutura: menu lateral claro + área principal */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidenav {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 14px;
  background: var(--card);
  border-right: 1px solid var(--divider);
}
.side-brand {
  padding: 0 8px;
  text-decoration: none;
}
.side-groups {
  display: grid;
  gap: 18px;
}
.navgroup {
  display: grid;
  gap: 2px;
}
.navgroup-label {
  margin: 0;
  padding: 0 10px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a92a8;
}
.navitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #3b3449;
  text-decoration: none;
  font-size: 14px;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.navitem svg {
  color: #8a82a0;
}
.navitem:hover {
  background: var(--a50);
}
.navitem.active {
  background: var(--a100);
  color: var(--a700);
  font-weight: 600;
}
.navitem.active svg {
  color: var(--accent);
}
.navitem.active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.side-foot {
  margin: auto 0 0;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #8a82a0;
}
.side-foot strong {
  color: var(--a700);
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 36px);
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-brand {
  display: none;
  text-decoration: none;
}
.me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--brand));
}
.who {
  display: grid;
  line-height: 1.25;
}
.who-name {
  font-weight: 600;
  font-size: 13.5px;
}
.who-role {
  font-size: 12px;
  color: var(--muted);
}
.iconbtn,
.menu-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--divider);
  border-radius: 9px;
  background: #fff;
  color: #3b3449;
  cursor: pointer;
}
.iconbtn:hover,
.menu-btn:hover {
  border-color: var(--a300);
  color: var(--a700);
}
.menu-btn {
  display: none;
}
.content {
  padding: 6px clamp(16px, 3vw, 36px) 64px;
  max-width: 1320px;
  width: 100%;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.page-actions,
.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions-row {
  margin: 0 0 18px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters .input {
  width: auto;
  min-width: 220px;
  flex: 1;
  max-width: 360px;
}

/* Início: faixa de boas-vindas */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  margin-bottom: 18px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background-color: var(--a50);
}
.hero h1 {
  margin-top: 2px;
}
.todo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-width: 320px;
}
.todo li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
}
.todo b {
  min-width: 26px;
  font-size: 18px;
  font-weight: 600;
  color: var(--a700);
  font-variant-numeric: tabular-nums;
}
.todo li span {
  flex: 1;
}
.todo-action {
  padding: 6px 11px;
  border-radius: 7px;
  background: var(--a100);
  color: var(--a700);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.todo li.hot .todo-action {
  background: var(--accent);
  color: #fff;
}

/* Indicadores */
.kpis,
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.kpi {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
a.kpi:hover {
  border-color: var(--a300);
  box-shadow: 0 10px 24px -16px rgb(37 8 74 / 35%);
}
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--a100);
  color: var(--accent);
}
.kpi-icon svg {
  width: 17px;
  height: 17px;
}
.kpi-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-label {
  font-size: 13px;
  color: var(--muted);
}
.delta {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.delta-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.delta-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
/* Indicador simples (telas de oportunidades e leads) */
.stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
a.stat:hover {
  border-color: var(--a300);
}
.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
}
.stat-warn {
  box-shadow: inset 3px 0 0 var(--warn);
}

/* Funil */
.funnel {
  display: grid;
  gap: 12px;
}
.frow {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  font-size: 13.5px;
}
.fbar {
  height: 24px;
  border-radius: 6px;
  background: var(--a100);
  overflow: hidden;
}
.fbar i {
  display: block;
  height: 100%;
  border-radius: 6px;
}
.fbar .f1 {
  background: var(--a300);
}
.fbar .f2 {
  background: var(--accent);
}
.fbar .f3 {
  background: var(--brand);
}
.fv {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.funnel-note {
  margin: 14px 0 0;
}

/* Cartões e listas */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  min-width: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.card-head a {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.card-head a:hover {
  text-decoration: underline;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 11px 0;
  border-top: 1px solid var(--divider);
}
.list li:first-child {
  border-top: 0;
  padding-top: 2px;
}
.list li > a {
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}
.list li > a:hover {
  color: var(--a700);
  text-decoration: underline;
}
.list li .muted {
  grid-column: 1;
}
.list li .badge {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}
.list li.mat {
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}
.mat-icon {
  grid-row: 1 / span 2;
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--a100);
  color: var(--a700);
}
.list li.mat .muted {
  grid-column: 2;
}
.dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 12px;
  margin: 12px 0 0;
  font-size: 14px;
}
.dl dt {
  color: var(--muted);
}
.dl dd {
  margin: 0;
}

/* Materiais */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.mcard:hover {
  border-color: var(--a300);
  box-shadow: 0 10px 24px -16px rgb(37 8 74 / 35%);
}
.mcard h3 {
  margin: 4px 0 0;
  font-size: 16px;
}
.mcard p {
  margin: 0;
}
.mcard-top {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tags {
  font-size: 13px;
  color: var(--a700);
}
.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto !important;
}
.mcard-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Tabelas */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--a50);
  border-bottom: 1px solid var(--divider);
}
.table td {
  padding: 12px 14px;
  border-top: 1px solid var(--divider);
  vertical-align: top;
}
.table tbody tr:first-child td {
  border-top: 0;
}
.table tbody tr:hover td {
  background: var(--a50);
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Histórico */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: grid;
  gap: 2px;
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--a200);
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.tl-when {
  font-size: 12px;
  color: var(--muted);
}
.tl-what {
  font-weight: 500;
}
.tl-note {
  font-size: 14px;
  color: var(--muted);
  white-space: pre-wrap;
}

/* Regras e níveis */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.tier {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--divider);
  border-top: 4px solid var(--a300);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tier-prata {
  border-top-color: #9aa3b5;
}
.tier-ouro {
  border-top-color: #c9a227;
}
.tier.current {
  box-shadow: 0 0 0 2px var(--accent);
}
.tier ul,
.rules ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.rules h2 {
  margin-bottom: 12px;
}

/* Janela */
.modal {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / 45%);
}
.modal::backdrop {
  background: rgb(37 8 74 / 55%);
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  background: #fff;
}
.modal-close {
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
}
.modal-body {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}
.modal-body p {
  margin: 0;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
  position: sticky;
  bottom: 0;
  background: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .content > * {
    animation: rise 0.35s ease both;
  }
  @keyframes rise {
    from {
      transform: translateY(6px);
    }
    to {
      transform: none;
    }
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .todo {
    min-width: 0;
  }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .menu-btn {
    display: grid;
  }
  .topbar-brand {
    display: inline-flex;
  }
  .sidenav {
    display: none;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100vh - 66px);
    z-index: 6;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
    box-shadow: 0 20px 40px -20px rgb(37 8 74 / 40%);
  }
  .sidenav.open {
    display: flex;
  }
  .side-brand,
  .side-foot {
    display: none;
  }
  .navitem.active::before {
    display: none;
  }
  .who {
    display: none;
  }
  .topbar {
    background: #fff;
    border-bottom: 1px solid var(--divider);
  }
  .grid2,
  .tiers,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dl {
    grid-template-columns: 1fr;
  }
  .dl dt {
    margin-top: 6px;
  }
  .filters .input {
    max-width: none;
  }
  .kpis,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-value,
  .stat-value {
    font-size: 20px;
  }
}
@media (max-width: 520px) {
  .kpis,
  .stats {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 20px;
  }
}

/* --- Academy --------------------------------------------------------------------------------- */
.small {
  font-size: 12.5px;
}
.mono {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a {
  color: var(--muted);
}
.h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.tech-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--a100);
  color: var(--a700);
  font-size: 11.5px;
  font-weight: 600;
}
.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hstat {
  display: grid;
  gap: 2px;
  min-width: 140px;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: #fff;
}
.hstat b {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hstat span {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 180px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.chip {
  padding: 7px 14px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--a300);
}
.chip.on {
  border-color: var(--accent);
  background: var(--a100);
  color: var(--a700);
  font-weight: 600;
}
.trail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.trail-head p {
  margin: 2px 0 0;
}
.trail-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--a100);
  color: var(--a700);
  font-size: 12px;
  font-weight: 700;
}
.trail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.tcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}
.tcard h3 {
  margin: 2px 0 0;
  font-size: 15px;
}
.tcard p {
  margin: 0;
}
.tcard-top,
.tcard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tcard-foot {
  margin-top: auto;
}
.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--a100);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s;
}
.bar > span.ok {
  background: var(--ok);
}
.bar.grow {
  flex: 1;
  min-width: 120px;
}
.learn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.learn-side .card {
  margin-bottom: 14px;
}
.player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: #16121f;
}
.player-empty {
  display: grid;
  place-items: center;
  color: #cfc8dc;
  font-size: 14px;
}
.lesson h2 {
  margin: 4px 0 12px;
  font-size: 20px;
}
.lesson .pre {
  margin: 0 0 12px;
  max-width: 72ch;
}
.lesson .actions-row {
  margin: 16px 0 0;
}
.mod {
  margin-top: 14px;
}
.mod-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}
.lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.lesson-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.lesson-btn:hover {
  background: var(--surface);
}
.lesson-btn.on {
  background: var(--a100);
  color: var(--a700);
  font-weight: 600;
}
.tick {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--a300);
  color: var(--a700);
  font-size: 10px;
}
.lesson-btn.done .tick {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}
.exam-box .btn {
  width: 100%;
  justify-content: center;
}
.locked {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
}
.question h2 {
  margin: 4px 0 16px;
  font-size: 19px;
  line-height: 1.35;
}
.options {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  border-radius: 9px;
  cursor: pointer;
}
.option:hover {
  border-color: var(--a300);
}
.option.on {
  border-color: var(--accent);
  background: var(--a50);
}
.option input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.qnav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.qnav button {
  height: 38px;
  border: 1px solid var(--divider);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
.qnav button.done {
  background: var(--a100);
  border-color: var(--a300);
  color: var(--a700);
}
.qnav button.on {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.learn-side .btn {
  width: 100%;
  justify-content: center;
}
.rules-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.result {
  max-width: 560px;
  text-align: center;
  padding: 32px;
}
.result p {
  margin: 0 0 12px;
}
.score {
  font-size: 56px !important;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 10px !important;
}
.result.pass .score {
  color: var(--ok);
}
.result.fail .score {
  color: var(--bad);
}

/* Certificado */
.cert-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.cert-card {
  padding: 14px;
}
.cert-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 34px 36px 28px;
  border: 1px solid var(--a300);
  background: radial-gradient(60% 50% at 100% 0%, var(--a100), transparent 70%), #fff;
}
.cert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cert-logo {
  height: 20px;
  width: auto;
  display: block;
}
.cert-kind {
  padding: 5px 10px;
  border: 1px solid var(--a300);
  border-radius: 4px;
  color: var(--a700);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cert-demo {
  margin: 18px 0 0;
  padding: 6px 10px;
  align-self: flex-start;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cert-eyebrow {
  margin: auto 0 6px;
  padding-top: 40px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cert-name {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cert-text {
  margin: 0;
  max-width: 60ch;
  font-size: 15.5px;
}
.cert-text strong {
  color: var(--a700);
}
.cert-foot {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: auto;
  padding-top: 48px;
  font-size: 13px;
}
.cert-foot > div {
  display: grid;
  gap: 2px;
}
.cert-line {
  display: block;
  height: 1px;
  margin-bottom: 8px;
  background: var(--text);
}
.cert-qr {
  justify-items: end;
  color: var(--muted);
}
.qr {
  width: auto;
  height: auto;
}

/* Verificação pública */
.auth-card.verify {
  width: min(520px, calc(100vw - 32px));
}
.verify .cert-logo {
  height: 18px;
}
.verify h1 {
  margin-top: 0;
}
.verify-form {
  display: flex;
  gap: 8px;
}
.verify-form .input {
  flex: 1;
  text-transform: uppercase;
}
.verified {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}
.verified .badge {
  justify-self: start;
  margin-top: 10px;
}
.verified .cert-name {
  font-size: 26px;
  margin: 0;
}
.verified .dl {
  grid-template-columns: 110px 1fr;
}
.verify .auth-foot {
  color: var(--muted);
}

/* Matriz do canal */
.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
}
.cc {
  display: inline-block;
  min-width: 26px;
  margin-right: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  text-align: center;
}
.cc.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.cc.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.matrix th:not(:first-child),
.matrix td.cell {
  text-align: center;
}
.cell-note {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.cell-note.ok {
  color: var(--ok);
}
.cell-note.off {
  color: var(--bad);
}

/* Montagem das trilhas */
.bsec h2 {
  margin-bottom: 12px;
}
.bsec .card-head h2 {
  margin: 0;
}
.bsec > .btn {
  margin-top: 4px;
}
.bsec .check {
  margin-top: 14px;
}
.bmod {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--a50);
}
.bmod-head,
.blesson-row,
.bopt,
.inline-form,
.video-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bmod-head {
  margin-bottom: 10px;
}
.bmod-head .input {
  font-weight: 600;
}
.blesson,
.bq {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--divider);
  border-radius: 9px;
  background: #fff;
}
.input.narrow {
  width: 96px;
  flex: none;
}
.video-row {
  flex-wrap: wrap;
}
.file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.bopt {
  padding-left: 22px;
}
.bopt input[type='radio'] {
  accent-color: var(--ok);
}
.form-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.inline-form {
  max-width: 520px;
}
.danger-zone {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}

.cert-layout .dl {
  grid-template-columns: 96px 1fr;
}
.cert-layout .actions-row {
  margin: 16px 0 0;
}
.impact .badge {
  white-space: normal;
  line-height: 1.3;
}
@media (max-width: 1100px) {
  .learn,
  .cert-layout {
    grid-template-columns: 1fr;
  }
  .form-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .trail-cards {
    grid-template-columns: 1fr;
  }
  .cert-sheet {
    min-height: 0;
    padding: 22px 18px;
  }
  .cert-foot {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cert-qr {
    justify-items: start;
  }
  .blesson-row {
    flex-wrap: wrap;
  }
  .form-grid.five {
    grid-template-columns: 1fr;
  }
  .verify-form {
    flex-direction: column;
  }
  .hero-stats {
    display: grid;
  }
  .hstat {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px;
  }
  .hstat b {
    font-size: 20px;
  }
  .hstat span {
    max-width: none;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
  body {
    background: #fff;
  }
  .sidenav,
  .topbar,
  .no-print {
    display: none !important;
  }
  .shell,
  .cert-layout {
    display: block;
  }
  .content {
    padding: 0;
    max-width: none;
  }
  .content > * {
    animation: none !important;
  }
  .cert-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .cert-sheet {
    min-height: 175mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Candidaturas ao programa de parceiros */
.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}
.app-message {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--a300);
  background: var(--a50);
  font-size: 14px;
  white-space: pre-wrap;
}
.app-history {
  margin: 20px 0 8px;
  font-size: 15px;
}

/* Login: entrar à esquerda, o programa de parceiros à direita (embaixo no celular). */
.auth.auth-split {
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr);
  place-content: stretch;
  gap: 0;
  padding: 0;
  background: #fff;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100% - 48px));
  margin: 40px 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}
.login-links {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.login-signup {
  margin: 10px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: 14px;
  color: var(--muted);
}
.login-signup a {
  font-weight: 600;
}
.program {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  padding: 56px clamp(28px, 6vw, 88px);
  color: #fff;
  background:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(80% 90% at 85% 0%, #7f35fd 0%, transparent 55%),
    linear-gradient(135deg, var(--a900), var(--a800) 60%, var(--a700));
}
.program-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--a300);
}
.program h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
  color: #fff;
}
.program-points {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.program-points li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}
.program-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 10px;
  background: rgb(255 255 255 / 8%);
}
.program-icon svg {
  width: 20px;
  height: 20px;
}
.program-points strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
}
.program-points span {
  font-size: 14.5px;
  color: rgb(255 255 255 / 78%);
}
.program-link {
  align-self: flex-start;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media (max-width: 860px) {
  .auth.auth-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .program {
    min-height: 0;
    padding: 40px 24px;
  }
}
