.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ordex-hairline);
  background: var(--ordex-canvas-white);
}

.site-nav__inner {
  display: flex;
  width: min(100% - 48px, 1300px);
  min-height: 80px;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
  padding-block: 8px;
}

.site-nav__brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  flex: 0 0 auto;
}

.site-nav__brand img {
  display: block;
  width: 160px;
  height: auto;
}

.site-nav__context {
  color: var(--ordex-ink-muted);
  font-size: 15px;
  line-height: 1.33;
}

.site-nav__access {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 4px 14px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-utility);
  background: var(--ordex-surface);
  color: var(--ordex-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.33;
  text-decoration: none;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
  min-height: calc(100vh - 81px);
  min-height: calc(100dvh - 81px);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  overflow: hidden;
  background: var(--ordex-night);
  color: #ffffff;
}

.brand-panel__inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 650px);
  min-height: 100%;
  flex-direction: column;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 80px);
}

.brand-wordmark {
  display: block;
  width: 196px;
  height: auto;
}

.brand-copy {
  margin-block: auto 48px;
}

.brand-panel .eyebrow {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0 0 16px;
  padding: 4px 8px;
  border-radius: var(--ordex-radius-pill);
  background: #ffffff;
  color: var(--ordex-primary);
}

.brand-copy h1 {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 4.2vw, 64px);
  font-weight: 700;
  letter-spacing: clamp(-2.125px, -0.14vw, -1px);
  line-height: 1;
}

.brand-copy > p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.workflow-list {
  display: grid;
  gap: 0;
  margin: 0 0 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: var(--ordex-radius-card);
  background: rgb(255 255 255 / 5%);
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.workflow-list li + li {
  border-top: 1px solid rgb(255 255 255 / 18%);
}

.workflow-step {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: var(--ordex-radius-utility);
  background: #ffffff;
  color: var(--ordex-night);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
}

.workflow-list strong,
.workflow-list li > span:last-child {
  display: block;
}

.workflow-list strong {
  margin-bottom: 2px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.33;
}

.workflow-list li > span:last-child {
  color: rgb(255 255 255 / 82%);
  font-size: 14px;
  line-height: 1.43;
}

.brand-footnote,
.mobile-footnote {
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 14px;
  line-height: 1.43;
}

.auth-panel {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--ordex-canvas);
}

/* /admin usa o mesmo cartão, sem o painel da marca. */
.auth-panel--standalone {
  min-height: calc(100vh - 81px);
  min-height: calc(100dvh - 81px);
}

.mobile-brand,
.mobile-footnote {
  display: none;
}

.auth-card {
  width: min(100%, 460px);
  padding: 32px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-large);
  background: var(--ordex-surface);
}

.auth-view {
  min-width: 0;
}

.auth-header {
  margin-bottom: 28px;
}

.auth-header .eyebrow {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 8px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-pill);
  background: var(--ordex-surface);
  color: var(--ordex-primary);
}

.auth-header h1,
.auth-header h2 {
  margin: 0;
}

/* Na página /admin o título do cartão é o h1; mantém o corpo do h2 da entrada. */
.auth-header h1 {
  font-size: 26px;
  letter-spacing: -0.625px;
  line-height: 1.23;
}

.auth-header > p:last-child {
  margin: 8px 0 0;
  color: var(--ordex-ink-muted);
  font-size: 15px;
  line-height: 1.33;
}

.form-message {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgb(221 91 0 / 32%);
  border-radius: var(--ordex-radius-utility);
  background: rgb(221 91 0 / 8%);
  color: var(--ordex-orange-deep);
  font-size: 14px;
  line-height: 1.43;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label,
.field-label-row {
  color: var(--ordex-ink-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.43;
}

.form-field > label {
  display: inline-block;
  margin-bottom: 6px;
}

.field-label-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label-row span {
  color: var(--ordex-ink-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  text-align: right;
}

.form-field input {
  min-height: 48px;
  padding: 10px 12px;
  /* 16px evita o zoom automático do Safari no iPhone ao focar o campo. */
  font-size: 16px;
  line-height: 1.33;
}

.form-field input:user-invalid {
  border-color: var(--ordex-orange);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 80px;
  min-height: 44px;
  padding: 4px 10px;
  border: 0;
  border-radius: var(--ordex-radius-utility);
  background: var(--ordex-surface);
  color: var(--ordex-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.primary-action {
  position: relative;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 20px;
  transition: transform 100ms ease;
}

.primary-action:disabled {
  cursor: wait;
}

.button-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #ffffff;
  border-radius: var(--ordex-radius-pill);
  animation: spin 700ms linear infinite;
}

.primary-action[aria-busy="true"] [data-button-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.primary-action[aria-busy="true"] .button-spinner {
  display: block;
}

.view-switch {
  margin: 24px 0 0;
  color: var(--ordex-ink-muted);
  font-size: 14px;
  line-height: 1.43;
  text-align: center;
}

.view-switch button,
.view-switch a {
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--ordex-primary);
  cursor: pointer;
  font-weight: 500;
}

.view-switch a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.recover-options {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.recover-option {
  padding: 16px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-card);
  background: var(--ordex-canvas);
}

.recover-option h3 {
  margin: 0;
  color: var(--ordex-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.recover-option p {
  margin: 6px 0 0;
  color: var(--ordex-ink-secondary);
  font-size: 14px;
  line-height: 1.43;
}

.recover-option .view-switch {
  margin-top: 8px;
  text-align: left;
}

.privacy-note {
  margin: 16px 0 0;
  color: var(--ordex-ink-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.registration-paused {
  margin: 24px 0 0;
  padding: 16px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-card);
  background: var(--ordex-canvas);
  color: var(--ordex-ink-muted);
  font-size: 14px;
  line-height: 1.43;
}

.registration-paused strong,
.registration-paused span {
  display: block;
}

.registration-paused strong {
  margin-bottom: 4px;
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ordex-ink);
  caret-color: var(--ordex-ink);
  box-shadow: 0 0 0 1000px var(--ordex-surface) inset;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

@media (max-width: 1068px) {
  .auth-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .brand-panel__inner,
  .auth-panel {
    padding: 32px;
  }

}

@media (max-width: 833px) {
  .site-nav__context {
    display: none;
  }

  .auth-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .auth-panel {
    order: -1;
    min-height: calc(100vh - 81px);
    min-height: calc(100dvh - 81px);
    padding: 32px 24px;
  }

  .brand-panel__inner {
    width: min(100%, 680px);
    padding: 48px 24px;
  }

  .brand-copy {
    margin: 48px 0 32px;
  }

  .brand-copy h1 {
    font-size: 40px;
    letter-spacing: -1px;
    line-height: 1.1;
  }

  .workflow-list {
    margin-bottom: 24px;
  }
}

@media (max-width: 600px) {
  .site-nav__inner {
    width: min(100% - 32px, 1300px);
    min-height: 72px;
    gap: 16px;
  }

  .site-nav__brand img {
    width: 136px;
  }

  .site-nav__access {
    padding-inline: 12px;
    font-size: 14px;
  }

  .auth-panel {
    align-items: flex-start;
    min-height: calc(100vh - 73px);
    min-height: calc(100dvh - 73px);
    padding: 24px 16px 32px;
  }

  .auth-card {
    width: 100%;
    margin: auto 0;
    padding: 24px;
  }

  .brand-panel__inner {
    padding: 48px 20px;
  }

  .brand-copy h1 {
    font-size: 34px;
    letter-spacing: -0.85px;
  }

  .field-label-row {
    display: block;
  }

  .field-label-row span {
    display: block;
    margin-top: 2px;
    text-align: left;
  }
}

@media (max-width: 419px) {
  .auth-card {
    padding: 20px 16px;
    border-radius: var(--ordex-radius-card);
  }

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

  .brand-copy h1 {
    font-size: 28px;
    letter-spacing: -0.7px;
  }

  .workflow-list li {
    padding: 12px;
  }
}

@media (max-height: 720px) and (min-width: 834px) {
  .brand-panel__inner,
  .auth-panel {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .brand-copy {
    margin-bottom: 24px;
  }

  .workflow-list li {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .auth-card {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
