/* Login e estados de conta do modo --auth. Sem cor nova: usa os tokens do shell/Prism. */
.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg);
}

.auth-card {
  display: flex;
  width: min(100%, 404px);
  flex-direction: column;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-popover);
}

.auth-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-brand:hover { color: var(--text-secondary); }
.auth-brand .sub-symbol { width: 28px; height: 35px; }
.auth-kicker,
.os-kicker {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 16px;
  text-transform: uppercase;
}

.auth-title {
  color: var(--text-strong);
  font-family: var(--font-sub-title);
  font-size: 36px;
  font-weight: 400;
  line-height: 42px;
}

.auth-lead {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
/* Borda ≥3:1 contra o fundo do campo após o alfa: claro 3,32:1 (#8a8a8a sobre #fafafa),
   escuro 3,20:1 (#646464 sobre #101010). O foco continua trocando a cor e o outline. */
.auth-page, .os-conta { --auth-field-border: rgba(16, 16, 16, 0.48); }
:root[data-theme="dark"] .auth-page,
:root[data-theme="dark"] .os-conta { --auth-field-border: rgba(255, 255, 255, 0.35); }
.auth-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--auth-field-border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text-strong);
}
.auth-field input::placeholder { color: var(--text-tertiary); }
.auth-field input:focus { border-color: var(--text-strong); }

.auth-submit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--sub-action-bg);
  color: var(--sub-action-ink);
  font-size: 14px;
  font-weight: 600;
}
.auth-submit:hover { filter: brightness(0.97); }
.auth-submit:disabled { cursor: progress; opacity: 0.62; }
.auth-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
}

.auth-error {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 20px;
}
:root[data-theme="dark"] .auth-error { background: #450a0a; color: #fecaca; }

.auth-form[aria-busy="true"] { cursor: progress; }

/* 2 fatores: QR legível nos dois temas e segredo para digitar à mão. */
.auth-card-wide { width: min(100%, 470px); }
.auth-qr {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #fff;
}
.auth-qr svg { display: block; width: 100%; max-width: 231px; height: auto; shape-rendering: crispEdges; }
.auth-qr p { color: #52525b; }
.auth-secret { color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.auth-secret code {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--text-strong);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 13px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

/* Conta: troca de senha e saída dentro do shell. */
.os-conta {
  max-width: 560px;
  margin: clamp(28px, 6vh, 72px) auto;
  padding: 0 8px 48px;
}
.conta-title {
  margin: 6px 0 10px;
  color: var(--text-strong);
  font-family: var(--font-sub-title);
  font-size: 40px;
  font-weight: 400;
  line-height: 46px;
}
.conta-lead { color: var(--text-secondary); line-height: 24px; }
.conta-lead strong { color: var(--text-strong); font-weight: 600; }
.conta-block {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.conta-subtitle {
  margin-bottom: 6px;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.conta-hint { color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.conta-form { margin-top: 12px; }
.conta-ok {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: #ecfdf5;
  color: #065f46;
  font-size: 13px;
  line-height: 20px;
}
:root[data-theme="dark"] .conta-ok { background: #052e16; color: #bbf7d0; }
.conta-block .auth-secondary { margin-top: 12px; }

/* Rota digitada à mão para uma área que o papel não vê. */
.os-access-denied {
  max-width: 560px;
  margin: clamp(28px, 9vh, 104px) auto;
  padding: 0 8px;
}
.os-access-denied h1 {
  margin: 6px 0 10px;
  color: var(--text-strong);
  font-family: var(--font-sub-title);
  font-size: 40px;
  font-weight: 400;
  line-height: 46px;
}
.os-access-denied p { color: var(--text-secondary); line-height: 24px; }
.os-access-denied p + p { margin-top: 16px; }
.os-access-denied a { color: var(--text-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.rail-account .rail-copy { overflow: hidden; }
.rail-account .rail-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A barra inferior acompanha os produtos visíveis para o papel. */
@media (max-width: 767px) {
  .os[data-auth="true"][data-tabs="1"] .os-bottombar { grid-template-columns: minmax(0, 1fr); }
  .os[data-auth="true"][data-tabs="2"] .os-bottombar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os[data-auth="true"][data-tabs="3"] .os-bottombar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
