:root {
  --access-bg: #1c1510;
  --access-surface: #211911;
  --access-ink: #f3e9d8;
  --access-muted: #c5b8a6;
  --access-gold: #d9b27c;
  --access-accent: #e8c796;
  --access-border: rgba(217,178,124,.24);
  --access-field-bg: #19130e;
  --access-field-border: #796d5a;
  --access-radius: 8px;
  --access-transition: 180ms ease;
  --access-sans: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --access-serif: 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--access-bg); }
::selection { background: #e8c796; color: #1a130c; }
body { position: relative; isolation: isolate; margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--access-bg); color: var(--access-ink); font-family: var(--access-sans); -webkit-font-smoothing: antialiased; }
/* Fundo aprovado preservado, agora sem gradientes. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('../images/acesso-arena-v2-1672.webp') center / cover no-repeat; }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: rgba(28,21,16,.36); }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--access-accent); outline-offset: 3px; }
.access-skip { position: absolute; top: 8px; left: 8px; padding: 12px; background: var(--access-bg); transform: translateY(-160%); z-index: 2; }
.access-skip:focus { transform: none; }
.access-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 20px; width: 100%; max-width: 1440px; margin-inline: auto; padding: 16px clamp(24px, 5vw, 72px); }
.access-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.access-brand img { display: block; width: 56px; height: auto; aspect-ratio: 150 / 181; }
.access-brand > span { font: 500 40px/1 var(--access-serif); }
.access-brand small { display: block; margin-top: 7px; font: 500 9px/1.5 var(--access-sans); text-transform: uppercase; letter-spacing: .16em; color: var(--access-gold); }
.access-back { display: inline-flex; align-items: center; min-height: 48px; font-size: 13px; text-decoration-color: var(--access-border); transition: color var(--access-transition); }
.access-back:hover, .access-privacy:hover { color: var(--access-accent); }
.access-main { display: grid; place-items: center; flex: 1 0 auto; width: 100%; padding: 12px 24px 24px; }
.access-card { position: relative; width: 100%; max-width: 560px; background: var(--access-surface); border: 1px solid var(--access-border); border-radius: var(--access-radius); box-shadow: 0 16px 40px rgba(0,0,0,.2), inset 0 1px 0 rgba(232,199,150,.08); }
.access-content { min-width: 0; width: 100%; padding: 20px 28px 24px; }
.access-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; background: #19130e; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(217,178,124,.12); }
.access-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; font-size: 17px; font-weight: 500; text-decoration: none; color: #c5b8a6; transition: color var(--access-transition), background-color var(--access-transition), border-color var(--access-transition); }
.access-switch a[aria-selected="true"] { border-color: rgba(217,178,124,.48); color: #f0c990; font-weight: 600; background: #392b1c; box-shadow: inset 0 1px 0 rgba(243,233,216,.06); }
.access-switch a:not([aria-selected="true"]):hover { color: var(--access-ink); background: #271e15; }
.access-switch a:not([aria-selected="true"]):active { background: #302418; }
.access-description { margin: 0 0 24px; color: #d0c5b4; font-size: 16px; line-height: 1.6; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset:disabled .access-field :is(input, select) { opacity: 1; }
fieldset:disabled :is(.access-reveal, .access-submit) { opacity: .85; }
fieldset:disabled, fieldset:disabled * { cursor: not-allowed; }
.access-field { display: grid; gap: 8px; min-width: 0; }
.access-field + .access-field, .access-columns, .access-columns + .access-field { margin-top: 20px; }
.access-field label { display: block; color: var(--access-ink); font-size: 15px; font-weight: 500; line-height: 1.4; }
.access-label-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; }
.access-field input, .access-field select { display: block; width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: 1px solid var(--access-field-border); border-radius: 6px; background: var(--access-field-bg); color: var(--access-ink); font: 400 16px var(--access-sans); scroll-margin-block: 96px 140px; transition: border-color var(--access-transition), background-color var(--access-transition); }
.access-field :is(input, select):enabled:not([aria-invalid="true"]):hover { border-color: #a58b66; }
.access-field :is(input, select):focus-visible { border-color: var(--access-accent); }
.access-field input::placeholder { color: #b3a797; opacity: 1; }
.access-field input:disabled, .access-field select:disabled { opacity: 1; -webkit-text-fill-color: #b3a797; }
.access-field input[aria-invalid="true"], .access-field select[aria-invalid="true"] { border-color: #c96a3c; }
.access-password { position: relative; }
.access-password input { padding-right: 94px; }
.access-reveal { position: absolute; right: 4px; top: 4px; min-width: 80px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 2px; background: transparent; color: var(--access-gold); font: 500 14px var(--access-sans); transition: color var(--access-transition), background-color var(--access-transition); }
.access-reveal:enabled:hover { background: rgba(217,178,124,.08); color: var(--access-accent); }
.access-columns { display: grid; grid-template-columns: minmax(0, 65fr) minmax(0, 35fr); gap: 16px; }
.access-columns .access-field { margin-top: 0; }
.access-register-title { margin: 0 0 8px; color: var(--access-ink); font: 600 32px/1.15 var(--access-serif); letter-spacing: -.01em; }
.access-register-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
#panel-register .access-register-grid > .access-field, #panel-register .access-columns, #panel-register .access-columns > .access-field { margin-top: 0; }
.access-register-grid > .access-field:first-child, .access-register-grid > .access-columns { grid-column: 1 / -1; }
.access-register-grid .access-columns { grid-template-columns: minmax(0, 1fr) 96px; }
.access-register-grid .access-password input { padding-right: 80px; }
.access-register-grid .access-reveal { min-width: 68px; font-size: 13px; }
#panel-register .access-submit { margin-top: 20px; }
#panel-register .access-switch-note { margin-top: 8px; }

.access-hint { margin: 0; color: #b9ae9e; font-size: 14px; line-height: 1.6; }
.access-error { margin: 0; color: #f0a070; font-size: 14px; line-height: 1.5; }
.access-text-button { display: inline-flex; align-items: center; min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--access-gold); font: 500 14px var(--access-sans); text-decoration: underline; text-underline-offset: 4px; }
.access-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 12px 16px; margin-top: 24px; border: 1px solid var(--access-gold); border-radius: 6px; background: var(--access-gold); color: #1a130c; text-align: center; text-decoration: none; font: 600 16px/1.5 var(--access-sans); transition: background-color var(--access-transition), border-color var(--access-transition); }
.access-submit:not(:disabled):hover { background: var(--access-accent); border-color: var(--access-accent); }
.access-submit:not(:disabled):active { background: #c99a5b; border-color: #c99a5b; }
.access-submit:disabled { cursor: not-allowed; }
#panel-login .access-submit { margin-top: 20px; }
.access-switch-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; margin: 24px 0 0; text-align: center; font-size: 16px; line-height: 1.65; }
.access-switch-note a { display: inline-flex; align-items: center; min-height: 48px; color: var(--access-gold); }
.access-switch-note a:hover, .access-text-button:enabled:hover { color: var(--access-accent); }
.access-alert { padding: 14px 16px; margin-bottom: 24px; border-radius: 4px; font-size: 15px; line-height: 1.65; }
.access-alert p { margin: 0; }
.access-alert-error { background: rgba(201,106,60,.12); border: 1px solid rgba(201,106,60,.4); }
.access-alert .access-submit { margin-top: 16px; }
h2 { margin: 0 0 16px; font: 600 28px/1.15 var(--access-serif); }
.access-success p, .access-message { font-size: 16px; line-height: 1.7; }
.access-privacy { display: inline-flex; align-items: center; min-height: 48px; font-size: inherit; text-decoration-color: var(--access-border); }
.access-footer { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 24px; padding: 0 24px 8px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--access-muted); }
.access-sr, .access-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 767px) {
  .access-header { padding: 12px 20px; gap: 12px; }
  .access-brand { gap: 10px; }
  .access-brand img { width: 44px; }
  .access-brand > span { font-size: 32px; }
  .access-brand small { font-size: 8px; }
  .access-back { min-width: 0; font-size: 12px; text-align: right; }
}
/* Mantém todos os campos no notebook sem cortar conteúdo ou criar scroll no card. */
@media (min-width: 640px) and (max-height: 800px) {
  .access-header { padding-block: 6px; }
  .access-brand img { width: 48px; }
  .access-brand > span { font-size: 36px; }
  .access-main { padding-block: 4px 8px; }
  .access-content { padding: 14px 28px; }
  .access-switch { margin-bottom: 12px; }
  .access-switch a { min-height: 48px; }
  .access-register-title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .access-register-grid { gap: 10px 12px; }
  .access-register-grid .access-field { gap: 4px; }
  .access-register-grid label { line-height: 20px; }
  .access-register-grid input, .access-register-grid select { height: 48px; }
  .access-register-grid .access-reveal { top: 2px; }
  #panel-register .access-submit { min-height: 48px; margin-top: 12px; }
  #panel-register .access-switch-note { margin-top: 4px; font-size: 14px; }
  .access-footer { padding-bottom: 0; }
}
@media (min-width: 640px) and (max-height: 700px) {
  .access-header { padding-block: 4px; }
  .access-brand img { width: 44px; }
  .access-brand > span { font-size: 34px; }
  .access-main { padding-block: 4px 8px; }
  .access-content { padding-block: 12px; }
  #register-password-hint { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .access-register-grid { gap: 8px 12px; }
  #panel-register .access-submit { margin-top: 12px; }
}
/* Celular e tablet: card contido e próximo à marca, sem rolagem interna. */
@media (max-width: 1024px) {
  .access-header { max-width: 720px; padding: 18px 24px; }
  .access-main { flex: 1 0 auto; align-content: center; justify-items: center; padding: 24px 24px 20px; }
  .access-card { width: 100%; max-width: 560px; border: 1px solid var(--access-border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.22); }
  .access-content { padding: 24px; }
  .access-switch { margin-bottom: 20px; }
  .access-switch a { min-height: 48px; font-size: 16px; }
  .access-register-title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .access-register-grid { gap: 16px; }
  .access-register-grid .access-field { gap: 6px; }
  .access-field label { font-size: 14px; line-height: 1.5; }
  .access-field input, .access-field select { height: 50px; font-size: 16px; }
  .access-reveal { top: 3px; }
  .access-register-grid .access-reveal { top: 3px; }
  .access-switch-note { margin-top: 16px; font-size: 14px; }
  #panel-register .access-submit { margin-top: 20px; min-height: 50px; }
  #panel-register .access-switch-note { margin-top: 12px; font-size: 14px; }
  .access-footer { padding: 0 20px max(12px, env(safe-area-inset-bottom)); font-size: 12px; }
}
@media (max-width: 639px) {
  body::before { background-image: url('../images/acesso-arena-v2-960.webp'); background-position: 58% center; }
  body::after { background: rgba(22,17,13,.72); }
  .access-header { padding: max(14px, env(safe-area-inset-top)) 16px 12px; gap: 12px; }
  .access-brand { gap: 9px; min-width: 0; }
  .access-brand img { width: 44px; }
  .access-brand > span { font-size: 32px; white-space: nowrap; }
  .access-brand small { font-size: 7px; letter-spacing: .1em; }
  .access-back { font-size: 11px; min-height: 44px; white-space: nowrap; }
  .access-main { padding: 24px 16px; }
  .access-card { max-width: 440px; background: #211911; border-color: rgba(217,178,124,.2); box-shadow: 0 12px 28px rgba(0,0,0,.2); }
  .access-content { padding: 24px 20px; }
  .access-field input, .access-field select { height: 52px; }
  .access-reveal, .access-register-grid .access-reveal { top: 4px; }
  .access-footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); color: #e0d2bf; }
  .access-field + .access-field, .access-columns, .access-columns + .access-field { margin-top: 16px; }
  .access-label-row { gap: 0 8px; }
  .access-text-button { font-size: 12px; min-height: 40px; }
  .access-submit { min-height: 50px; font-size: 15px; }
  .access-register-grid .access-columns { grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; }
  .access-switch-note { gap: 0 5px; font-size: 13px; }
  .access-hint { font-size: 12px; }
}
@media (max-width: 479px) {
  .access-register-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .access-register-grid .access-password input { padding-right: 86px; }
  .access-register-grid .access-reveal { min-width: 74px; font-size: 13px; }
}
@media (max-width: 359px) {
  .access-header { gap: 8px; }
  .access-brand > span { font-size: 27px; }
  .access-brand small { font-size: 6.5px; }
  .access-back { font-size: 10px; }
  .access-main { padding-inline: 12px; }
  .access-content { padding: 18px 16px; }
}
/* Cadastro compacto; mantém a geometria e a centralização aprovadas de Entrar. */
@media (max-width: 1024px) {
  .access-main { align-content: center; }
  .access-card[data-mode="register"] .access-content { padding: 20px 24px; }
  .access-card[data-mode="register"] .access-switch { margin-bottom: 18px; }
  #panel-register .access-register-grid { gap: 12px 16px; }
  #panel-register .access-field { gap: 5px; }
  #panel-register .access-field label { font-size: 14px; line-height: 20px; }
  #panel-register .access-field input, #panel-register .access-field select { height: 48px; padding-inline: 12px; font-size: 16px; }
  #panel-register .access-password input { padding-right: 84px; }
  #panel-register .access-reveal { top: 2px; right: 2px; min-width: 72px; min-height: 44px; font-size: 13px; }
  #panel-register .access-hint { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 12px; line-height: 1.5; }
  #panel-register .access-submit { margin-top: 18px; min-height: 48px; font-size: 15px; }
  #panel-register .access-switch-note { margin-top: 8px; font-size: 13px; }
  #panel-register .access-switch-note a { min-height: 44px; }
}
@media (max-width: 639px) {
  .access-card[data-mode="register"] .access-content { padding: 20px; }
  #panel-register .access-register-grid { gap: 10px 12px; }
}
@media (max-width: 359px) {
  .access-card[data-mode="register"] .access-content { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .access-back, .access-switch a, .access-submit, .access-reveal, .access-field input, .access-field select { transition: none; }
}

/* Notebook: altura medida do login, sem etapas ou rolagem dentro do cadastro. */
@media (min-width: 1025px) and (max-width: 1600px) {
  .access-card[data-mode="register"] { min-height: var(--notebook-login-height, auto); }
  #panel-register .access-register-title { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #panel-register .access-register-grid { gap: 8px 12px; }
  #panel-register .access-field { gap: 4px; }
  #panel-register .access-field label { font-size: 13px; line-height: 18px; }
  #panel-register .access-field input, #panel-register .access-field select { height: 44px; font-size: 15px; }
  #panel-register .access-reveal { top: 0; min-height: 44px; }
  #panel-register .access-hint { font-size: 12px; line-height: 16px; }
  #panel-register .access-submit { min-height: 48px; margin-top: 16px; }
  #panel-register .access-switch-note { margin-top: 8px; font-size: 14px; }
  #panel-register .access-switch-note a { min-height: 44px; }
}

/* Mantém o topo de Entrar como referência em celulares, tablets e computadores. */
.access-main:has(.access-card[data-mode="register"]) {
  align-content: start;
  padding-top: var(--notebook-login-offset, 12px);
}

/* Marca e retorno legíveis no tablet e notebook, sem alterar os formulários. */
@media (min-width: 640px) and (max-width: 1600px) {
  .access-header { padding-block: 12px; gap: 24px; }
  .access-brand { gap: 14px; }
  .access-brand img { width: 60px; flex-shrink: 0; }
  .access-brand > span { font-size: 42px; white-space: nowrap; }
  .access-brand small { margin-top: 8px; font-size: 9px; letter-spacing: .14em; }
  .access-back { flex-shrink: 0; min-height: 48px; padding: 0 16px; border: 1px solid rgba(217,178,124,.28); border-radius: 5px; background: #291f16; color: var(--access-ink); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color var(--access-transition), border-color var(--access-transition); }
  .access-back:hover { background: #35281c; border-color: rgba(217,178,124,.48); color: var(--access-ink); }
}
@media (min-width: 640px) and (max-width: 1024px) {
  .access-header { padding-inline: 24px; }
  .access-brand img { width: 52px; }
  .access-brand > span { font-size: 38px; }
  .access-back { padding-inline: 14px; }
}
@media (min-width: 640px) and (max-width: 1600px) and (prefers-reduced-motion: reduce) {
  .access-back { transition: none; }
}

.access-demo-entry { margin: 4px 0 0; text-align: center; font-size: 11px; color: var(--access-muted); }
.access-demo-entry a { display: inline-flex; align-items: center; min-height: 44px; }

.access-demo-label { margin: 0 0 12px; padding: 8px 10px; border: 1px solid rgba(217,178,124,.18); border-radius: 4px; background: #2b2117; color: #d3bea1; font-size: 10px; line-height: 1.5; }

/* E-mail do cadastro e recuperação: campos completos, sem limitar a altura do formulário. */
.access-register-grid > .access-field:has(#register-email) { grid-column: 1 / -1; }
#panel-recover .access-field { min-width: 0; }
#panel-recover .access-description, #panel-recover .access-message { overflow-wrap: anywhere; }
#panel-recover input { font-size: 16px; }
#recover-code { letter-spacing: .16em; font-variant-numeric: tabular-nums; }
#panel-recover [data-recovery-restart] { margin-top: 16px; }
