/* Tela de entrada: apresentação do sistema à esquerda (sempre escura) e o
   acesso à direita (segue o tema claro/escuro). */

.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Apresentação ---------- */
.auth-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 48px 40px 32px;
  color: #dfe6f5;
  /* Azul-tinta com leve brilho e uma malha discreta, como papel quadriculado. */
  background:
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(ellipse at 80% 85%, rgb(80 120 220 / 28%), transparent 55%),
    radial-gradient(ellipse at 10% 5%, rgb(40 70 150 / 45%), transparent 50%),
    linear-gradient(160deg, #0f1733 0%, #142452 55%, #10204a 100%);
}
.showcase-card {
  width: min(440px, 100%);
  padding: 36px 34px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 20px;
  background: rgb(255 255 255 / 5%);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 60%);
  backdrop-filter: blur(6px);
}
.auth-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.02em;
}
/* Marca do programa (TechDocs) num cartão branco: o logo é azul e sumiria
   sobre o fundo azul-escuro. */
.showcase-logo {
  display: grid;
  place-items: center;
  padding: 22px 24px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / 70%);
}
.showcase-logo img {
  width: min(240px, 100%);
  height: auto;
}
/* No celular o lado esquerdo some; a marca do programa vai para o topo. */
.auth-program-logo {
  display: none;
}
.auth-mark img {
  width: 100%;
  height: 100%;
  padding: 6%;
  object-fit: contain;
  background: #ffffff;
}
.auth-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.showcase-rule {
  display: block;
  width: 44px;
  height: 3px;
  margin: 26px 0 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, #8fb0ff, transparent);
}
.showcase-text {
  color: rgb(223 230 245 / 82%);
  font-size: 15px;
  line-height: 1.7;
}
.showcase-features {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.showcase-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 12px;
  background: rgb(8 14 32 / 35%);
  font-size: 14px;
  line-height: 1.45;
}
.feature-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgb(143 176 255 / 16%);
  color: #b9ccff;
}
.feature-icon svg {
  width: 18px;
  height: 18px;
}
.showcase-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: rgb(223 230 245 / 60%);
  font-size: 12px;
  text-align: center;
}
.auth-showcase .developer-credit {
  color: rgb(223 230 245 / 75%);
}
.auth-showcase .developer-credit strong {
  color: #ffffff;
}

/* ---------- Acesso ---------- */
.auth-access {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 24px;
  background:
    radial-gradient(ellipse at 90% 0%, var(--brand-soft), transparent 60%),
    var(--paper);
}
.auth-panel {
  width: min(430px, 100%);
  padding: 38px 36px 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 50px -32px rgb(16 22 38 / 35%);
  text-align: center;
}
.auth-mark {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 17px;
}
.auth-mark:has(img) {
  border: 1px solid var(--line);
  background: #ffffff;
}
.auth-eyebrow {
  margin-top: 22px;
  color: var(--brand);
}
.auth-panel h1 {
  margin: 8px 0 8px;
  font-size: 26px;
}
.auth-lead {
  margin-bottom: 26px;
  color: var(--muted);
}
.auth-form {
  display: grid;
  gap: 16px;
  text-align: left;
}
.input-with-icon {
  position: relative;
}
.input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.field .input-with-icon input {
  min-height: 46px;
  padding-left: 42px;
  border-radius: 10px;
}
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.auth-options .inline-check {
  font-size: 13px;
}
.auth-options .link-button {
  margin-top: 0;
}
.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border-radius: 10px;
  font-size: 15px;
}
.auth-status {
  min-height: 20px;
  margin-top: 16px !important;
  color: var(--muted);
  font-size: 13px;
}
.auth-status:empty {
  display: none;
}
.auth-status.error {
  color: var(--overdue);
}
#bootstrap-admin-button,
#restore-backup-button {
  width: 100%;
  margin-top: 12px;
}
.auth-footnote {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.auth-privacy {
  color: var(--brand);
  font-weight: 550;
  text-decoration: none;
}
.auth-privacy:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* No celular, fica só o acesso, com o crédito no rodapé. */
@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-showcase {
    display: none;
  }
  .auth-program-logo {
    display: block;
    box-sizing: content-box;
    width: 132px;
    height: auto;
    padding: 10px 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-card, 0 1px 3px rgb(0 0 0 / 10%));
  }
}
@media (max-width: 720px) {
  .auth-access {
    justify-content: flex-start;
    padding: calc(28px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  }
  .auth-form input {
    font-size: 16px;
  }
  .auth-panel {
    padding: 30px 22px 26px;
  }
}

/* Escolha do ambiente: uma linha pequena no fim do cartão de entrada. */
.environment-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}
.environment-picker[hidden] {
  display: none;
}
/* Seta própria, colada ao nome (a nativa reserva a largura da opção mais longa). */
.environment-picker select {
  appearance: none;
  padding: 2px 18px 2px 4px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent no-repeat right 4px center / 9px 6px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%238a93a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: var(--muted);
  cursor: pointer;
  field-sizing: content;
  font: inherit;
  font-weight: 600;
}
.environment-picker select:hover {
  background-color: var(--surface-2);
  color: var(--ink);
}
.environment-picker select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
