:root {
  /* Tokens compartilhados (cores, tipografia, espaçamento, raio, sombra, movimento) ficam em tokens.css. */
  /* Aliases usados só pelo login: */
  --surface: var(--card);
  --surface-elevated: var(--muted-surface);
  --text-primary: var(--foreground);
  --text-secondary: var(--muted-foreground);
  --text-muted: #94a3b8;
  --navy-light: #1c3153;
  --muted-on-dark: #aab4c9;
  --login-backdrop: var(--brand-surface); /* fundo atrás do cartão de login */
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--login-backdrop);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--login-backdrop);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.login-shell {
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(12px, 4vh, 48px) clamp(20px, 8vw, 321px);
  place-items: center;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 590px) minmax(0, 633px);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(14px, 1.25vw, 20px);
  width: min(1277px, 100%);
  height: min(912px, 100%);
  max-height: 100%;
  padding: 20px 18px 20px 19px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--input);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.brand {
  display: inline-flex;
  align-self: flex-start;
  margin: 17px 0 0 37px;
}

.brand img {
  display: block;
  width: 125px;
  height: 34px;
  object-fit: contain;
}

.form-content {
  width: min(392px, calc(100% - 48px));
  margin: auto;
  padding: clamp(24px, 4.2vh, 42px) 0 clamp(28px, 5.2vh, 54px);
}

.heading {
  margin-bottom: clamp(20px, 3.1vh, 31px);
  text-align: center;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: var(--radius-2xs);
  background: var(--primary);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: clamp(8px, 1.2vh, 12px);
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.intro {
  max-width: 360px;
  margin: 0 auto;
  color: var(--muted-foreground);
  font-size: var(--font-size-base);
  line-height: 1.45;
}

.field {
  margin-bottom: clamp(12px, 1.9vh, 19px);
}

label,
.label-row {
  color: var(--foreground);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field > label {
  display: block;
  margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  display: block;
  width: 100%;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--foreground);
  background: var(--card);
  font-size: var(--font-size-base);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 25px;
  height: 25px;
  padding: 3px;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius-xs);
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.password-toggle:hover {
  color: var(--foreground);
  background: var(--hover-gray);
}

.password-toggle svg,
.btn svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field-error {
  display: block;
  min-height: 15px;
  margin-top: 5px;
  color: var(--error);
  font-size: var(--font-size-xs);
}

.text-link {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: -3px 0 clamp(15px, 2.3vh, 23px);
  color: var(--muted-foreground);
  font-size: var(--font-size-sm);
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
}

.checkmark {
  display: inline-grid;
  width: 15px;
  height: 15px;
  border: 1px solid var(--input);
  border-radius: var(--radius-2xs);
  place-items: center;
}

.checkbox-label input:checked + .checkmark {
  border-color: var(--foreground);
  background: var(--foreground);
}

.checkbox-label input:checked + .checkmark::after {
  width: 4px;
  height: 7px;
  border: solid var(--primary-foreground);
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Botões do login: base em components.css; aqui só o que é da página
   (um degrau maior de fonte e cursor de espera durante o envio). */
.btn {
  font-size: var(--font-size-base);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--foreground);
  font-size: var(--font-size-sm);
  text-align: center;
}

.form-status.error {
  color: var(--error);
}

.signup {
  margin: clamp(20px, 3.1vh, 31px) 0 0;
  color: var(--muted-foreground);
  font-size: var(--font-size-sm);
  text-align: center;
}

.visual-panel {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--brand-foreground);
  background: var(--brand-surface); /* mesmo azul escuro da sidebar (igual nos dois temas) */
  isolation: isolate;
}

.visual-copy {
  position: relative;
  z-index: 2;
  width: 72%;
  margin: clamp(30px, 6.1vh, 66px) auto 0;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: var(--brand-foreground);
  font-size: var(--font-size-xs);
  letter-spacing: 0.03em;
}

h2 {
  max-width: 360px;
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(30px, 2.8vw, 44px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.visual-copy p {
  max-width: 290px;
  margin: 0;
  color: var(--muted-on-dark);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.illustration {
  position: absolute;
  z-index: 1;
  right: -8%;
  bottom: clamp(-2%, 1%, 4%);
  width: min(94%, 547px);
  max-width: 547px;
  object-fit: contain;
}

.decor {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.decor-one {
  top: -100px;
  right: -75px;
  width: 330px;
  height: 330px;
}

.decor-two {
  right: 13%;
  bottom: 12%;
  width: 240px;
  height: 240px;
}

@media (max-height: 760px) and (min-width: 601px) {
  .login-shell {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .login-card {
    height: 100%;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    margin-top: 12px;
  }

  .form-content {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .heading {
    margin-bottom: 20px;
  }

  .visual-copy {
    margin-top: 32px;
  }
}

@media (max-height: 850px) and (min-width: 821px) {
  .login-shell {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .login-card {
    height: 100%;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    margin-top: 10px;
  }

  .form-content {
    width: min(392px, calc(100% - 42px));
  }

  .visual-copy {
    width: 76%;
  }

  .illustration {
    right: -4%;
    width: 88%;
  }
}
