/* ============================================================
   GoParking — portal MVC
   Componentes específicos da aplicação construídos sobre os
   tokens e componentes do design system da referência.
   ============================================================ */

body.portal-body {
  background: var(--cream);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.portal-main {
  flex: 1;
  padding: 32px 0 76px;
}

/* ---------- Utilidades ---------- */
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ---------- Cabeçalho de página ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(1.6rem, 2.9vw, 2.2rem);
  letter-spacing: -.045em;
  line-height: 1.12;
}

.page-head p {
  margin-top: 7px;
  max-width: 720px;
  font-size: .88rem;
  color: var(--ink-mute);
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-head-actions .btn {
  height: 42px;
  font-size: .82rem;
}

.breadcrumbs {
  margin-bottom: 14px;
}

.portal-main .page-hero {
  padding: 30px 32px;
  margin-bottom: 22px;
  border-radius: 22px;
}

.portal-main .page-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.portal-main .page-hero p {
  max-width: 640px;
}

/* ---------- Estruturas ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.split--even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split--aside-left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
}

/* ---------- Ajustes de layout ---------- */
.dash-grid {
  align-items: start;
}

.results-layout--prompt {
  align-items: stretch;
}

.results-layout--prompt .results-main {
  display: flex;
  flex-direction: column;
}

.results-layout--prompt .empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-media {
  background: var(--sand);
}

.result-media-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-mute);
  font-size: .7rem;
  font-weight: 600;
}

.result-media-fallback .icon {
  width: 24px;
  height: 24px;
}

.result-media img[hidden] + .result-media-fallback {
  display: flex;
}

/* ---------- Painéis ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 22px;
}

.panel--lg {
  padding: 28px;
}

.panel--flush {
  padding: 0;
  overflow: hidden;
}

.panel--sand {
  background: var(--sand);
  border-color: transparent;
}

.panel--mint {
  background: var(--mint-tint);
  border-color: transparent;
}

.panel--pine {
  background: linear-gradient(150deg, var(--pine), var(--pine-deep));
  border-color: transparent;
  color: var(--white);
}

.panel--pine h2,
.panel--pine h3,
.panel--pine strong {
  color: var(--white);
}

.panel--pine p,
.panel--pine .muted {
  color: rgba(255, 255, 255, .66);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-head h2,
.panel-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
  letter-spacing: -.02em;
}

.panel-head h2 .icon,
.panel-head h3 .icon {
  width: 17px;
  height: 17px;
  color: var(--mint);
}

.panel-head p {
  margin-top: 3px;
  font-size: .74rem;
  color: var(--ink-mute);
}

.panel-head .btn,
.panel-head .btn-link {
  flex: none;
}

.panel-divider {
  height: 1px;
  background: var(--line-soft);
  border: 0;
  margin: 16px 0;
}

/* ---------- Alertas ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .83rem;
  line-height: 1.5;
}

.alert .icon {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}

.alert strong {
  font-weight: 700;
}

.alert--success {
  background: #eaf8f2;
  border-color: #c6ebdd;
  color: #086b53;
}

.alert--error {
  background: var(--red-tint);
  border-color: #f3cfcd;
  color: #a83a36;
}

.alert--warn {
  background: #fff7e4;
  border-color: #f4e0ad;
  color: #8a5a00;
}

.alert--info {
  background: #eef5ff;
  border-color: #d3e3fb;
  color: #2f5fa8;
}

.alert a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-list {
  margin: 6px 0 0;
  padding-left: 18px;
  list-style: disc;
}

/* ---------- Formulários ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-section + .form-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.form-section-head {
  margin-bottom: 14px;
}

.form-section-head h2 {
  font-size: .98rem;
  letter-spacing: -.02em;
}

.form-section-head p {
  margin-top: 3px;
  font-size: .76rem;
  color: var(--ink-mute);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.form-actions--between {
  justify-content: space-between;
}

.field .text-danger,
.field .field-validation-error {
  font-size: .74rem;
  color: var(--red);
  font-weight: 500;
}

.input-validation-error {
  border-color: #e7a9a6 !important;
  background: #fffafa !important;
}

.validation-summary-errors ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.validation-summary-valid {
  display: none;
}

/* ---------- Passos / lateral de formulário ---------- */
.form-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.steps-list li > span {
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mint-tint);
  color: var(--pine);
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 800;
}

/* ---------- Setores / fotos administrativas ---------- */
.data-table--fit {
  min-width: 0;
}

.data-table--fit th,
.data-table--fit td {
  padding-left: 10px;
  padding-right: 10px;
}

.setor-block {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

.setor-block + .setor-block {
  margin-top: 12px;
}

.setor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.setor-head h3 {
  font-size: .95rem;
  letter-spacing: -.02em;
}

.setor-head p {
  margin-top: 2px;
  font-size: .76rem;
  color: var(--ink-mute);
}

.add-vaga,
.add-setor {
  margin-top: 12px;
}

.add-vaga summary,
.add-setor summary {
  cursor: pointer;
  font-size: .76rem;
  font-weight: 600;
  color: var(--pine);
  list-style: none;
}

.add-vaga summary::-webkit-details-marker,
.add-setor summary::-webkit-details-marker {
  display: none;
}

.add-vaga summary::before,
.add-setor summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mint-tint);
  color: var(--pine);
  font-weight: 800;
}

.add-vaga summary:hover,
.add-setor summary:hover {
  color: var(--mint);
}

.photo-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-admin-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  background: var(--sand);
}

.photo-admin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-mute);
  font-size: .7rem;
  font-weight: 600;
}

.photo-fallback .icon {
  width: 20px;
  height: 20px;
}

.photo-admin-item img[hidden] + .photo-fallback {
  display: flex;
}

.photo-admin-item form {
  position: absolute;
  top: 6px;
  right: 6px;
}

.photo-admin-item button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #a83a36;
}

.photo-admin-item button:hover {
  background: var(--white);
}

.photo-admin-item button .icon {
  width: 13px;
  height: 13px;
}

/* ---------- Chave/valor ---------- */
.kv {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .82rem;
}

.kv-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kv-row dt {
  color: var(--ink-mute);
  flex: none;
}

.kv-row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kv-tile {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--cream);
  min-width: 0;
}

.kv-tile span {
  display: block;
  font-size: .64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-mute);
}

.kv-tile strong {
  display: block;
  margin-top: 4px;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

/* ---------- Status extras ---------- */
.status--aberta,
.status--andamento,
.status--em-andamento,
.status--aguardando {
  background: #eef5ff;
  color: #2f5fa8;
}

.status--aprovada,
.status--aprovado,
.status--publicada,
.status--ativo,
.status--ativa,
.status--pago,
.status--aprovado {
  background: var(--mint-tint);
  color: #087056;
}

.status--reprovada,
.status--reprovado,
.status--recusada,
.status--falhou,
.status--bloqueado,
.status--bloqueada,
.status--procedente {
  background: var(--red-tint);
  color: #a83a36;
}

.status--pausada,
.status--pausado,
.status--rascunho,
.status--inativo,
.status--inativa,
.status--suspensa,
.status--suspenso,
.status--resolvida,
.status--finalizada {
  background: #eef0f0;
  color: #53605d;
}

.status--improcedente,
.status--reembolsado {
  background: var(--mint-tint);
  color: #087056;
}

.status--pendente,
.status--analise {
  background: #fff4dc;
  color: #9a6100;
}

.status--administrador {
  background: var(--pine);
  color: var(--white);
}

.status--confirmada {
  background: var(--mint-tint);
  color: #087056;
}

.status--concluida {
  background: #eef0f0;
  color: #53605d;
}

.status--cancelada {
  background: #fdf0ef;
  color: #a83a36;
}

/* ---------- Navegação administrativa ---------- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  margin-bottom: 18px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .18s, color .18s;
}

.admin-nav a .icon {
  width: 14px;
  height: 14px;
}

.admin-nav a:hover {
  background: var(--sand);
  color: var(--ink);
}

.admin-nav a.is-active {
  background: var(--pine);
  color: var(--white);
}

/* ---------- Tabelas auxiliares ---------- */
.table-card .data-table td .btn-link {
  font-size: .74rem;
}

.table-card .data-table td .btn {
  height: 32px;
  padding: 0 12px;
  font-size: .72rem;
}

.table-empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--ink-mute);
  font-size: .82rem;
}

/* ---------- Listas de cartões ---------- */
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

.list-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.list-card-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--mint-tint);
  color: var(--pine);
}

.list-card-icon .icon {
  width: 19px;
  height: 19px;
}

.list-card-body {
  min-width: 0;
  flex: 1;
}

.list-card-body h3 {
  font-size: .9rem;
  line-height: 1.35;
}

.list-card-body p {
  margin-top: 3px;
  font-size: .76rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

.list-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin-top: 8px;
  font-size: .7rem;
  color: var(--ink-mute);
}

.list-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.list-card-meta .icon {
  width: 13px;
  height: 13px;
}

.list-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-side select {
  width: 100%;
  height: 36px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  font-size: .72rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23465853' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.result-side .res-actions {
  width: 100%;
}

/* ---------- Mídia / miniaturas ---------- */.media-thumb {
  width: 92px;
  height: 72px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-wide {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sand);
}

.media-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Perfil ---------- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-hero .avatar {
  width: 64px;
  height: 64px;
  font-size: 1.15rem;
}

.profile-hero-copy {
  min-width: 0;
  flex: 1;
}

.profile-hero-copy h1 {
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

.profile-hero-copy p {
  margin-top: 2px;
  font-size: .82rem;
  color: var(--ink-mute);
}

/* ---------- Notificações ---------- */
.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}

.notification-card.is-unread {
  border-color: #c9eadf;
  background: linear-gradient(0deg, rgba(231, 246, 240, .45), rgba(231, 246, 240, .45)), var(--white);
}

.notification-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mint-tint);
  color: var(--pine);
}

.notification-icon .icon {
  width: 17px;
  height: 17px;
}

.notification-copy {
  min-width: 0;
  flex: 1;
}

.notification-copy strong {
  display: block;
  font-size: .84rem;
}

.notification-copy p {
  margin-top: 3px;
  font-size: .78rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.notification-copy time {
  display: block;
  margin-top: 6px;
  font-size: .68rem;
  color: var(--ink-mute);
}

/* ---------- Estatísticas ---------- */
.panel-link {
  display: block;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}

.panel-link:hover {
  border-color: #c9eadf;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  display: block;
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-mute);
}

.stat-value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--ink);
}

.stat-value strong {
  font-weight: 800;
}

.stat-foot {
  margin-top: 4px;
  font-size: .68rem;
  color: var(--ink-mute);
}

.empty-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--cream);
  font-size: .8rem;
  color: var(--ink-mute);
}

.empty-mini .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ink-mute);
}

/* ---------- Financeiro ---------- */
.money-positive {
  color: #087056;
}

.money-negative {
  color: #a83a36;
}

.money-neutral {
  color: var(--ink);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--line-soft);
}

.summary-strip > div {
  padding: 16px 18px;
  background: var(--white);
}

.summary-strip span {
  display: block;
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-mute);
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -.03em;
}

/* ---------- Página de erro ---------- */
.error-page {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
}

.error-page .empty-state-icon {
  width: 76px;
  height: 76px;
}

/* ============================================================
   Autenticação (login, cadastro, recuperação)
   ============================================================ */
.auth-body {
  min-height: 100vh;
  background: var(--cream);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 46px 52px;
  background: linear-gradient(155deg, #0e4b42 0%, var(--pine) 42%, var(--pine-deep) 100%);
  color: var(--white);
}

.auth-visual::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 242, 107, .22), transparent 68%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -200px;
  bottom: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 168, 126, .34), transparent 68%);
}

.auth-visual-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 38px;
  height: 100%;
}

.auth-visual .logo-word {
  color: var(--white);
}

.auth-visual .logo-word span {
  color: var(--lime);
}

.auth-visual-copy {
  margin-top: auto;
  max-width: 430px;
}

.auth-visual-copy .eyebrow {
  color: var(--lime);
}

.auth-visual-copy .eyebrow::before {
  background: var(--lime);
}

.auth-visual-copy h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  line-height: 1.06;
  letter-spacing: -.05em;
  color: var(--white);
}

.auth-visual-copy h2 em {
  color: var(--lime);
  font-style: normal;
}

.auth-visual-copy p {
  margin-top: 16px;
  font-size: .94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .68);
}

.auth-visual-facts {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 26px;
}

.auth-visual-facts li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .84rem;
  color: rgba(255, 255, 255, .82);
}

.auth-visual-facts .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--lime);
}

.auth-visual-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
}

.auth-visual-card .avatar {
  background: rgba(217, 242, 107, .16);
  color: var(--lime);
}

.auth-visual-card div {
  min-width: 0;
  line-height: 1.35;
}

.auth-visual-card strong {
  display: block;
  font-size: .8rem;
  color: var(--white);
}

.auth-visual-card span {
  font-size: .72rem;
  color: rgba(255, 255, 255, .58);
}

.auth-visual-card .icon {
  width: 14px;
  height: 14px;
  color: var(--amber);
  flex: none;
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 28px;
}

.auth-main-inner {
  width: min(490px, 100%);
}

.auth-main-inner--wide {
  width: min(560px, 100%);
}

.auth-mobile-logo {
  display: none;
  justify-content: center;
  margin-bottom: 22px;
}

.auth-card {
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.auth-head {
  margin-bottom: 22px;
}

.auth-head h1 {
  font-size: clamp(1.45rem, 2.3vw, 1.75rem);
  letter-spacing: -.04em;
  line-height: 1.15;
}

.auth-head p {
  margin-top: 7px;
  font-size: .85rem;
  color: var(--ink-mute);
  line-height: 1.55;
}

.auth-tabs {
  margin-bottom: 22px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--pine);
}

.auth-back .icon {
  width: 14px;
  height: 14px;
}

.auth-back:hover {
  color: var(--mint);
}

.auth-switch {
  margin-top: 4px;
}

.auth-switch a {
  color: var(--pine);
  font-weight: 600;
}

.auth-switch a:hover {
  color: var(--mint);
}

.auth-foot {
  margin-top: 20px;
  font-size: .72rem;
  color: var(--ink-mute);
  text-align: center;
  line-height: 1.5;
}

.auth-foot a {
  color: var(--pine);
  font-weight: 600;
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 46px;
}

.auth-password-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
}

.auth-password-toggle:hover {
  background: var(--sand);
  color: var(--ink);
}

.auth-password-toggle .icon {
  width: 17px;
  height: 17px;
}

.auth-demo-note {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--sand);
  font-size: .74rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.auth-demo-note strong {
  color: var(--ink);
}

.auth-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-check-row a {
  font-size: .78rem;
  font-weight: 600;
  color: var(--pine);
}

.auth-check-row a:hover {
  color: var(--mint);
}

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual {
    display: none;
  }

  .auth-mobile-logo {
    display: flex;
  }

  .split,
  .split--even,
  .split--aside-left {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .portal-main {
    padding: 24px 0 58px;
  }

  .portal-main .page-hero {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .page-head-actions {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid,
  .form-grid--3,
  .kv-grid,
  .summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .panel {
    padding: 18px;
  }

  .panel--lg {
    padding: 20px;
  }

  .auth-main {
    padding: 26px 16px;
  }

  .auth-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .btn {
    flex: 1;
  }
}

/* ============================================================
   Loading global
   ============================================================ */

.page-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.page-progress.is-active { opacity: 1; }

.page-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--mint-bright) 55%, var(--mint));
  box-shadow: 0 0 10px rgba(34, 199, 154, .55);
  transition: width .2s ease;
}

.page-progress.is-active span {
  animation: gp-progress-grow 1.6s cubic-bezier(.15, .75, .25, 1) forwards;
}

.page-progress.is-done span {
  width: 100%;
  animation: none;
  transition: width .2s ease-out;
}

@keyframes gp-progress-grow {
  from { width: 0; }
  to { width: 86%; }
}

.page-progress.is-done {
  opacity: 0;
  transition: opacity .28s ease .12s;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(251, 250, 246, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.page-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 190px;
  padding: 26px 30px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.page-loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--mint-tint);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: gp-spin .7s linear infinite;
}

.page-loader-text {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Botões em estado de envio */
.btn.is-loading,
button.is-loading {
  position: relative;
  pointer-events: none;
  cursor: progress;
  color: transparent !important;
}

.btn.is-loading > *,
button.is-loading > * { opacity: 0; }

.btn.is-loading::after,
button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--btn-spinner, var(--white));
  border-right-color: transparent;
  border-radius: 50%;
  animation: gp-spin .65s linear infinite;
}

.btn-primary.is-loading,
.btn-dark.is-loading { --btn-spinner: var(--white); }

.btn-accent.is-loading,
.btn-outline.is-loading,
.btn-ghost.is-loading,
.btn-white.is-loading,
.btn-link.is-loading,
button.is-loading { --btn-spinner: var(--pine); }

@keyframes gp-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-progress span,
  .page-loader,
  .page-loader-spinner,
  .btn.is-loading::after,
  button.is-loading::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Selects com busca
   ============================================================ */

.gp-select-popover {
  position: fixed;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 16px);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: gp-select-popover-in .16s var(--ease);
}

.gp-select-popover[hidden] { display: none; }

.gp-select-popover[data-placement="top"] {
  animation-name: gp-select-popover-in-top;
}

.gp-select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--white);
}

.gp-select-search .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-mute);
}

.gp-select-search-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .86rem;
  line-height: 1;
  outline: none;
  appearance: none;
}

.gp-select-search-input::placeholder { color: #9AA5A1; }
.gp-select-search-input::-webkit-search-cancel-button { display: none; }

.gp-select-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  appearance: none;
}

.gp-select-search-clear[hidden] { display: none; }
.gp-select-search-clear:hover { background: var(--sand); color: var(--ink); }
.gp-select-search-clear .icon { width: 14px; height: 14px; }

.gp-select-options {
  max-height: 280px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.gp-select-group + .gp-select-group { margin-top: 4px; }

.gp-select-group-label {
  padding: 8px 10px 4px;
  color: var(--ink-mute);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gp-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .86rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.gp-select-option:hover,
.gp-select-option.is-active { background: var(--mint-tint); }

.gp-select-option[aria-selected="true"] {
  color: var(--pine);
  font-weight: 600;
}

.gp-select-option:disabled,
.gp-select-option[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
}

.gp-select-option-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gp-select-option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--mint);
  opacity: 0;
}

.gp-select-option-check .icon { width: 15px; height: 15px; }
.gp-select-option[aria-selected="true"] .gp-select-option-check { opacity: 1; }

.gp-select-empty {
  padding: 18px 12px;
  color: var(--ink-mute);
  font-size: .82rem;
  text-align: center;
}

@keyframes gp-select-popover-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gp-select-popover-in-top {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .gp-select-search-input { font-size: 16px; }
  .gp-select-option { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .gp-select-popover { animation: none; }
}

/* ---------- Confirmação de ações ---------- */
body.gp-dialog-open { overflow: hidden; }

dialog.gp-confirm {
  width: min(480px, calc(100% - 32px));
}

.gp-confirm .modal-panel {
  padding: 32px;
}

.gp-confirm .mini-mark {
  background: var(--red-tint);
  color: var(--red);
}

.gp-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.gp-confirm-actions .btn {
  min-width: 120px;
}

@media (max-width: 520px) {
  .gp-confirm .modal-panel {
    padding: 28px 22px;
  }

  .gp-confirm-actions {
    flex-direction: column;
  }

  .gp-confirm-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.gp-confirm[open] { animation: none; }
}
