/* ===========================================================
   ADVIZE · Tela de acesso
   Superfície clara do design system dentro de app.html.

   Tudo escopado em .ds-auth de propósito: as regras de
   .auth-form em styles.css são compartilhadas com .adm-form e
   .modal-card (formulários internos, de tema escuro). Sem o
   escopo, redesenhar o login repintaria a administração junto.
   =========================================================== */

.ds-auth{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  /* Substitui o radial escuro de styles.css. */
  background:
    radial-gradient(circle at 86% -4%, rgba(57, 197, 243, .12), transparent 40%),
    radial-gradient(circle at -4% 96%, rgba(21, 23, 67, .06), transparent 42%),
    var(--background);
  color: var(--foreground);
  font-family: var(--font-ui);
}

.ds-auth-grid{
  width: min(64rem, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

/* ===================== lado esquerdo ===================== */
.ds-auth-aside{ display: grid; gap: 1.25rem; justify-items: start; }
.ds-auth-aside h1{
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.02em;
  color: var(--foreground);
  max-width: 18ch;
  margin: 0;
}
.ds-auth-aside .ds-lead{ color: var(--muted); max-width: 46ch; }

.ds-auth-back{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  transition: color .2s var(--ease);
}
.ds-auth-back:hover{ color: var(--foreground); }
.ds-auth-back .ds-icon{ width: 1rem; height: 1rem; }

.ds-auth-points{
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}
.ds-auth-points li{
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .9375rem;
  color: var(--muted);
}
.ds-auth-points .ds-icon{
  width: 1.125rem; height: 1.125rem;
  color: var(--brand-accent);
  flex: none;
}

/* ===================== card ===================== */
.ds-auth-card{
  width: 100%;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  border-radius: var(--r-xl);
}
.ds-auth-card-logo{ display: none; }        /* só aparece no mobile */

/* --- os seletores abaixo sobrepõem styles.css apenas aqui --- */
.ds-auth .auth-form h2{
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  letter-spacing: -.01em;
}
.ds-auth .ds-auth-sub{
  margin: .375rem 0 0;
  font-size: .875rem;
  color: var(--muted);
}
.ds-auth .auth-form h2 + .ds-auth-sub + label{ margin-top: 1.5rem; }
.ds-auth .auth-form h2 + label{ margin-top: 1.5rem; }

.ds-auth .auth-form label{
  display: block;
  margin-bottom: 1rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--foreground);
}
.ds-auth .auth-form input{
  display: block;
  width: 100%;
  margin-top: .375rem;
  min-height: 2.875rem;
  padding: .75rem .9375rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--foreground);
  font: 400 .9375rem/1.4 var(--font-ui);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.ds-auth .auth-form input::placeholder{ color: var(--muted-soft); }
.ds-auth .auth-form input:focus{
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(57, 197, 243, .2);
}

.ds-auth .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: .75rem 1.5rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--brand-primary);
  color: var(--on-brand);
  font: 500 .9375rem/1 var(--font-ui);
  cursor: pointer;
  transition: background .2s var(--ease), box-shadow .2s var(--ease),
              transform .12s var(--ease);
}
.ds-auth .btn:hover{ background: var(--brand-primary-2); box-shadow: var(--shadow-md); }
.ds-auth .btn:active{ transform: scale(.98); }
.ds-auth .btn:focus-visible{ outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.ds-auth .btn-block{ width: 100%; margin-top: .25rem; }
.ds-auth .btn[disabled]{ opacity: .55; cursor: not-allowed; transform: none; }

.ds-auth .auth-err{
  min-height: 0;
  margin-bottom: .75rem;
  font-size: .8125rem;
  color: var(--danger);
}
.ds-auth .auth-err:empty{ margin-bottom: 0; }

.ds-auth-help{
  margin: 1.125rem 0 0;
  font-size: .8125rem;
  color: var(--muted);
  text-align: center;
}

.ds-auth .auth-foot{
  margin-top: 1.25rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--warning);
  text-align: center;
}

.ds-auth :focus-visible{
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===================== responsivo ===================== */
@media (max-width: 880px){
  .ds-auth-grid{ grid-template-columns: 1fr; max-width: 26rem; }
  /* No mobile some o painel de marca e o card vai ao centro, com o
     logo dentro dele — a identidade não se perde. */
  .ds-auth-aside{ display: none; }
  .ds-auth-card-logo{
    display: block;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  .ds-auth-card-logo img{ height: 2rem; width: auto; display: inline-block; }
}
