.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.pagination > span {
  color: var(--muted);
  font-size: 12px;
}

.pagination > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

:root {
  --brand: #007bbf;
  --brand-dark: #0066a1;
  --brand-hover: var(--brand-dark);
  --navy: #212121;
  --ink: #212121;
  --muted: #56616b;
  --page: #eef0f2;
  --paper: #ffffff;
  --line: #d7dce1;
  --blue-light: #e5f3fb;
  --cyan: #8fdfeb;
  --theme-text: var(--ink);
  --theme-muted: var(--muted);
  --theme-border: var(--line);
  --theme-surface: var(--page);
  --theme-page: var(--page);
  --theme-card: var(--paper);
  --font-display: Inter, Arial, sans-serif;
  --font-body: Inter, Arial, sans-serif;
  --radius-control: 9px;
  --radius-card: 20px;
  --shadow-card: 0 16px 48px -30px rgb(16 44 64 / 25%);
  --scroll-thumb: #9ab4c5;
  --scroll-hover: #6b8da3;
  --scroll-active: #007bbf;
  --scroll-track: #edf4f8;
  --motion-fast: 160ms;
  --motion-content: 600ms;
  --motion-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --setor-tecnologia: #19b8ca;
  --setor-comercio: #ea7c20;
  --setor-agronegocio: #359f58;
  --setor-servicos: #913fb6;
  --setor-industria: #bd8a10;
  --avatar-neutral: #e4e9ed;
  --success-ink: #225b3b;
  --success-surface: #edf7f0;
  --error-ink: #8b3232;
  --error-surface: #fff1f1;
}

body {
  font-family: var(--font-body);
}

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid var(--scroll-track);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}

*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}

::selection {
  background: var(--brand);
  color: var(--paper);
}

a,
button,
summary,
label:has(input[type='checkbox']),
label:has(input[type='radio']) {
  -webkit-tap-highlight-color: transparent;
}

button,
summary,
a {
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

[aria-invalid='true'] {
  border-color: var(--error-ink) !important;
}

.has-system-nav
  :is(
    input:not([type='radio'], [type='checkbox'], [type='hidden'], [type='file']),
    select,
    textarea
  ):focus {
  outline: none;
  background: var(--blue-light);
}

.has-system-nav
  :is(
    input:not([type='radio'], [type='checkbox'], [type='hidden'], [type='file']),
    select,
    textarea
  ):focus-visible {
  box-shadow: inset 0 -2px 0 var(--brand);
}

:is(
  input:not(
    [type='radio'],
    [type='checkbox'],
    [type='hidden'],
    [type='file'],
    [type='range'],
    [type='color']
  ),
  select,
  textarea
):is(:focus, :focus-visible) {
  outline: none;
  border-color: var(--brand);
  background: var(--blue-light);
}

input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

@media (forced-colors: active) {
  :is(input, select, textarea):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .has-system-nav :is(input, select, textarea):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

.field-error,
.has-system-nav .field-error {
  color: var(--error-ink);
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 0;
}

.submit-status {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.search-control {
  position: relative;
  display: block;
}

.search-control input {
  padding-right: 42px;
}

.search-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.search-clear:hover {
  background: var(--blue-light);
  color: var(--ink);
}

.reveal-content.is-revealing {
  animation: reveal-content var(--motion-content) var(--motion-ease) both;
}

@keyframes reveal-content {
  from {
    opacity: 0.35;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ajuda em balão: aparece ao passar o mouse, focar ou tocar no "?". */
.help {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 400;
}

.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--scroll-thumb);
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font: 600 12px/1 var(--font-body);
  cursor: help;
}

.help-tip:hover,
.help:focus-within .help-tip,
.help.is-open .help-tip {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--paper);
}

.help-pop {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -10px;
  z-index: 40;
  width: max-content;
  max-width: min(300px, 80vw);
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 12px 32px -12px rgb(16 44 64 / 55%);
  color: var(--paper);
  font: 400 13px/1.5 var(--font-body);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast),
    visibility var(--motion-fast);
  pointer-events: none;
}

.help-pop::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: var(--navy);
  transform: rotate(45deg);
}

.help:hover .help-pop,
.help:focus-within .help-pop,
.help.is-open .help-pop {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (max-width: 600px) {
  .help-pop {
    position: fixed;
    inset: auto 16px 16px;
    width: auto;
    max-width: none;
  }

  .help-pop::before {
    display: none;
  }
}

/* Diagnóstico: uma pergunta por vez. */
.dx-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}

.app-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.app-dialog::backdrop {
  background: rgb(16 44 64 / 45%);
}

.app-dialog h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font: 650 24px / 1.25 var(--font-display);
  letter-spacing: -0.02em;
}

.app-dialog p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.app-dialog .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.app-dialog .actions > button {
  flex: 1 1 150px;
}

.dx-question {
  min-width: 0;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.dx-question[hidden] {
  display: none;
}

.dx-question legend {
  margin-bottom: 18px;
  padding: 0;
  color: var(--navy);
  font: 600 clamp(20px, 2.4vw, 24px) / 1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.dx-options {
  display: grid;
  gap: 10px;
}

.dx-options label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition:
    border-color var(--motion-fast),
    background var(--motion-fast);
}

.dx-options label:hover {
  border-color: var(--brand);
  background: var(--page);
}

.dx-options label:has(input:checked) {
  border-color: var(--brand);
  background: var(--blue-light);
}

.dx-options input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.dx-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}

.standard-footer .footer-slogan,
.login-footer .footer-slogan {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.login-footer .footer-slogan {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

@media (max-width: 700px) {
  .standard-footer .footer-slogan {
    display: block;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
  }
}

.password-guidance {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

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

.password-requirements [data-rule-mark] {
  display: inline-block;
  width: 1.2em;
  font-weight: 700;
}

.password-requirements .is-met {
  color: var(--success-ink);
}

.password-guidance .password-strength {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--ink);
}

.password-guidance meter {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: var(--brand);
}

.password-guidance > .muted {
  margin: 6px 0 0;
}

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

.standard-footer > .footer-slogan,
.login-footer > .footer-slogan {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
}

.standard-footer .footer-product {
  justify-self: end;
}

.standard-footer a,
.site-footer .footer-bottom a {
  text-decoration: none;
}

.standard-footer a:hover,
.standard-footer a:focus-visible,
.site-footer .footer-bottom a:hover,
.site-footer .footer-bottom a:focus-visible {
  text-decoration: underline;
}

.photo-crop canvas {
  display: block;
  width: min(100%, 280px);
  height: auto;
  border-radius: var(--radius-control);
  background: var(--paper);
  cursor: grab;
  touch-action: none;
}

.photo-crop {
  max-width: 360px;
  margin-top: 16px;
}

.photo-crop input[type='range'] {
  width: 100%;
  accent-color: var(--brand);
}

.has-system-nav .sector-chip .chip-check,
.has-system-nav .sector-chip:has(.chip-check input:checked) .chip-check {
  color: color-mix(in srgb, var(--avatar-accent) 55%, black);
}

.has-system-nav .sector-chip:has(.chip-main input:checked) .chip-check {
  color: color-mix(in srgb, var(--avatar-accent) 45%, black);
  font-weight: 800;
}

.sector-chip:has(.chip-main input:checked) {
  background: color-mix(in srgb, var(--avatar-accent) 18%, var(--paper));
  border-color: color-mix(in srgb, var(--avatar-accent) 80%, black);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--avatar-accent) 80%, black);
}

.sector-chip .chip-main:has(input:checked),
.sector-chip .chip-main:hover .chip-star::before {
  color: color-mix(in srgb, var(--avatar-accent) 55%, black);
}

@media (max-width: 1100px) {
  .standard-footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }

  .standard-footer .footer-product {
    justify-self: center;
  }
}

.photo-crop canvas.is-dragging {
  cursor: grabbing;
}

.photo-crop canvas:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

@media (forced-colors: active) {
  .photo-crop canvas:focus-visible {
    outline-color: Highlight;
  }
}
