:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-soft: #f1f3f6;
  --line: #e6e9ee;
  --line-strong: #cfd4dc;
  --text: #111318;
  --muted: #616b78;
  --subtle: #8a94a3;
  --accent: #2f6fed;
  --accent-strong: #1e50c4;
  --accent-soft: #eaf1ff;
  --success: #0d7f5f;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --shadow: 0 10px 28px rgba(19, 24, 32, 0.06);
  --radius: 10px;
  --sidebar-bg: #0a1729;
  --sidebar-bg-soft: #0f2338;
}

* {
  box-sizing: border-box;
}

/*
 * Vários elementos (.kpi-preview, .chart-preview-panel etc.) definem `display`
 * explicitamente. Isso empata em especificidade com a regra padrão do navegador
 * `[hidden] { display: none }` e, como a regra do autor vem depois no cascade,
 * ela vencia — deixando o elemento com `hidden` visível e ocupando espaço
 * (a "caixa vazia" acima dos gráficos). Forçar aqui garante que hidden esconda.
 */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: flex-start;
  gap: 18px;
  width: 60px;
  height: 100vh;
  padding: 16px 8px;
  overflow-y: auto;
  color: #f4f5f7;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.16), transparent 62%),
    linear-gradient(180deg, #0a1729 0%, #071322 100%);
  transition: width 0.18s ease;
}

.sidebar.is-expanded {
  width: 248px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar.is-expanded .sidebar-head {
  justify-content: flex-start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: linear-gradient(145deg, #4f8cff, #2256cf);
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.35);
  color: #ffffff;
  font-weight: 800;
}

.brand-mark .brand-logo {
  width: 21px;
  height: 21px;
}

.brand-text {
  display: none;
  min-width: 0;
}

.sidebar.is-expanded .brand-text {
  display: block;
}

.brand-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #a7adb7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: transparent;
  color: #d9dde4;
  font-weight: 600;
}

.sidebar-toggle:hover {
  background: rgba(47, 111, 237, 0.18);
}

.sidebar-toggle svg {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.sidebar.is-expanded .sidebar-toggle {
  justify-content: flex-start;
}

.sidebar.is-expanded .sidebar-toggle svg {
  transform: rotate(180deg);
}

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-title {
  display: none;
  padding: 0 10px;
  color: #8f96a3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar.is-expanded .nav-title {
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 7px;
  color: #d9dde4;
  font-weight: 600;
}

.nav-item:hover {
  background: rgba(47, 111, 237, 0.16);
  color: #ffffff;
}

.nav-item.is-active {
  background: rgba(47, 111, 237, 0.24);
  box-shadow: inset 2px 0 0 #67e8f9;
  color: #ffffff;
}

.nav-icon {
  display: grid;
  flex-shrink: 0;
  width: 18px;
  place-items: center;
  color: #aeb5c0;
  text-align: center;
}

.nav-item:hover .nav-icon,
.nav-item.is-active .nav-icon {
  color: #ffffff;
}

.nav-label {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.is-expanded .nav-label {
  display: block;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.sidebar-footer {
  display: none;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #cbd0d8;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar.is-expanded .sidebar-footer {
  display: block;
}

.workspace-name {
  display: block;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-label {
  display: block;
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
}

.main-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 1;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.topbar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.topbar-dataset {
  min-height: 92px;
  align-items: center;
}

.topbar-dataset .topbar-title {
  font-size: 28px;
  line-height: 1.15;
}

.topbar-dataset .topbar-meta {
  margin-top: 6px;
}

.account-menu {
  position: relative;
}

.avatar-button {
  display: grid;
  overflow: hidden;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  min-height: 0;
  place-items: center;
}

.avatar-button:hover {
  background: var(--panel-soft);
}

.avatar-button-fallback {
  border-color: transparent;
  background: var(--sidebar-bg);
  color: #ffffff;
}

.avatar-button-fallback:hover {
  background: var(--sidebar-bg-soft);
}

.avatar-button img {
  width: 78%;
  height: 78%;
  background: #ffffff;
  object-fit: contain;
}

.avatar-button-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  cursor: default;
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  gap: 2px;
}

.account-menu-header {
  display: grid;
  padding: 8px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  gap: 2px;
}

.account-menu-header strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.account-menu-item:hover {
  background: var(--panel-soft);
}

.account-menu-item-danger {
  color: var(--danger);
}

.org-icon-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-list {
  display: grid;
  margin: 0;
  gap: 16px;
}

.detail-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.shortcut-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.shortcut-icon {
  display: grid;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.shortcut-card-name {
  display: block;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-card-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.topbar-meta {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px;
}

.content-wide {
  max-width: 1920px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 18px;
}

.panel-edit-btn {
  display: grid;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  place-items: center;
}

.panel-edit-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.panel.is-panel-editing .panel-edit-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.panel-view,
.panel-edit {
  display: grid;
  gap: 18px;
}

.panel-edit {
  display: none;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px dashed var(--line);
}

.panel.is-panel-editing .panel-view {
  display: none;
}

.panel.is-panel-editing .panel-edit {
  display: grid;
}

.metric {
  padding: 18px;
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* Variantes de "Aparência" da tabela (aplicadas via JS em
   chart_option_builder.js/renderTableDisplay, só nas tabelas de gráfico —
   não afetam outras .table do sistema, já que dependem dessas classes
   extras). As três (header-*, zebra, sticky) vivem no <table>; a que
   controla o scroll vertical (table-sticky) também é replicada no
   .table-wrap ao redor, que é quem de fato precisa da altura máxima. */
.table-header-light thead th {
  background: var(--panel-soft);
  color: var(--text);
}

.table-header-dark thead th {
  background: #151515;
  color: #ffffff;
}

.table-header-brand thead th {
  background: var(--accent);
  color: #ffffff;
}

.table-zebra tbody tr:nth-child(even) td {
  background: var(--panel-soft);
}

.table-wrap.table-sticky {
  max-height: 420px;
  overflow-y: auto;
}

/* position: sticky exige um fundo opaco no próprio th — sem isso, o texto
   das linhas de baixo aparece "vazado" atrás do cabeçalho ao rolar. Como
   os três temas de cabeçalho já definem um background sólido acima, só
   precisamos travar a posição aqui. */
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-ready {
  color: var(--success);
  background: #e8f7f1;
}

.status-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-processing {
  color: #7a4d00;
  background: #fff5d6;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.button:hover,
button:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
}

.button-secondary:hover {
  background: var(--panel-soft);
}

.button-danger {
  border-color: transparent;
  background: var(--danger);
  color: #ffffff;
}

.button-danger:hover {
  background: #8f1b12;
}

.button-danger.button-secondary {
  border-color: #f3c6c1;
  background: #ffffff;
  color: var(--danger);
}

.button-danger.button-secondary:hover {
  background: var(--danger-soft);
}

.button-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9dde4;
}

.button-link:hover {
  background: transparent;
  color: #ffffff;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
input[type="number"],
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.errorlist,
.form-errors {
  margin: 0;
  padding: 0;
  color: var(--danger);
  list-style: none;
}

.form-errors {
  padding: 12px 14px;
  border: 1px solid #ffd0cb;
  border-radius: var(--radius);
  background: var(--danger-soft);
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.55;
}

.onboarding-panel,
.next-step-panel {
  border-left: 3px solid var(--accent);
  background: #ffffff;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-steps li {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.flow-steps strong {
  color: var(--text);
}

.flow-steps span,
.form-helper,
.loading-note {
  color: var(--muted);
  line-height: 1.45;
}

.form-helper,
.loading-note {
  margin: 0;
  font-size: 12px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.preview-panel-header {
  align-items: flex-start;
}

.preview-controls,
.preview-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-page-controls,
.preview-limit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.preview-controls label,
.preview-limit-form label,
.preview-page-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-controls select,
.preview-limit-form select {
  width: 76px;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
}

.dataset-columns-table th:nth-child(1),
.dataset-columns-table td:nth-child(1),
.dataset-columns-table th:nth-child(2),
.dataset-columns-table td:nth-child(2) {
  min-width: 220px;
}

.dataset-columns-table th:nth-child(3),
.dataset-columns-table td:nth-child(3) {
  width: 150px;
}

.dataset-columns-table th:nth-child(4),
.dataset-columns-table td:nth-child(4),
.dataset-columns-table th:nth-child(5),
.dataset-columns-table td:nth-child(5) {
  width: 96px;
}

.dataset-columns-table .profile-type-select {
  width: 142px;
}

.button.is-disabled {
  cursor: default;
  opacity: 0.48;
}

.centered-actions {
  justify-content: center;
}

.loading-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

button:disabled,
.button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.suggestion-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.suggestion-type {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.suggestion-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.suggestion-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.suggestion-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.suggestion-meta dd {
  margin: 0;
  text-align: right;
}

.chart-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  grid-template-areas:
    "config preview"
    "save   preview";
  align-items: start;
  gap: 20px;
  padding: 18px;
}

.chart-workspace-single {
  display: block;
  grid-template-areas: none;
  padding: 0;
}

.chart-config {
  grid-area: config;
  display: grid;
  align-content: start;
  gap: 14px;
}

.chart-save-form {
  grid-area: save;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.chart-save-form #chart-save-btn {
  justify-self: start;
}

.chart-preview-panel {
  grid-area: preview;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.chart-preview-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-canvas {
  width: 100%;
  min-height: 340px;
}

.chart-workspace-single .chart-canvas {
  min-height: 440px;
}

.chart-state {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
}

.chart-loading-skeleton-wrap {
  padding: 0;
  border: 0;
  background: transparent;
}

.chart-loading-skeleton {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  gap: 14px;
  min-height: 240px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: chart-loading-pulse 1.8s ease-in-out infinite;
}

.chart-loading-head,
.chart-loading-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-loading-head span,
.chart-loading-axis span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
}

.chart-loading-head span:first-child {
  width: 38%;
}

.chart-loading-head span:last-child {
  width: 18%;
}

.chart-loading-axis span {
  width: 22%;
}

.chart-loading-plot {
  position: relative;
  min-height: 120px;
  border-bottom: 1px solid #d1d5db;
  border-left: 1px solid #d1d5db;
}

.chart-loading-grid,
.chart-loading-bar,
.chart-loading-line,
.chart-loading-dot {
  position: absolute;
  display: block;
}

.chart-loading-grid {
  right: 0;
  left: 0;
  height: 1px;
  background: #edf0f3;
}

.chart-loading-grid-1 {
  top: 22%;
}

.chart-loading-grid-2 {
  top: 50%;
}

.chart-loading-grid-3 {
  top: 78%;
}

.chart-loading-bar {
  bottom: 0;
  width: 11%;
  border-radius: 6px 6px 0 0;
  background: #d1d5db;
}

.chart-loading-bar-1 {
  left: 13%;
  height: 38%;
}

.chart-loading-bar-2 {
  left: 31%;
  height: 62%;
}

.chart-loading-bar-3 {
  left: 49%;
  height: 46%;
}

.chart-loading-bar-4 {
  left: 67%;
  height: 74%;
}

.chart-loading-line {
  right: 8%;
  left: 10%;
  top: 42%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9ca3af, #d1d5db);
  transform: rotate(-8deg);
  transform-origin: center;
  opacity: .8;
}

.chart-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.chart-loading-dot-1 {
  left: 18%;
  top: 49%;
}

.chart-loading-dot-2 {
  left: 48%;
  top: 39%;
}

.chart-loading-dot-3 {
  left: 76%;
  top: 31%;
}

.dashboard-chart-panel .chart-mini-state {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px;
}

.dashboard-chart-panel .chart-loading-skeleton,
.visual-thumb .chart-loading-skeleton {
  min-height: 0;
  height: 100%;
  padding: 12px;
  gap: 8px;
}

.dashboard-chart-panel .chart-loading-skeleton {
  grid-template-rows: auto minmax(80px, 1fr) auto;
}

.visual-thumb .chart-loading-skeleton {
  min-height: 180px;
}

@keyframes chart-loading-pulse {
  0%, 100% {
    opacity: .72;
    transform: scale(.995);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-loading-skeleton {
    animation: none;
  }
}

.kpi-preview {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 42px;
  font-weight: 800;
}

/* Variantes de "Estilo do KPI" — aplicadas via JS (chart_option_builder.js
   formatKpiDisplay) em cima da mesma .kpi-preview, substituindo umas às
   outras (só uma ativa por vez). */
.kpi-style-simple {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.kpi-style-bordered {
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
}

.kpi-style-shadow {
  border-color: transparent;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chart-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.dashboard-grid {
  display: grid;
  /* Cada card tem grid-column/grid-row com início explícito (pos_x/pos_y,
     vindos do backend) — não depende mais de auto-placement pra decidir
     onde cai. --dashboard-grid-columns vem inline do template, espelhando
     GRID_COLUMNS em apps/dashboards/views.py. */
  grid-template-columns: repeat(var(--dashboard-grid-columns, 8), minmax(0, 1fr));
  /* Altura fixa por linha (metade de antes: a resolução do grid dobrou
     pra permitir redimensionar em incrementos de meio-tamanho). */
  grid-auto-rows: 160px;
  gap: 16px;
  position: relative;
}

.drag-ghost {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  pointer-events: none;
  z-index: 1;
}

.dashboard-chart-panel {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.dashboard-chart-panel .panel-header {
  align-items: center;
  padding: 10px 12px;
  gap: 8px;
}

.dashboard-chart-panel .panel-header h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
}

/*
 * Arrastar para mover/redimensionar só fica ativo em modo de edição.
 * O card só vira "arrastável" (cursor de mão) e a alça de redimensionar
 * só aparece quando .dashboard-grid tem a classe is-editing.
 */
.dashboard-grid.is-editing .dashboard-chart-panel {
  cursor: grab;
}

.dashboard-chart-panel.is-dragging {
  opacity: 0.45;
}

/*
 * Alças de redimensionar: uma para cada lado (n/s/e/w) e cada canto
 * (ne/nw/se/sw), para poder segurar por qualquer lado do card, não só
 * o canto inferior direito. Cada uma só controla a(s) dimensão(ões) do
 * seu lado (ex.: "e" só largura, "n" só altura, "se" as duas).
 */
.resize-handle {
  position: absolute;
  z-index: 4;
  display: none;
  background: transparent;
}

.dashboard-grid.is-editing .resize-handle {
  display: block;
}

.resize-handle:hover {
  background: var(--accent-soft);
}

.resize-handle[data-dir="n"] {
  top: -3px;
  right: 14px;
  left: 14px;
  height: 7px;
  cursor: ns-resize;
}

.resize-handle[data-dir="s"] {
  bottom: -3px;
  right: 14px;
  left: 14px;
  height: 7px;
  cursor: ns-resize;
}

.resize-handle[data-dir="e"] {
  top: 14px;
  bottom: 14px;
  right: -3px;
  width: 7px;
  cursor: ew-resize;
}

.resize-handle[data-dir="w"] {
  top: 14px;
  bottom: 14px;
  left: -3px;
  width: 7px;
  cursor: ew-resize;
}

.resize-handle[data-dir="ne"] {
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  cursor: nesw-resize;
  border-radius: 0 4px 0 0;
}

.resize-handle[data-dir="nw"] {
  top: -3px;
  left: -3px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  border-radius: 4px 0 0 0;
}

.resize-handle[data-dir="se"] {
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  border-radius: 0 0 4px 0;
}

.resize-handle[data-dir="sw"] {
  bottom: -3px;
  left: -3px;
  width: 16px;
  height: 16px;
  cursor: nesw-resize;
  border-radius: 0 0 0 4px;
}

.dashboard-chart-panel.is-resizing {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/*
 * Os controles de mover/redimensionar/remover só devem aparecer quando o
 * dashboard está em modo de edição (ativado pelo botão "Editar dashboard").
 * Em modo de visualização o menu fica completamente oculto.
 */
.chart-menu {
  position: relative;
  display: none;
}

.dashboard-grid.is-editing .chart-menu {
  display: block;
}

.chart-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
}

.chart-menu-toggle::-webkit-details-marker {
  display: none;
}

.chart-menu-toggle:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.chart-menu[open] .chart-menu-toggle {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.dashboard-card-actions {
  position: absolute;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 10px;
  width: max-content;
  min-width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-card-actions .inline-actions,
.dashboard-card-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/*
 * O botão "Ajustes visuais" é filho direto do grid (dashboard-card-actions)
 * e por isso esticava pra ocupar a largura toda; o botão "Remover" fica
 * dentro de um <form> flex, que por padrão não estica largura de item —
 * ficava mais estreito e desalinhado com o de cima. Força os dois a
 * preencherem a largura igualmente.
 */
.dashboard-card-actions form .button {
  flex: 1 1 auto;
}

.dashboard-size-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/*
 * Dentro do card do dashboard, o card recebe altura real da linha do grid
 * (grid-row: span N). O elemento de visualização visível (canvas, KPI ou
 * tabela) preenche o espaço restante do card via flex-grow, em vez de usar
 * uma altura fixa/calculada — isso evita tanto a "caixa vazia" quanto a
 * sobra de espaço em branco abaixo de indicadores (KPI).
 */
.dashboard-chart-panel .chart-canvas,
.dashboard-chart-panel .kpi-preview,
.dashboard-chart-panel .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.dashboard-chart-panel .table-wrap {
  overflow-y: auto;
  max-height: 100%;
}

.dashboard-chart-canvas {
  padding: 4px;
}

/*
 * Legenda HTML (fora do canvas) usada por barras agrupadas quando há
 * muitas categorias/recortes. O ECharts nativo não sabe "quebrar em N
 * linhas e depois rolar" — só sabe "uma linha só com setas de paginação"
 * ou "crescer sem limite". Por isso essa legenda vive como <div> normal,
 * irmã do canvas dentro do mesmo container flex-column: ela ocupa até
 * ~2 linhas de altura (flex-wrap) e, a partir daí, rola por dentro
 * (overflow-y). Como o canvas abaixo é flex:1, ele automaticamente perde
 * altura conforme a legenda cresce até o limite — sem JS extra de resize.
 */
.chart-html-legend {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 4px 14px;
  max-height: 50px;
  padding: 2px 4px 6px;
  overflow-y: auto;
}

.chart-html-legend:empty {
  display: none;
}

.chart-html-legend-item {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  white-space: nowrap;
}

.chart-html-legend-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 2px;
}

.dashboard-chart-panel .kpi-preview {
  min-height: 0;
  border: 0;
}

.dashboard-chart-panel .panel-body,
.dashboard-chart-panel {
  min-width: 0;
}

/*
 * Barra lateral de ajustes visuais por gráfico (cor de destaque, exibir
 * rótulos). Fica fora da tela (translateX) até receber a classe is-open.
 */
/* Tela de Visuais */

.visual-group-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.visual-group-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.visual-group-tab:hover,
.visual-group-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.visual-group-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}

.visual-card {
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr);
  min-width: 0;
  min-height: 272px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.visual-card-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
}

.visual-card-header {
  border-bottom: 1px solid var(--line);
}

.visual-card-header h3 {
  margin-bottom: 3px;
  font-size: 14px;
}

.visual-card-header p {
  font-size: 11px;
}

.visual-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 10px;
}

.visual-thumb .kpi-preview {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border: 0;
}

.visual-card-menu {
  position: relative;
  flex-shrink: 0;
}

.visual-card-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 0;
  font-weight: 800;
  line-height: 0;
  list-style: none;
}

.visual-card-menu-toggle::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: -5px 0 0 currentColor, 5px 0 0 currentColor;
}

.visual-card-menu-toggle::-webkit-details-marker {
  display: none;
}

.visual-card-menu-toggle:hover,
.visual-card-menu[open] .visual-card-menu-toggle {
  background: var(--panel-soft);
}

.visual-card-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 168px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  gap: 2px;
}

.visual-card-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.visual-card-menu-item:hover {
  background: var(--panel-soft);
}

.visual-canvas,
.visual-kpi,
.visual-table-wrap {
  width: 100%;
  min-height: 170px;
}

.visual-canvas,
.visual-kpi {
  min-height: 190px;
}

.visual-kpi {
  border: 0;
  font-size: 30px;
}

.visual-table-wrap {
  overflow: hidden;
}

/* Na miniatura a tabela não pode estourar a largura do card: layout fixo
   divide as colunas igualmente e cada célula trunca com reticências, em vez
   de empurrar o conteúdo para fora (que antes vazava sob o card ao lado). */
.visual-table {
  table-layout: fixed;
  width: 100%;
}

.visual-table th,
.visual-table td {
  max-width: 0;
  padding: 7px 8px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 19, 24, 0.35);
}

.chart-settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  width: 100%;
  max-width: 340px;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.18s ease-out;
}

.chart-settings-panel.is-open {
  transform: translateX(0);
}

.chart-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-settings-header h3 {
  margin: 0;
}

/* A seção "Aparência" pode ter bastante campo (até 6, dependendo do tipo de
   gráfico) — sem isso, em telas baixas (mobile, notebook com zoom alto) o
   formulário estoura a altura fixa do painel e o botão "Salvar ajustes"
   fica inacessível. O cabeçalho (título/fechar) fica fixo; só o
   formulário rola. */
.chart-settings-panel > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-inline label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

input[type="color"] {
  width: 64px;
  min-height: 36px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
}

.chart-open-settings {
  white-space: nowrap;
}

.dataset-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.dataset-picker-item {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* As telas de acesso (login/cadastro) usam static/css/auth.css. */

.step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.muted {
  color: var(--muted);
}

.mt-18 {
  margin-top: 18px;
}

.mt-20 {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar,
  .sidebar.is-expanded {
    position: static;
    width: auto;
    height: auto;
  }

  .grid-3,
  .grid-2,
  .dashboard-grid,
  .visual-grid,
  .flow-steps {
    grid-template-columns: 1fr;
  }

  /* Os cards têm grid-column/grid-row com linha inicial explícita (inline,
     vinda de pos_x/pos_y) — numa coluna só isso criaria colunas implícitas
     extras e estouraria a largura. Ignora a posição/tamanho no mobile e
     empilha tudo numa coluna só. */
  .dashboard-chart-panel {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .chart-workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "config"
      "save"
      "preview";
  }

  .dashboard-chart-panel {
    grid-column: 1 / -1 !important;
  }

  .topbar,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .inline-actions,
  .dashboard-size-form {
    width: 100%;
  }

  .topbar-actions .button,
  .topbar-actions button,
  .inline-actions .button,
  .dashboard-card-actions .button,
  .dashboard-size-form select {
    width: 100%;
  }

  .dashboard-card-actions {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    box-shadow: none;
  }

  .visual-group-tabs,
  .visual-card-actions {
    width: 100%;
  }

  .visual-group-tab,
  .visual-card-actions .button {
    flex: 1 1 auto;
  }

  .content {
    padding: 20px;
  }
}

/* Upload wizard: stepper, dropzone, profile review */

.stepper {
  display: flex;
  margin-bottom: 4px;
}

.stepper-step {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.stepper-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  z-index: 0;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.stepper-step.is-complete:not(:last-child)::after {
  background: var(--accent);
}

.stepper-badge {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
}

.stepper-step.is-current .stepper-badge {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.stepper-step.is-complete .stepper-badge {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.stepper-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stepper-step.is-current .stepper-label,
.stepper-step.is-complete .stepper-label {
  color: var(--text);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--panel-soft);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.dropzone-icon {
  color: var(--accent-strong);
}

.dropzone-title {
  font-weight: 700;
}

.dropzone-title strong {
  color: var(--accent-strong);
}

.dropzone-hint {
  color: var(--muted);
  font-size: 12px;
}

.dropzone-filename {
  margin-top: 4px;
  color: var(--accent-strong);
  font-weight: 700;
}

.panel-relative {
  position: relative;
}

.processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.processing-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.profile-sample {
  display: block;
  overflow: hidden;
  max-width: 160px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-type-select {
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
}

.type-badge-unmapped {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff5d6;
  color: #7a4d00;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 17, 21, 0.55);
}

.modal {
  display: flex;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  flex-direction: column;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 0;
  place-items: center;
}

.modal-close:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.modal-body {
  overflow-y: auto;
  padding: 18px 20px;
}

.modal-list {
  display: grid;
  margin: 14px 0 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.modal-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.modal-list-item:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.modal-footer input[type="text"] {
  flex: 1;
}

/* Assistente de criação de gráfico */

.wizard {
  display: grid;
  gap: 12px;
}

.wizard-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.wizard-step.is-locked {
  opacity: 0.55;
}

.wizard-step-head {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  min-height: 0;
  text-align: left;
}

.wizard-step.is-locked .wizard-step-head {
  cursor: not-allowed;
}

.wizard-step-index {
  display: grid;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wizard-step.is-open .wizard-step-index {
  background: var(--accent);
  color: #ffffff;
}

.wizard-step-titles {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.wizard-step-title {
  font-weight: 700;
}

.wizard-step-summary {
  /* Sem nowrap/ellipsis: um resumo mais longo (ex.: combo com 2 metricas)
     quebra em mais de uma linha em vez de cortar e esconder o final do
     texto. O container (.wizard-step-titles, .wizard-step-head) nao tem
     altura fixa, entao cresce naturalmente para acomodar. */
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: break-word;
}

.wizard-step-caret {
  color: var(--muted);
  transition: transform 0.15s ease;
}

.wizard-step.is-open .wizard-step-caret {
  transform: rotate(180deg);
}

.wizard-step-body {
  display: none;
  padding: 18px 16px 20px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.wizard-step.is-open .wizard-step-body {
  display: block;
}

.wizard-option-list {
  display: grid;
  /* minmax(min(190px, 100%), 1fr) em vez de minmax(190px, 1fr): em telas
     estreitas a trilha pode encolher abaixo de 190px ao inves de forcar
     overflow horizontal do modal. */
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
  gap: 10px;
}

.wizard-option {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: normal;
  align-items: start;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  min-height: 0;
  text-align: left;
  width: 100%;
}

.wizard-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.wizard-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.wizard-option-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.wizard-option-meta {
  color: var(--muted);
  font-size: 12px;
}

/* Icone "i" com tooltip de ajuda nos botoes de tipo de grafico — some do
   description curta que ja fica visivel como subtitulo do botao.
   chart_type_tooltip.js move o balao para <body> com position:fixed e
   calcula a posicao pelo icone, para nunca ser cortado pelo scroll/overflow
   do modal (ver .modal-body). Sem JS o icone so fica visivel, sem balão. */
.wizard-type-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
}

.wizard-type-info:hover,
.wizard-type-info:focus-within {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.wizard-type-info-tooltip {
  position: fixed;
  z-index: 100;
  width: 220px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
}

.wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

/* Uma linha de campo da etapa "Configurar dados": rotulo fixo (Eixo X,
   Valor, Grupo, Linha...) + 1-2 controles ao lado (coluna sozinha, ou
   coluna + agregacao/granularidade). Uma linha por baixo da outra. */
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-row-label {
  flex: 0 0 64px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.field-row-control {
  flex: 1 1 0%;
  min-width: 0;
}

.field-row-control-narrow {
  /* Largura suficiente para a maior opção de agregação ("Contagem
     distinta") sem cortar o texto — a coluna da esquerda (flex:1) cede o
     espaço automaticamente. */
  flex: 0 0 150px;
  min-width: 0;
}

@media (max-width: 480px) {
  .field-row {
    flex-wrap: wrap;
  }

  .field-row-control-narrow {
    flex-basis: 100%;
  }
}

.wizard-preview {
  margin-bottom: 16px;
}

.wizard-preview .chart-canvas {
  min-height: 240px;
}

.wizard-preview .kpi-preview {
  min-height: 240px;
}

.wizard-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.wizard-upload-link {
  display: inline-block;
  margin-top: 12px;
}

.wizard-existing-charts {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.wizard-existing-charts-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Seção "Aparência" (linha) do painel de ajustes visuais ──
   Reaproveita .wizard-type-info / .wizard-type-info-tooltip (ver acima) para
   os ícones "i" de ajuda — chart_type_tooltip.js já busca esses seletores em
   toda a página, então nenhum JS novo é necessário para os tooltips aqui. */
.chart-settings-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.chart-settings-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.field-label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Switch on/off — mesmo alvo de toque/contraste dos demais controles do
   design system (ver input[type="color"], select acima). */
.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 40px;
  height: 24px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.15s ease;
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::before {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--accent-soft);
}

@media (max-width: 480px) {
  .field-toggle-row {
    align-items: flex-start;
  }
}

/* Grupo de botões (ex.: Largura das Barras) — alternativa ao <select> quando
   há poucas opções mutuamente exclusivas e vale a pena ver todas de uma vez.
   Usa :has() (já usado em .filter-chip:has(.filter-dropdown) acima) para
   estilizar o rótulo a partir do <input type="radio"> escondido. */
.segmented-control {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.segmented-option {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.segmented-option:not(:last-child) {
  border-right: 1px solid var(--line-strong);
}

.segmented-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-option span {
  display: block;
  padding: 8px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  /* Sem nowrap: em telas bem estreitas (painel de ajustes no mobile), o
     texto quebra em vez de estourar e ser cortado pelo overflow:hidden do
     .segmented-control. */
  white-space: normal;
  word-break: break-word;
}

.segmented-option:has(input:checked) {
  background: var(--accent);
}

.segmented-option:has(input:checked) span {
  color: #ffffff;
}

.segmented-option:has(input:focus-visible) {
  outline: 3px solid var(--accent-soft);
  outline-offset: -2px;
}

.segmented-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.5;
}

.wizard-existing-charts-list {
  display: grid;
  gap: 8px;
}

.wizard-existing-chart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.wizard-existing-chart-name {
  font-weight: 600;
}

.wizard-existing-charts-hint {
  margin-top: 10px;
  font-size: 12px;
}

/* Barra superior de visualização (criar visual) */

.viz-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.viz-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  min-height: 36px;
}

.viz-toolbar-btn:hover {
  background: var(--panel-soft);
}

.viz-toolbar-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.modal-wizard {
  max-width: 720px;
}

/* Barra de filtros do dashboard */

.dashboard-filter-bar {
  --filter-grid-columns: 8;
  --filter-row-height: 42px;
  display: grid;
  grid-template-columns: repeat(var(--filter-grid-columns), minmax(0, 1fr));
  grid-auto-rows: var(--filter-row-height);
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  position: relative;
}

.filter-chip {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 100%;
  align-self: center;
  justify-self: stretch;
}

.filter-chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0 12px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.dashboard-filter-bar.is-editing .filter-chip {
  cursor: grab;
}

.dashboard-filter-bar.is-editing .filter-chip-button {
  border-color: #9cc4ff;
  box-shadow: 0 0 0 2px rgba(84, 112, 198, .12);
}

.filter-chip.is-dragging {
  opacity: .45;
}

.filter-chip.is-resizing {
  z-index: 2;
  opacity: .45;
}

/* .filter-chip tem position:relative + z-index (cria stacking context
   proprio), entao o z-index:40 do .filter-dropdown so vale DENTRO do chip —
   nao basta pra flutuar acima de um chip vizinho que vem depois no DOM
   (ex.: abrir o filtro de cima ficava atras do filtro de baixo). Precisa
   elevar o chip inteiro enquanto ele tem um dropdown aberto. */
.filter-chip:has(.filter-dropdown) {
  z-index: 45;
}

.filter-drag-ghost {
  position: absolute;
  z-index: 30;
  border: 2px dashed var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  box-shadow: 0 10px 24px rgba(84, 112, 198, .22);
  pointer-events: none;
}

.filter-resize-handle {
  position: absolute;
  z-index: 3;
  display: none;
  background: #7aa7f7;
  box-shadow: 0 2px 8px rgba(84, 112, 198, .28);
}

.dashboard-filter-bar.is-editing .filter-chip:hover .filter-resize-handle,
.dashboard-filter-bar.is-editing .filter-chip:focus-within .filter-resize-handle,
.dashboard-filter-bar.is-editing .filter-chip.is-resizing .filter-resize-handle {
  display: block;
}

.filter-resize-e {
  top: 50%;
  right: -3px;
  width: 6px;
  height: 20px;
  border-radius: 999px;
  cursor: ew-resize;
  transform: translateY(-50%);
}

.filter-resize-s {
  bottom: -3px;
  left: 50%;
  width: 22px;
  height: 6px;
  border-radius: 999px;
  cursor: ns-resize;
  transform: translateX(-50%);
}

.filter-resize-se {
  right: -4px;
  bottom: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  cursor: nwse-resize;
}

.filter-chip-button:hover {
  background: var(--panel-soft);
}

.filter-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.filter-chip-caret {
  color: var(--muted);
  font-size: 11px;
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 230px;
  max-height: 300px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filter-dropdown-search {
  width: 100%;
}

.filter-dropdown-form {
  min-width: 280px;
  max-height: none;
}

.filter-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.filter-mode-tabs label,
.filter-range-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.filter-mode-tabs label {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.filter-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-range-grid input {
  width: 100%;
  min-width: 0;
}

.filter-specific-wrap {
  display: grid;
  gap: 8px;
}

.filter-specific-wrap input {
  width: 100%;
}

.filter-dropdown-options {
  display: grid;
  gap: 4px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.filter-option:hover {
  background: var(--panel-soft);
}

.filter-suggestion-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.filter-suggestion-button:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.filter-dropdown-state {
  font-size: 12px;
  color: var(--muted);
}

.filter-dropdown-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.filter-apply-controls {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
}

/* Painel de configuração de filtros */

.filter-config-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.filter-config-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.filter-config-list-wrap,
.filter-config-new {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.filter-config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.filter-config-item-meta {
  display: block;
  font-size: 12px;
}

@media (max-width: 640px) {
  .filter-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
  }
}

/* Menu kebab de opções de página (ex.: opções do dashboard) */

.page-header-menu {
  position: relative;
  flex-shrink: 0;
}

.kebab-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  min-height: 0;
  place-items: center;
}

.kebab-button:hover {
  background: var(--panel-soft);
}

.kebab-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  gap: 2px;
}

.kebab-popover-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.kebab-popover-item:hover {
  background: var(--panel-soft);
}

.kebab-popover-item-danger {
  color: var(--danger);
}

/* Landing page */

.landing {
  min-height: 100vh;
  background: var(--bg);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(6px);
}

.landing-nav .brand {
  border-bottom: 0;
  padding: 0;
}

.landing-nav .brand-mark {
  background: #151515;
}

.landing-nav .brand-name,
.landing-nav .brand-subtitle {
  color: var(--text);
}

.landing-nav .brand-subtitle {
  color: var(--muted);
}

.landing-nav-links {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-weight: 700;
}

.landing-nav-links a:hover {
  color: var(--text);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button-lg {
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 88px 40px 96px;
}

.landing-hero-simple {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
  padding-bottom: 60px;
  text-align: left;
}

.landing-hero-copy h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.landing-hero-copy .lead {
  max-width: 560px;
  margin-bottom: 28px;
  font-size: 16px;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-hero-note {
  margin: 18px 0 0;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.landing-hero-visual {
  display: flex;
  justify-content: center;
}

.landing-mock-panel {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.landing-mock-header {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.landing-mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line-strong);
}

.landing-mock-title {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 160px;
  padding: 0 4px;
}

.landing-mock-bars span {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.landing-mock-footer {
  margin-top: 16px;
}

.landing-section-header {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}

.landing-section-header h2 {
  font-size: 26px;
}

.landing-features,
.landing-how {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 40px 80px;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.landing-feature-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.landing-feature-card h3 {
  font-size: 16px;
}

.landing-feature-card p {
  line-height: 1.55;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-steps li {
  display: grid;
  gap: 6px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.landing-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #151515;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto 80px;
  padding: 48px;
  border-radius: 16px;
  color: #ffffff;
  background: #151515;
}

.landing-cta .eyebrow {
  color: var(--accent);
}

.landing-cta h2 {
  max-width: 480px;
  color: #ffffff;
}

.landing-cta .muted {
  max-width: 480px;
  color: #a7adb7;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 40px 48px;
  border-top: 1px solid var(--line);
}

.landing-footer .brand {
  border-bottom: 0;
  padding: 0;
}

.landing-footer-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-weight: 700;
}

.landing-footer-links a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .landing-nav {
    flex-wrap: wrap;
    padding: 14px 20px;
  }

  .landing-nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    padding: 48px 20px 60px;
    text-align: center;
  }

  .landing-hero-copy h1,
  .landing-hero-copy .lead {
    max-width: none;
    margin-right: auto;
    margin-left: auto;
  }

  .landing-hero-actions {
    justify-content: center;
  }

  .landing-features,
  .landing-how {
    padding: 16px 20px 56px;
  }

  .landing-feature-grid,
  .landing-steps {
    grid-template-columns: 1fr;
  }

  .landing-cta {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 20px 56px;
    padding: 32px 24px;
  }

  .landing-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 40px;
  }
}
