*,
*::before,
*::after {
  box-sizing: border-box;
}

.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: #faf7f1;
  -webkit-font-smoothing: antialiased;
}

.login-split {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
  min-height: 100vh;
}

/* —— Painel do formulário —— */

.login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 72px) clamp(28px, 5vw, 64px);
  background: #fffdf9;
  overflow: hidden;
}

.login-panel__glow {
  display: none;
}

.login-panel__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 40px;
}

.login-brand {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.login-brand:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.login-brand img {
  width: auto;
  height: clamp(96px, 12vw, 128px);
  filter: none;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--berry);
  background: rgba(175, 59, 82, 0.07);
  border: 1px solid rgba(175, 59, 82, 0.14);
}

.login-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 3px rgba(175, 59, 82, 0.18);
}

.login-intro {
  margin-bottom: 32px;
}

.login-title {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: clamp(2rem, 3.4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--brown);
}

.login-lead {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.login-form-wrap {
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(229, 217, 196, 0.85);
  box-shadow:
    0 1px 2px rgba(50, 43, 33, 0.04),
    0 16px 48px rgba(50, 43, 33, 0.06);
  backdrop-filter: blur(12px);
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field > span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brown);
  letter-spacing: 0.01em;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap input {
  width: 100%;
  border: 1px solid #e4e0d8;
  border-radius: 12px;
  padding: 13px 14px 13px 44px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(50, 43, 33, 0.03);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-input-wrap input::placeholder {
  color: #a39a8f;
}

.login-input-wrap input:hover {
  border-color: #d5cfc3;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--green-2);
  background: #fff;
  box-shadow:
    inset 0 1px 2px rgba(50, 43, 33, 0.02),
    0 0 0 4px rgba(0, 61, 36, 0.1);
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9a8f82;
  pointer-events: none;
}

.login-field--password .login-input-wrap input {
  padding-right: 48px;
}

.login-toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8a7f74;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.login-toggle-pw:hover {
  background: rgba(0, 61, 36, 0.06);
  color: var(--green-2);
}

.login-toggle-pw svg {
  width: 18px;
  height: 18px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green-2);
  cursor: pointer;
}

.login-link {
  color: var(--green-2);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-link:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-submit {
  margin-top: 4px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: var(--cream);
  background: linear-gradient(135deg, #005a35 0%, var(--green-2) 48%, #002f1b 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 10px 24px rgba(0, 61, 36, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 14px 32px rgba(0, 61, 36, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.login-submit:active {
  transform: translateY(0);
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-alert__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.login-alert--error {
  background: rgba(175, 59, 82, 0.07);
  border: 1px solid rgba(175, 59, 82, 0.18);
  color: #8f2f44;
}

.login-alert--warn {
  background: rgba(211, 167, 70, 0.12);
  border: 1px solid rgba(211, 167, 70, 0.28);
  color: #6b4f1a;
}

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.55;
}

.login-footer p {
  margin: 0;
}

.login-footer a {
  color: var(--green-2);
  font-weight: 700;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-copy {
  margin: 36px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: #a39a8f;
}

/* —— Painel visual —— */

.login-visual {
  position: relative;
  overflow: hidden;
  background: #0d1f16;
  min-height: 360px;
}

.login-visual__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border: 0;
}

/* —— Responsivo —— */

@media (max-width: 1080px) {
  .login-split {
    grid-template-columns: 1fr;
  }

  .login-visual {
    order: -1;
    min-height: 280px;
  }

  .login-brand img {
    height: clamp(88px, 18vw, 112px);
  }
}

@media (max-width: 520px) {
  .login-panel {
    padding: 32px 20px 48px;
  }

  .login-header {
    margin-bottom: 32px;
  }

  .login-form-wrap {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .login-intro {
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand,
  .login-submit,
  .login-input-wrap input,
  .login-toggle-pw {
    transition: none;
  }
}
