/* Freelas App — tokens de cor por perfil.
   Profissional: verde (#059669). Contratante: azul (#2563eb).
   Os componentes usam apenas os tokens --md-sys-color-*; [data-role] troca os valores. */
:root {
  /* Cores base neutras / sistema */
  --md-sys-color-surface: #fff;
  --md-sys-color-canvas: #f6f8fc;
  --md-sys-color-surface-container: #f1f5f9;
  --md-sys-color-on-surface: #14213d;
  --md-sys-color-on-surface-variant: #536078;
  --md-sys-color-muted: #64748b;
  --md-sys-color-outline: #94a3b8;
  --md-sys-color-outline-variant: #dce3ef;
  --md-sys-color-error: #b91c1c;
  --md-sys-color-error-container: #fef2f2;
  --md-sys-color-success: #059669;
  --md-sys-color-success-container: #ecfdf5;

  /* Tokens do perfil Profissional (Trabalhar - Verde) */
  --pro-primary: #059669;
  --pro-primary-hover: #047857;
  --pro-primary-pressed: #065f46;
  --pro-container: #ecfdf5;
  --pro-on-container: #064e3b;
  --pro-border: #a7f3d0;
  --pro-focus: 0 0 0 3px rgba(5, 150, 105, 0.22);

  /* Tokens do perfil Contratante (Contratar - Azul) */
  --hirer-primary: #2563eb;
  --hirer-primary-hover: #1d4ed8;
  --hirer-primary-pressed: #1e40af;
  --hirer-container: #eff6ff;
  --hirer-on-container: #1e3a8a;
  --hirer-border: #bfdbfe;
  --hirer-focus: 0 0 0 3px rgba(37, 99, 235, 0.22);

  /* Padrão dinâmico */
  --md-sys-color-primary: #2563eb;
  --md-sys-color-primary-hover: #1d4ed8;
  --md-sys-color-primary-pressed: #1e40af;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-primary-container: #eff6ff;
  --md-sys-color-on-primary-container: #1e3a8a;
  --md-sys-color-professional: #059669;
  --md-sys-color-professional-container: #ecfdf5;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, .20);
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-panel: 24px;
}

/* Quando o perfil ativo for Profissional (Trabalhar) */
[data-role="profissional"] {
  --md-sys-color-primary: var(--pro-primary);
  --md-sys-color-primary-hover: var(--pro-primary-hover);
  --md-sys-color-primary-pressed: var(--pro-primary-pressed);
  --md-sys-color-primary-container: var(--pro-container);
  --md-sys-color-on-primary-container: var(--pro-on-container);
  --focus-ring: var(--pro-focus);
}

/* Quando o perfil ativo for Contratante (Contratar) */
[data-role="contratante"] {
  --md-sys-color-primary: var(--hirer-primary);
  --md-sys-color-primary-hover: var(--hirer-primary-hover);
  --md-sys-color-primary-pressed: var(--hirer-primary-pressed);
  --md-sys-color-primary-container: var(--hirer-container);
  --md-sys-color-on-primary-container: var(--hirer-on-container);
  --focus-ring: var(--hirer-focus);
}

/* ---------- Ícones ---------- */
.lucide { display: inline-block; width: 20px; height: 20px; flex: none; vertical-align: middle; stroke: currentColor; }

/* ---------- Estrutura ---------- */
body { background: var(--md-sys-color-canvas); color: var(--md-sys-color-on-surface); -webkit-font-smoothing: antialiased; }

.registration-main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 40px 24px; }
.registration-card {
  position: relative;
  display: flex; flex-direction: column; gap: 24px;
  width: 560px; max-width: 100%; min-width: 0;
  padding: 40px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--radius-panel);
  box-shadow: 0 1px 2px rgba(20, 33, 61, .04), 0 8px 24px -8px rgba(20, 33, 61, .08);
}

.card-logo { align-self: center; display: block; border-radius: 50%; }
.card-logo img { display: block; width: 88px; height: 88px; object-fit: contain; }
.card-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.registration-card h1 { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.8px; text-align: center; }
.registration-card h1:focus { outline: none; }
.card-intro { font-size: 16px; line-height: 24px; color: var(--md-sys-color-on-surface-variant); margin-top: -8px; text-align: center; }

/* ---------- Botões (formato pill, como na landing) ---------- */
.button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 14px 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 15px; line-height: 20px; font-weight: 650; text-align: center;
  white-space: nowrap;
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.button.primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.button.primary:hover { background: var(--md-sys-color-primary-hover); box-shadow: 0 1px 2px rgba(20, 33, 61, .12), 0 1px 3px 1px rgba(20, 33, 61, .08); }
.button.primary:active { background: var(--md-sys-color-primary-pressed); box-shadow: none; }

.button.secondary { background: var(--md-sys-color-surface); border-color: #c4cfe0; color: var(--md-sys-color-on-surface); }
.button.secondary:hover { background: var(--md-sys-color-primary-container); border-color: var(--md-sys-color-primary); }
.button.danger { background: var(--md-sys-color-error, #b3261e); color: #fff; }
.button.danger:hover { background: #8f1d17; box-shadow: 0 1px 2px rgba(80, 18, 15, .18), 0 1px 3px 1px rgba(80, 18, 15, .12); }
.button.tonal { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.button.tonal:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 14%, #fff); }
.button:disabled { opacity: .6; cursor: not-allowed; }
form[aria-busy=true] .button:disabled { cursor: progress; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.text-button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--md-sys-color-primary);
  font-size: 14px; font-weight: 600;
}
.text-button:hover { background: var(--md-sys-color-primary-container); }
.text-button .lucide { width: 18px; height: 18px; }
/* Link inserido no meio de uma frase: sem padding nem altura própria. */
.document-link { display: inline; min-height: 0; padding: 0; border-radius: 2px; font: inherit; font-weight: 600; color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; }
.document-link:hover { background: none; color: var(--md-sys-color-primary-hover); }
.inline-end { align-self: flex-end; margin: -8px -12px 0 0; }
.icon-button { position: relative; overflow: hidden; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--md-sys-color-on-surface-variant); }
.icon-button:hover { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface); }

/* ---------- Campos ---------- */
.screen-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
label, legend, .label-text {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.optional { font-weight: 400; color: var(--md-sys-color-muted); }

/* :where() mantém especificidade zero para que variações (ícone, senha) prevaleçam. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  width: 100%; min-width: 0; min-height: 52px;
  padding: 13px 16px;
  font-size: 16px; line-height: 24px; color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-control);
  transition: border-color .15s, box-shadow .15s;
}
:where(input, select, textarea):hover { border-color: var(--md-sys-color-on-surface-variant); }
:where(input, select, textarea):focus { outline: none; border-color: var(--md-sys-color-primary); box-shadow: var(--focus-ring); }
.field:focus-within > label,
.field:focus-within > .label-text {
  color: var(--md-sys-color-primary);
  transition: color .15s ease;
}
input::placeholder, textarea::placeholder { color: #7a879c; opacity: 1; }
textarea { min-height: 104px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background: var(--md-sys-color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23536078' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}

.input-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.input-icon { position: absolute; left: 16px; display: flex; color: var(--md-sys-color-muted); pointer-events: none; }
.input-icon .lucide { width: 20px; height: 20px; }
.input-wrapper > input { padding-left: 48px; }
.password-field > input { padding-right: 112px; }
.toggle-password-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--md-sys-color-on-surface-variant);
  font-size: 14px; font-weight: 600;
}
.toggle-password-btn:hover { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-primary); }
.toggle-password-btn .lucide { width: 18px; height: 18px; }

[aria-invalid=true] { border-color: var(--md-sys-color-error) !important; }
:where(input, select, textarea)[aria-invalid=true]:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .15); }
.field-error { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; line-height: 20px; color: var(--md-sys-color-error); }
.field-error .lucide { width: 16px; height: 16px; margin-top: 2px; }
.support { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }
.support.center { text-align: center; }

/* ---------- Escolha de perfil ---------- */
/* Identidade do perfil por cores sólidas: borda tingida e ícone preenchido. */
.role-choice {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 16px; align-items: center;
  width: 100%; padding: 20px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--role-border);
  border-radius: var(--radius-card);
  color: var(--md-sys-color-on-surface); text-align: left;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.role-choice[data-role="profissional"] { --role-color: var(--pro-primary); --role-container: var(--pro-container); --role-border: var(--pro-border); }
.role-choice[data-role="contratante"] { --role-color: var(--hirer-primary); --role-container: var(--hirer-container); --role-border: var(--hirer-border); }
.role-choice:hover { border-color: var(--role-color); background: var(--role-container); }
.role-choice.suggested { border-color: var(--role-color); box-shadow: inset 0 0 0 1px var(--role-color); background: var(--role-container); }
.role-choice:focus-visible { outline-color: var(--role-color); }
.role-choice md-ripple { --md-ripple-hover-color: var(--role-color); --md-ripple-pressed-color: var(--role-color); }

.role-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--role-color); color: #fff; }
.role-icon .lucide { width: 24px; height: 24px; }

.role-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.role-text strong { font-size: 17px; line-height: 24px; font-weight: 650; color: var(--md-sys-color-on-surface); }
.role-text span { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }
.role-arrow { display: flex; color: var(--role-color); transition: transform .18s; }
.role-choice:hover .role-arrow { transform: translateX(2px); }

/* Seletor de contexto do contratante (controle segmentado). */
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border: 1px solid #c4cfe0; border-radius: 999px; background: var(--md-sys-color-surface); }
.segmented button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--md-sys-color-on-surface-variant);
  font-size: 14px; font-weight: 600;
}
.segmented button[aria-pressed=true] { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.segmented .lucide { width: 18px; height: 18px; }

/* ---------- Avisos ---------- */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-control);
  background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container);
  font-size: 14px; line-height: 20px;
}
.notice .lucide { width: 20px; height: 20px; margin-top: 0; color: var(--md-sys-color-primary); }
.notice.success { background: var(--md-sys-color-success-container); color: #14532d; }
.notice.success .lucide { color: var(--md-sys-color-success); }
.notice.error { background: var(--md-sys-color-error-container); color: #991b1b; }
.notice.error .lucide { color: var(--md-sys-color-error); }
.notice.warning { background: #fff7ed; color: #9a3412; }
.notice.warning .lucide { color: #c2410c; }
.notice strong { font-weight: 650; }
/* Aviso com ação no fim da linha (ex.: "Continuar" com sessão ativa). */
.session-continue { align-items: center; }
.session-continue > span { flex: 1; min-width: 0; }
.session-continue .text-button { margin: -8px -8px -8px 0; flex: none; }

.detected { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px; border: 2px solid var(--md-sys-color-primary); border-radius: var(--radius-card); background: #fafcff; }
.detected > .lucide { color: var(--md-sys-color-primary); }
.detected > span { flex: 1; min-width: 180px; font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface); }
.detected strong { font-weight: 700; color: var(--md-sys-color-on-surface); }
.detected-actions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 4px; }
.detected-actions .button.small { min-height: 44px; width: 100%; padding: 8px 16px; font-size: 15px; }
.detected-actions .text-button { justify-content: center; text-align: center; }


.loading-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px 0; font-size: 15px; color: var(--md-sys-color-on-surface-variant); }
.spinner { width: 22px; height: 22px; flex: none; border: 3px solid var(--md-sys-color-primary-container); border-top-color: var(--md-sys-color-primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--md-sys-color-muted); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--md-sys-color-outline-variant); }

/* ---------- Grupos, checkboxes e chips ---------- */
fieldset { margin: 0; padding: 20px; min-width: 0; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--radius-card); }
legend { padding: 0 6px; }
fieldset > .support { margin-bottom: 12px; }
fieldset > .support:not(:first-of-type) { margin-top: 16px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-choice {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--radius-control);
  background: var(--md-sys-color-surface);
  font-size: 15px; line-height: 20px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.check-choice:hover { border-color: var(--md-sys-color-outline); }
.check-choice:has(input:checked) { border-color: var(--md-sys-color-primary); background: var(--md-sys-color-primary-container); }
.check-choice:has(input:focus-visible) { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--md-sys-color-primary); cursor: pointer; }
.check-choice.consent { align-items: flex-start; padding: 14px 16px; }
.check-choice.consent input { margin-top: 1px; }

/* Os 7 dias sempre em uma linha: evita o chip órfão "Dom" na segunda linha. */
.chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chips .check-choice { justify-content: center; min-height: 44px; padding: 8px 0; border-radius: 999px; font-size: 14px; }
.chips .check-choice:has(input:checked) { background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
/* Checkbox visualmente oculto, mas acessível a teclado e leitores de tela. */
.chips .check-choice input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Seleção múltipla em formato dropdown */
.multi-select-dropdown {
  position: relative;
  width: 100%;
}
.multi-select-trigger {
  width: 100%; min-width: 0; min-height: 52px;
  padding: 13px 44px 13px 16px;
  font-family: inherit; font-size: 16px; line-height: 24px;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23536078' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-control);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
  transition: border-color .15s, box-shadow .15s;
}
.multi-select-trigger:hover {
  border-color: var(--md-sys-color-on-surface-variant);
}
.multi-select-trigger:focus,
.multi-select-trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--focus-ring);
}
.multi-select-dropdown.open .multi-select-trigger {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
.multi-select-placeholder {
  color: #7a879c;
}
.multi-select-value {
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-select-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 290px;
  overflow-y: auto;
  padding: 12px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 28px rgba(20, 33, 61, 0.16);
  display: none;
  flex-direction: column;
  gap: 12px;
}
.multi-select-dropdown.open .multi-select-panel {
  display: flex;
}
.function-category-group { display: flex; flex-direction: column; gap: 6px; }
.function-category-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--md-sys-color-primary); padding: 2px 4px 0;
}
.function-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.function-chips .check-choice {
  min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
}
.function-chips .check-choice:has(input:checked) {
  background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
}
.function-chips .check-choice input {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Acordeão de informações opcionais ---------- */
details { border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--radius-card); background: var(--md-sys-color-surface); }
summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 16px 20px; border-radius: var(--radius-card);
  font-size: 15px; font-weight: 600; list-style: none; cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ''; margin-left: auto; width: 20px; height: 20px; flex: none;
  background: var(--md-sys-color-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .2s;
}
details[open] summary::after { transform: rotate(180deg); }
summary:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: -2px; }
.details-body { display: flex; flex-direction: column; gap: 20px; padding: 4px 20px 20px; }

.photo-input { display: flex; align-items: center; gap: 16px; min-width: 0; }
.photo-input > div { flex: 1; min-width: 0; }
.photo-input > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-button { width: auto; min-height: 44px; padding: 10px 20px; font-size: 14px; cursor: pointer; }
.photo-input:has(input:focus-visible) .photo-button { outline: 2px solid var(--md-sys-color-primary); outline-offset: 3px; }
.photo-name { overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-preview { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; }

/* ---------- Revisão ---------- */
.review-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 20px; border: 1px solid var(--md-sys-color-primary); border-radius: var(--radius-card); background: var(--md-sys-color-primary-container); }
.review-summary h2 { color: var(--md-sys-color-on-primary-container); }
.review-summary h2 { font-size: 18px; line-height: 26px; font-weight: 650; }
.review-summary p { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }
.review-section { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-heading h3 { font-size: 17px; line-height: 24px; font-weight: 650; }
.review-heading .text-button { margin-right: -12px; }
dl { display: grid; gap: 12px; margin: 0; }
dl div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
dt { font-size: 13px; line-height: 18px; color: var(--md-sys-color-muted); }
dd { margin: 0; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.review-name-row { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--md-sys-color-primary-container); flex: none; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ---------- Conclusão ---------- */
.result-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-primary); }
.result-icon.success { background: var(--md-sys-color-success-container); color: var(--md-sys-color-success); }
.result-icon.warning { background: #fff7ed; color: #c2410c; }
.result-icon .lucide { width: 32px; height: 32px; }
.result-hero p { color: var(--md-sys-color-on-surface-variant); }
.result-context { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--md-sys-color-surface-container); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.result-context .lucide { width: 18px; height: 18px; color: var(--md-sys-color-primary); }

/* ---------- Rodapé ---------- */
.registration-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 24px;
  background: var(--md-sys-color-surface); border-top: 1px solid var(--md-sys-color-outline-variant);
  font-size: 11px; line-height: 16px; color: var(--md-sys-color-outline);
  opacity: 0.85;
}
.registration-footer nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.registration-footer nav span { color: var(--md-sys-color-outline-variant); }
.registration-footer button { min-height: 24px; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 11px; }
.registration-footer button:hover { color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 2px; }
.developer-credit { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 11px; }
.developer-credit .avenka-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: 500; border-radius: 3px; }
.developer-credit .avenka-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.avenka-mark { display: block; width: 12px; height: 15px; flex: none; opacity: 0.8; }

/* ---------- Diálogo ---------- */
dialog { width: 440px; max-width: calc(100% - 32px); padding: 28px; border: 0; border-radius: var(--radius-panel); background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); box-shadow: 0 24px 48px rgba(20, 33, 61, .18); }
dialog:not([open]) { display: none !important; }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
dialog h2 { margin-bottom: 12px; font-size: 22px; line-height: 28px; font-weight: 700; }
dialog p { margin: 0 0 24px; color: var(--md-sys-color-on-surface-variant); }

/* ---------- Acessibilidade ---------- */
a:focus-visible, button:focus-visible, [tabindex]:not(h1):focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 3px; }
.skip-link { position: fixed; top: 16px; left: 16px; z-index: 50; padding: 12px 20px; border: 2px solid var(--md-sys-color-primary); border-radius: 999px; background: var(--md-sys-color-surface); font-weight: 600; }
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
md-ripple { pointer-events: none; --md-ripple-hover-color: var(--md-sys-color-primary); --md-ripple-pressed-color: var(--md-sys-color-primary); border-radius: inherit; }
.button.primary md-ripple { --md-ripple-hover-color: #fff; --md-ripple-pressed-color: #fff; }

/* ---------- Etapas sem rolagem (perfil, acesso e cidade) ---------- */
html.scroll-locked, html.scroll-locked body,
html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.form-grid > * { grid-column: 1 / -1; min-width: 0; }
.form-grid > .half { grid-column: auto; }
.location-grid { grid-template-columns: minmax(104px, .32fr) minmax(0, 1fr); }

.fit-screen .registration-main { align-items: center; padding: 24px; }
.fit-screen .registration-card { width: 600px; gap: 16px; padding: 32px 40px; }
.fit-screen .card-content, .fit-screen .screen-form { gap: 14px; }
.fit-screen .registration-card h1 { font-size: 26px; line-height: 32px; }
.fit-screen .card-intro { font-size: 15px; line-height: 22px; margin-top: -6px; }
.fit-screen .field { gap: 6px; }
.fit-screen :where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select) { min-height: 48px; padding-top: 11px; padding-bottom: 11px; }
.fit-screen .button { min-height: 48px; padding-block: 12px; }
.fit-screen .actions { flex-direction: row-reverse; margin-top: 2px; }
.fit-screen .actions > * { flex: 1; }
.fit-screen .role-choice { padding: 16px 20px; }
.fit-screen .registration-footer { padding: 8px 24px; }

@media (max-height: 760px) {
  .fit-screen .registration-main { padding: 16px 24px; }
  .fit-screen .registration-card { gap: 12px; padding: 24px 36px; }
  .fit-screen .card-content, .fit-screen .screen-form { gap: 12px; }
  .fit-screen .registration-card h1 { font-size: 24px; line-height: 30px; }
  .fit-screen .registration-footer { padding: 6px 20px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 767px) {
  .card-logo img { width: 72px; height: 72px; }
  .registration-main { padding: 16px; }
  .registration-card { padding: 24px 20px; gap: 18px; border-radius: 20px; }
  .registration-card h1 { font-size: 26px; line-height: 32px; letter-spacing: -.5px; }
  .registration-card > p, .card-intro { font-size: 15px; line-height: 22px; }
  .choice-grid { grid-template-columns: 1fr; }
  .role-choice { grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 14px; padding: 16px; }
  .role-icon { width: 44px; height: 44px; border-radius: 12px; }
  fieldset { padding: 16px; }
  .details-body { padding: 4px 16px 16px; }
  .registration-footer { flex-direction: column-reverse; justify-content: center; gap: 4px; padding: 8px 16px; text-align: center; }
}
@media (max-width: 359px) {
  .registration-main { padding: 12px; }
  .registration-card { padding: 20px 16px; }
  .registration-card h1 { font-size: 24px; line-height: 30px; }
  .role-choice { grid-template-columns: minmax(0, 1fr) 18px; }
  .role-icon { display: none; }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .password-field > input { padding-right: 56px; }
  .toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .photo-input { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  html {
    scroll-padding-top: 68px;
    scroll-padding-bottom: 32px;
  }
  .registration-main {
    padding-bottom: 24px;
    transition: padding-bottom .2s ease-out;
  }
  .form-grid:not(.location-grid) > .half { grid-column: 1 / -1; }
  .fit-screen .registration-main { padding: 8px 12px; }
  .fit-screen .registration-card { gap: 10px; padding: 16px; border-radius: 18px; }
  .fit-screen .card-content, .fit-screen .screen-form { gap: 10px; }
  .fit-screen .registration-card h1 { font-size: 22px; line-height: 28px; }
  .fit-screen .card-intro { font-size: 14px; line-height: 20px; margin-top: -4px; }
  .fit-screen .field { gap: 4px; }
  .fit-screen :where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select) { min-height: 46px; padding-top: 10px; padding-bottom: 10px; }
  .fit-screen .button { min-height: 46px; padding-block: 11px; }
  .fit-screen .role-choice { padding: 14px 16px; }
  .fit-screen .registration-footer { gap: 0; padding: 4px 16px; font-size: 11px; line-height: 15px; }
  .fit-screen .registration-footer button { min-height: 22px; padding: 2px 4px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  md-ripple { display: none; }
}
