:root {
  color-scheme: light;
  --login-blue: #0237ff;
  --login-blue-hover: #0129c2;
  --login-text: #121733;
  --login-muted: #5a6280;
  --login-border: #bdc5d9;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.degas-login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 28px;
  background: #f2f4f9;
  color: var(--login-text);
  font: 15px/1.5 'Atkinson Hyperlegible Next', Inter, Arial, sans-serif;
}
.degas-login-page button,
.degas-login-page input { font: inherit; }
.degas-login-page a { color: var(--login-blue-hover); text-decoration: none; font-weight: 700; }
.degas-login-page a:hover { text-decoration: underline; }
.degas-login-page :is(button, input, a):focus-visible { outline: 3px solid var(--login-blue); outline-offset: 3px; }

.degas-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  width: min(1480px, 100%);
  min-height: min(820px, calc(100dvh - 64px));
  margin: auto;
  overflow: hidden;
  border: 1px solid #dfe4ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(27, 36, 85, .12), 0 4px 15px rgba(27, 36, 85, .04);
}

/* Painel de apresentação (desktop). */
.degas-auth-rail {
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 64px 46px;
  color: white;
  background:
    radial-gradient(ellipse at 85% 12%, #254bf7 0, transparent 46%),
    radial-gradient(ellipse at 10% 102%, #283ba4 0, transparent 46%),
    linear-gradient(148deg, #0c175a 0%, #14247e 49%, #06154b 100%);
}
.degas-auth-rail::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(120deg, #ffffff07 0, #ffffff07 1px, transparent 1px, transparent 45px);
  pointer-events: none;
}
.degas-auth-rail::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -235px;
  bottom: -110px;
  border: 1px solid #ffffff22;
  border-radius: 50%;
  box-shadow: 0 0 0 65px #ffffff05, 0 0 0 135px #ffffff04;
  pointer-events: none;
}
.degas-auth-rail-logo {
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.degas-auth-rail-content { margin: auto 0; padding: 52px 0 34px; }
.degas-auth-tag {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  color: #e3eaff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.degas-auth-rail h2 {
  max-width: 420px;
  margin: 22px 0 14px;
  font: 700 clamp(28px, 3vw, 41px)/1.23 Sora, Arial, sans-serif;
  letter-spacing: -.05em;
}
.degas-auth-rail h2 span { display: block; color: #a5b7ff; }
.degas-auth-rail-content > p {
  max-width: 380px;
  margin: 0;
  color: #d7def6;
  line-height: 1.65;
}
.degas-auth-features {
  display: grid;
  gap: 13px;
  margin: 33px 0 0;
  padding: 0;
  list-style: none;
}
.degas-auth-features li { display: flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 700; }
.degas-feature-check {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #d9e1ff;
  font-size: 17px;
}
.degas-auth-rail-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #c8d1f9;
  font-size: 12px;
}
.degas-auth-dot { width: 7px; height: 7px; flex: none; border-radius: 100%; background: #77e4b8; }

/* Formulário (desktop e celular). */
.degas-login-panel { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 54px 64px; }
.degas-login-content { width: 100%; max-width: 470px; margin: auto; }
.degas-login-logo { display: block; object-fit: contain; margin-bottom: 40px; }
.degas-login-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--login-blue-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.degas-login-eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--login-blue); }
.degas-login-content h1 {
  margin: 0 0 12px;
  font: 700 clamp(26px, 2.6vw, 33px)/1.22 Sora, Arial, sans-serif;
  letter-spacing: -.045em;
}
.degas-login-lead { margin: 0 0 28px; color: var(--login-muted); font-size: 15px; line-height: 1.55; }
.degas-login-field { margin-bottom: 17px; }
.degas-login-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.degas-login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  padding: 0 13px;
  border: 1px solid var(--login-border);
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.degas-login-input:hover { border-color: #7b8cae; }
.degas-login-input:focus-within { border-color: var(--login-blue); box-shadow: 0 0 0 3px #0237ff1a; }
.degas-login-input > svg { width: 18px; height: 18px; flex: none; color: #818cab; }
.degas-login-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: var(--login-text);
  font-size: 14px;
}
.degas-login-input input:focus,
.degas-login-input input:focus-visible { outline: 0; box-shadow: none; }
.degas-login-input input::placeholder { color: #8893ad; opacity: 1; }
.degas-password-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #818cab;
  cursor: pointer;
}
.degas-password-toggle:hover { color: var(--login-blue); background: #edf1ff; }
.degas-password-toggle svg { width: 19px; height: 19px; }
.degas-login-options {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0;
  font-size: 12px;
}
.degas-login-options span { color: var(--login-muted); }
.degas-login-options a { white-space: nowrap; }
.degas-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--login-blue);
  border-radius: 9px;
  background: var(--login-blue);
  box-shadow: 0 5px 11px #0237ff21;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.degas-login-submit:hover { background: var(--login-blue-hover); transform: translateY(-1px); }
.degas-login-submit svg { width: 17px; height: 17px; }
.degas-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #8891a9;
  font-size: 12px;
}
.degas-login-divider::before,
.degas-login-divider::after { content: ''; flex: 1; height: 1px; background: #e1e6f0; }
/* Botão secundário: mesmo tamanho do principal, contorno azul e fundo branco. */
.degas-login-page a.degas-login-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--login-blue);
  border-radius: 9px;
  background: #fff;
  color: var(--login-blue);
  font-size: 14px;
  font-weight: 700;
  transition: background .15s ease, transform .15s ease;
}
.degas-login-page a.degas-login-secondary:hover { background: #edf1ff; transform: translateY(-1px); }
.degas-login-access-help { margin: 24px 0 0; text-align: center; color: var(--login-muted); font-size: 13px; }
.degas-login-footnote { margin: 19px 0 0; text-align: left; color: #8891a9; font-size: 12px; }

/* Mensagens e erros de validação do Django. */
.degas-login-feedback {
  margin: 0 0 15px;
  padding: 12px 14px;
  border: 1px solid #d5ddeb;
  border-radius: 9px;
  background: #f5f7fd;
  color: #293b5a;
  font-size: 13px;
}
.degas-login-feedback-error { border-color: #f3bdc1; background: #fff3f4; color: #9e2832; }
.degas-login-feedback-success { border-color: #b4e0c4; background: #effaf1; color: #19633c; }
.degas-login-page .errorlist { margin: 7px 0 0; padding: 0; list-style: none; font-size: 12px; color: #b12a39; }
.degas-login-feedback .errorlist { margin: 0; font-size: inherit; }

@media (max-width: 1050px) {
  .degas-auth-rail { padding: 40px 35px; }
  .degas-login-panel { padding: 40px 35px; }
  .degas-auth-rail h2 { font-size: 31px; }
}
@media (max-width: 820px) {
  .degas-auth-layout { grid-template-columns: 1fr; max-width: 640px; }
  .degas-auth-rail { display: none; }
  .degas-login-panel { min-height: 680px; }
}
@media (max-width: 600px) {
  body.degas-login-page { display: block; padding: 0; background: #fff; }
  .degas-auth-layout { display: block; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .degas-login-panel { align-items: flex-start; min-height: 100vh; min-height: 100dvh; padding: 44px 24px 35px; }
  .degas-login-logo { margin-bottom: 32px; }
  .degas-login-content h1 { font-size: 27px; }
  .degas-login-lead { font-size: 14px; }
  .degas-login-options { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
