:root {
  --bg-start: #f6f4ef;
  --bg-end: #efdbb2;
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(78, 75, 72, 0.2);
  --text-main: #2e334e;
  --text-muted: #4e4b48;
  --button-bg: #f87c56;
  --button-border: #f87c56;
  --button-hover: #ea6d46;
  --button-secondary-bg: rgba(46, 51, 78, 0.08);
  --button-secondary-border: rgba(46, 51, 78, 0.28);
  --button-secondary-hover: rgba(46, 51, 78, 0.16);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg-end);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #fff9ec 0%, var(--bg-start) 38%, var(--bg-end) 100%);
  padding: 24px;
}

@supports (min-height: 100svh) {
  body {
    min-height: 100svh;
  }
}

.card {
  width: min(100%, 420px);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  margin-top: 66px;
  padding: 86px 24px 26px;
  box-shadow: 0 18px 44px rgba(46, 51, 78, 0.14);
  overflow: visible;
}

.site-footer {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.profile {
  text-align: center;
}

.profile-avatar-wrap {
  width: 132px;
  height: 132px;
  border-radius: 999px;
  margin: -152px auto 16px;
  padding: 4px;
  background: linear-gradient(140deg, #f87c56, #f6d39a);
  box-shadow: 0 14px 32px rgba(46, 51, 78, 0.26);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  border: 3px solid rgba(255, 255, 255, 0.92);
  display: block;
}

.brand-wrap {
  margin: 0 auto 20px;
  width: min(100%, 320px);
}

.brand-logo {
  width: 100%;
  display: block;
}

.profile-role {
  width: fit-content;
  margin: 0 auto 14px;
  padding: 8px 24px;
  border-radius: 999px;
  border: 1px solid rgba(46, 51, 78, 0.18);
  background: rgba(248, 124, 86, 0.12);
  color: #2e334e;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}


.profile-role-meta {
  margin-top: -4px;
  margin-bottom: 16px;
  padding: 6px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.95;
}
.profile h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-welcome {
  color: #d7e0eb;
  font-size: 1rem;
  line-height: 1.4;
}

.profile-about {
  margin-top: 18px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(78, 75, 72, 0.2);
  background: rgba(239, 219, 178, 0.22);
  color: var(--text-main);
  text-align: left;
}

.profile-about h2 {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2e334e;
}

.profile-about p {
  color: #4e4b48;
  font-size: 0.92rem;
  line-height: 1.45;
}

.specialties-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.specialty-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(78, 75, 72, 0.18);
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.specialty-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.specialty-card p {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
}

.specialties-grid .specialty-card:last-child {
  grid-column: 1 / -1;
}

.links {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.link-button {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  color: #fff9f6;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  background: var(--button-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(248, 124, 86, 0.35);
}

.link-button-secondary {
  color: var(--text-main);
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
}

.link-button-secondary:hover,
.link-button-secondary:focus-visible {
  background: var(--button-secondary-hover);
  box-shadow: 0 12px 24px rgba(46, 51, 78, 0.16);
}

.admin-body {
  display: block;
}

.admin-login-logo-wrap {
  width: min(100%, 320px);
  margin: 24px auto 0;
}

.admin-login-logo {
  width: 100%;
  display: block;
}

.admin-card {
  max-width: 1000px;
  margin: 24px auto;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 24px;
}

.admin-dashboard-body {
  /* Tokens exclusivos do dashboard: superfícies neutras e sombras suaves,
     usando a mesma paleta (coral #f87c56 apenas como acento). */
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --surface-border: rgba(46, 51, 78, 0.1);
  --surface-shadow: 0 1px 2px rgba(46, 51, 78, 0.04), 0 8px 24px rgba(46, 51, 78, 0.06);
  --accent: #f87c56;
  --accent-soft: rgba(248, 124, 86, 0.12);
  --hairline: rgba(46, 51, 78, 0.08);

  padding: 0;
  background:
    radial-gradient(1200px 480px at 50% -220px, #fff9ec 0%, rgba(255, 249, 236, 0) 70%),
    var(--bg-start);
}

.admin-dashboard-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  min-height: 100vh;
  min-height: 100dvh;
}

@supports (min-height: 100svh) {
  .admin-dashboard-card {
    min-height: 100svh;
  }
}

.admin-dashboard-body .admin-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px 24px 48px;
}

.admin-dashboard-body .admin-page > section + section {
  margin-top: 20px;
}

.admin-login-card {
  max-width: 420px;
}

.admin-header p {
  color: var(--text-muted);
  margin-top: 6px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logout-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background: rgba(248, 124, 86, 0.12);
  color: var(--text-main);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.logout-button:hover {
  background: rgba(248, 124, 86, 0.2);
  border-color: rgba(248, 124, 86, 0.65);
  transform: translateY(-1px);
}

.logout-button:focus-visible {
  outline: 2px solid rgba(248, 124, 86, 0.65);
  outline-offset: 2px;
}

.logout-button svg {
  width: 20px;
  height: 20px;
}

.metric-box {
  margin-top: 0;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.metric-box h2 {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted);
}

.metric-box p {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-top: 10px;
  text-align: center;
}

/* O quantitativo cresce para ocupar o espaço livre do card e fica
   centralizado horizontal e verticalmente nesse espaço. */
.metric-box > p:not(.metric-enviados) {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-box p.metric-enviados {
  font-size: 0.86rem;
  font-weight: 500;
  margin-top: auto;
  padding-top: 6px;
  color: var(--text-muted);
  order: 99;
  text-align: center;
}

.metric-box p.metric-enviados span {
  font-weight: 700;
  color: var(--text-main);
}

.metric-comparativo {
  margin-top: 8px;
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 22px;
  font-size: 0.85rem;
}

.metric-comparativo-linha {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.metric-comparativo-linha.positivo {
  color: #1b8f3f;
}

.metric-comparativo-linha.negativo {
  color: #c43636;
}

.metric-comparativo-linha.neutro {
  color: var(--text-muted);
}

.metric-comparativo .seta {
  font-size: 0.78rem;
  line-height: 1;
}

.metrics-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.metrics-grid .metric-box {
  margin-top: 0;
}

/* Empilha os cards de resumo (total enviados e taxa de conversão) numa
   mesma coluna, cada um com metade da altura de um card normal, mantendo-os
   na mesma linha que os demais em telas grandes. */
.metrics-grid .metric-box-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.metrics-grid .metric-box-stack .metric-box-half {
  flex: 1 1 0;
  justify-content: center;
}

.table-section {
  margin-top: 22px;
}

.chart-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

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

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

@media (max-width: 900px) {
  .chart-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.chart-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-dashboard-body .chart-card h2,
.admin-dashboard-body .table-section > h2 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

/* O título fica fora da superfície branca; o próprio gráfico é o card. */
.chart {
  margin-top: 12px;
  min-width: 0;
  min-height: 280px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
}

.table-section h2 {
  margin-bottom: 12px;
}

.table-card {
  margin-top: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

.table-scroll table {
  min-width: 560px;
}

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem;
}

th {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--surface-border);
}

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

tbody tr:hover td {
  background: var(--surface-2);
}

td a {
  color: var(--text-main);
}

.table-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pagination-button {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.pagination-button:not(:disabled):hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-form {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.login-form input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--button-border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-main);
}

.admin-tip {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.error-message {
  margin-top: 12px;
  color: #a12d2d;
}

.apexcharts-tooltip,
.apexcharts-tooltip-title,
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  color: #1f2f46 !important;
}

.chart .apexcharts-text,
.chart .apexcharts-legend-text,
.chart .apexcharts-datalabel,
.chart .apexcharts-data-labels text {
  fill: var(--text-main) !important;
  color: var(--text-main) !important;
}

.periodo-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
}

.periodo-section label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.periodo-section select,
.periodo-customizado input {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-dashboard-body select:focus-visible,
.admin-dashboard-body input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.periodo-customizado {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-shell {
  display: block;
}

.admin-sidebar-title {
  margin-bottom: 10px;
}

.admin-menu-list,
.admin-submenu-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.admin-menu-link,
.admin-menu-toggle {
  width: 100%;
  text-align: left;
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.admin-menu-toggle {
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.admin-menu-link:hover,
.admin-menu-toggle:hover {
  color: var(--text-main);
  background: var(--hairline);
}

.admin-menu-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.admin-submenu-list {
  margin-top: 6px;
  margin-left: 12px;
}

.admin-content {
  min-width: 0;
  padding-top: 158px;
}

.report-form {
  margin-top: 0;
  display: grid;
  gap: 16px;
}

.admin-dashboard-body .report-form {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
}

.admin-dashboard-body .report-form .link-button {
  justify-self: start;
  width: auto;
  padding-inline: 26px;
}

.report-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.report-grid input,
.report-grid select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
}

.report-grid-relatorio {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.report-grid-relatorio .report-field-periodo {
  grid-row: 1;
}

.report-grid-relatorio .report-field-link,
.report-grid-relatorio .report-field-municipio,
.report-grid-relatorio .report-field-formato {
  grid-row: 2;
}

.report-grid-relatorio .report-field-datas:not([hidden]) {
  display: contents;
}

.report-grid-relatorio .report-field-datas .report-field {
  grid-row: 1;
}

@media (max-width: 720px) {
  .report-grid-relatorio {
    grid-template-columns: 1fr;
  }

  .report-grid-relatorio .report-field-periodo,
  .report-grid-relatorio .report-field-datas .report-field,
  .report-grid-relatorio .report-field-link,
  .report-grid-relatorio .report-field-municipio,
  .report-grid-relatorio .report-field-formato {
    grid-row: auto;
  }
}

.admin-sidebar-collapse {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background: rgba(46, 51, 78, 0.08);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.admin-sidebar-collapse svg {
  width: 16px;
  height: 16px;
}

.admin-sidebar-collapse:hover {
  background: rgba(248, 124, 86, 0.2);
  transform: translateY(-1px);
}

.admin-menu-link,
.admin-menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-menu-text {
  white-space: nowrap;
}

.admin-menu-group {
  position: relative;
}

/* Mantém o submenu fora do fluxo mesmo fechado, para o botão "Configurações"
   ficar alinhado verticalmente com os demais itens do menu. */
.admin-menu-group .admin-submenu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  margin: 0;
}

.admin-submenu-list {
  margin-top: 6px;
  margin-left: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.admin-menu-group .admin-submenu-list.is-open {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}

.admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  padding: 14px 24px;
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 12px;
}

.admin-topbar-nav-wrap,
.admin-dashboard-body .admin-header-row {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

.admin-topbar-nav-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.admin-dashboard-body .admin-header-row h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-dashboard-body .admin-header-row p {
  margin-top: 2px;
  font-size: 0.9rem;
}

.admin-topbar-logo-link {
  display: inline-flex;
  align-items: center;
}

.admin-topbar-logo {
  width: 200px;
  max-width: 38vw;
  height: auto;
  display: block;
}

.admin-menu-list-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.admin-menu-logout-item .logout-form {
  margin: 0;
}

.admin-menu-logout-item .logout-button {
  width: 40px;
  height: 40px;
}

.admin-menu-group .admin-submenu-list.is-open {
  display: grid;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  margin: 0;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--button-border);
  background: rgba(255, 255, 255, 0.98);
  z-index: 30;
}

.report-field {
  display: grid;
  gap: 6px;
}

.report-grid > label,
.report-grid > select {
  margin: 0;
}

.scroll-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff9f6;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(248, 124, 86, 0.35);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

@media (max-width: 920px) {
  .admin-dashboard-body .admin-content {
    padding: 176px 16px 40px;
  }

  .admin-topbar {
    padding: 12px 16px;
  }

  .admin-topbar-nav-wrap {
    flex-wrap: wrap;
  }

  .admin-menu-list-top {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .admin-dashboard-body .admin-content {
    padding-top: 208px;
  }
}

.not-found-card {
  text-align: center;
}

.not-found-header h1 {
  font-size: 1.5rem;
  margin-top: 6px;
  margin-bottom: 10px;
}

.not-found-code {
  display: inline-block;
  margin: 0 auto;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(46, 51, 78, 0.2);
  background: rgba(248, 124, 86, 0.12);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.not-found-description {
  color: var(--text-muted);
  line-height: 1.45;
}

.not-found-icons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 1.5rem;
}

.not-found-icons span {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(46, 51, 78, 0.2);
  background: rgba(46, 51, 78, 0.06);
}

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

.wizard-dialog {
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: radial-gradient(circle at top, #fff9ec 0%, var(--bg-start) 38%, var(--bg-end) 100%);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wizard-dialog::backdrop {
  background: rgba(46, 51, 78, 0.45);
}

.wizard-form {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  overflow-y: auto;
}

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

.wizard-progress {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.wizard-close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background: rgba(46, 51, 78, 0.08);
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
}

.wizard-close:hover,
.wizard-close:focus-visible {
  background: rgba(248, 124, 86, 0.2);
}

.wizard-step {
  display: none;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.wizard-step.is-active {
  display: flex;
}

.wizard-step h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
}

.wizard-info {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.wizard-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.wizard-field input,
.wizard-field select {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--button-border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
}

.wizard-radio-group {
  display: flex;
  gap: 12px;
}

.wizard-radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--button-secondary-border);
  background: var(--button-secondary-bg);
  font-weight: 600;
  cursor: pointer;
}

.wizard-radio:has(input:checked) {
  border-color: var(--button-border);
  background: rgba(248, 124, 86, 0.2);
}

.wizard-subfields {
  display: grid;
  gap: 14px;
}

.wizard-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.94rem;
  line-height: 1.4;
  cursor: pointer;
}

.wizard-checkbox input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.wizard-nav {
  display: flex;
  gap: 12px;
}

.wizard-nav .link-button {
  flex: 1;
}

.wizard-nav .link-button[hidden] {
  display: none;
}

.wizard-send {
  width: 100%;
}

@media (max-width: 520px) {
  .wizard-form {
    padding: 18px;
  }
}
