@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,300..800&display=swap");

:root {
  --green-primary: #2e7d32;
  --green-dark: #1b5e20;
  --green-deep: #123c2a;
  --green-accent: #1cc053;
  --green-soft: #eaf5eb;
  --green-muted: #9db97e;

  --background: #f7f7f7;
  --card: #ffffff;
  --text: #263238;
  --text-soft: #5f6f64;
  --border: rgba(46, 125, 50, 0.16);

  --shadow: 0 24px 70px rgba(18, 60, 42, 0.16);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Google Sans Flex", sans-serif;
  background: var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* =====================================================
   ESTRUTURA PRINCIPAL
===================================================== */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 52% 48%;
}

/* =====================================================
   PAINEL DE IDENTIDADE
===================================================== */

/* =====================================================
   PAINEL ESQUERDO
===================================================== */

.brand-panel {
  position: relative;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 60px;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 20% 15%,
      rgba(255, 255, 255, 0.08),
      transparent 25%
    ),
    linear-gradient(145deg, #2e7d32 0%, #1f722c 50%, #145421 100%);

  color: white;
}

/* Conteúdo principal */

.brand-content {
  position: relative;
  z-index: 5;

  width: 100%;
  max-width: 620px;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;
}

/* =====================================================
   LOGO
===================================================== */

.library-logo img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 50%;
  outline: 2px solid rgba(16, 230, 105, 0.25);
  outline-offset: 8px;
  background: white;
  margin-bottom: 18px;
}

/* =====================================================
   TÍTULO
===================================================== */

.brand-content h1 {
  max-width: 600px;

  color: #ffffff;

  font-size: 42px;
  font-weight: 650;

  line-height: 1.2;

  letter-spacing: -1px;
}

.brand-content h1 strong {
  display: block;

  margin-top: 5px;

  font-weight: 700;
}

/* =====================================================
   LINHA DECORATIVA
===================================================== */

.brand-divider {
  width: 50px;
  height: 3px;

  margin: 34px 0;

  border-radius: 10px;

  background: #9ac44a;
}

/* =====================================================
   DESCRIÇÃO
===================================================== */

.brand-description {
  color: rgba(255, 255, 255, 0.9);

  font-size: 24px;

  line-height: 1.45;

  margin-bottom: 50px;
}

/* =====================================================
   BOTÃO / BADGE
===================================================== */

.brand-badge {
  width: 100%;
  max-width: 425px;

  min-height: 80px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 18px;

  padding: 20px 32px;

  border-radius: 30px;

  background: linear-gradient(
    135deg,
    var(--theme-accent, var(--green-muted)),
    var(--theme-accent-strong, var(--green-dark))
  );

  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);

  color: var(--theme-on-accent, #ffffff);

  font-size: 23px;
  font-weight: 700;
}

.brand-badge i {
  font-size: 27px;

  color: var(--theme-on-accent, #ffffff);
  opacity: 0.88;
}

/* =====================================================
   ELEMENTOS DECORATIVOS
===================================================== */

.decor {
  position: absolute;

  color: rgba(255, 255, 255, 0.055);

  pointer-events: none;
}

.decor-1 {
  top: 8%;
  left: 7%;
  font-size: 120px;
  transform: rotate(-9deg);
}

.decor-2 {
  top: 13%;
  right: 20%;
  font-size: 105px;
  transform: rotate(30deg);
  color: rgba(255, 255, 255, 0.065);
}

.decor-3 {
  top: 38%;
  left: 15%;
  font-size: 72px;
  transform: rotate(-40deg);
}

.decor-4 {
  top: 45%;
  right: 5%;
  font-size: 96px;
  transform: rotate(13deg);
  color: rgba(255, 255, 255, 0.075);
}

.decor-5 {
  bottom: 24%;
  left: 5%;
  font-size: 64px;
  transform: rotate(-60deg);
  color: rgba(255, 255, 255, 0.045);
}

.decor-6 {
  bottom: 8%;
  right: 10%;
  font-size: 54px;
  transform: rotate(8deg);
}

.decor-7 {
  bottom: 7%;
  left: 14%;
  font-size: 69px;
  transform: rotate(-20deg);
  color: rgba(255, 255, 255, 0.05);
}

.decor-8 {
  top: 69%;
  right: 3%;
  font-size: 61px;
  transform: rotate(32deg);
}
/* =====================================================
   ÁREA DO FORMULÁRIO
===================================================== */

.form-panel {
  min-height: 100vh;
  padding: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(
      circle at top right,
      rgba(46, 125, 50, 0.08),
      transparent 35%
    ),
    #f6f9f6;
}


/* =====================================================
   RETORNO À PÁGINA INICIAL
===================================================== */

.form-panel {
  position: relative;
}

.back-home {
  position: absolute;
  top: 30px;
  left: 36px;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: #557064;
  background: transparent;

  border: 0;
  padding: 0;

  font-size: 13px;
  font-weight: 600;

  opacity: 0.85;

  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.back-home i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.back-home:hover {
  color: var(--green-primary);
  opacity: 1;
}

.back-home:hover i {
  transform: translateX(-2px);
}

.back-home:focus-visible {
  outline: 2px solid rgba(46, 125, 50, 0.25);
  outline-offset: 5px;
  border-radius: 3px;
}

.login-card {
  width: 100%;
  max-width: 520px;

  padding: 48px;

  background: rgba(255, 255, 255, 0.92);

  border: 1px solid rgba(46, 125, 50, 0.1);
  border-radius: 28px;

  box-shadow:
    0 24px 60px rgba(18, 60, 42, 0.08),
    0 4px 18px rgba(18, 60, 42, 0.05);

  backdrop-filter: blur(12px);
}

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

.login-kicker {
  display: inline-block;

  margin-bottom: 12px;

  color: var(--green-primary);

  font-size: 12px;
  font-weight: 750;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-header h2 {
  color: #17231c;

  font-size: 36px;
  font-weight: 750;

  line-height: 1.15;

  letter-spacing: -0.04em;
}

.login-header p {
  max-width: 390px;

  margin-top: 10px;

  color: #708078;

  font-size: 15px;

  line-height: 1.55;
}

/* =====================================================
   FORMULÁRIO
===================================================== */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 23px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.form-group label,
.label-row label {
  color: #34463b;
  font-size: 14px;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.forgot-link {
  color: var(--green-primary);
  font-size: 13px;
  font-weight: 700;
}

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

.input-wrapper {
  position: relative;

  height: 58px;

  display: flex;
  align-items: center;

  background: #f7faf7;
  border: 1px solid rgba(46, 125, 50, 0.14);
  border-radius: 15px;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.input-wrapper:focus-within {
  background: #ffffff;
  border-color: rgba(46, 125, 50, 0.56);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.09);
}

.input-wrapper > i {
  width: 54px;
  flex-shrink: 0;

  text-align: center;

  color: #839189;
  font-size: 17px;
}

.input-wrapper input {
  width: 100%;
  height: 100%;
  min-width: 0;

  padding: 0 16px 0 0;

  background: transparent;
  border: none;
  outline: none;

  color: var(--text);
  font-size: 15px;
}

.input-wrapper input::placeholder {
  color: #99a49d;
}

.password-toggle {
  width: 54px;
  height: 100%;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;

  color: #718078;
  font-size: 17px;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--green-primary);
}

.remember-option {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
}

.remember-option input {
  width: 16px;
  height: 16px;
  margin-left: 5px;
  accent-color: var(--green-primary);
  cursor: pointer;
}

.submit-button {
  height: 58px;
  margin-top: 2px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  background: var(--green-primary);
  border: none;
  border-radius: 15px;

  color: #ffffff;
  font-size: 16px;
  font-weight: 750;

  box-shadow: 0 12px 28px rgba(46, 125, 50, 0.22);

  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.submit-button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(46, 125, 50, 0.28);
}

.submit-button i {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.submit-button:hover i {
  transform: translateX(3px);
}

.login-footer {
  margin-top: 32px;
  padding-top: 24px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;

  border-top: 1px solid rgba(46, 125, 50, 0.1);

  color: #758279;
  font-size: 13px;
}

.login-footer i {
  color: var(--green-primary);
}

.copyright {
  position: absolute;
  bottom: 22px;

  color: #8a968e;
  font-size: 12px;
  text-align: center;
}

.register-prompt {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-soft);
}

.register-prompt a {
  color: var(--green-primary);
  font-weight: 700;
  transition: color 0.25s ease;
}

.register-prompt a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* =====================================================
   RESPONSIVIDADE
===================================================== */

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

  .brand-panel {
    padding-left: 6%;
    padding-right: 6%;
  }

  .brand-content h1 {
    font-size: 46px;
  }

  .login-card {
    padding: 45px 38px 34px;
  }
}

@media (max-width: 820px) {
  body {
    background: var(--green-primary);
  }

  .login-page {
    min-height: 100vh;
    display: block;
    padding: 34px 22px;

    background:
      radial-gradient(
        circle at 12% 9%,
        rgba(255, 255, 255, 0.1),
        transparent 21%
      ),
      linear-gradient(155deg, #2e7d32 0%, #1d6f2b 55%, #123c2a 100%);
  }

  .brand-panel {
    min-height: auto;
    padding: 16px 0 38px;

    display: block;

    background: transparent;
  }

  .brand-panel::before,
  .brand-panel::after,
  .decorative-books,
  .back-link {
    display: none;
  }

  .brand-content {
    max-width: 540px;
    text-align: center;
  }

  .brand-mark {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 20px;
  }

  .brand-mark i {
    font-size: 28px;
  }

  .brand-eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .brand-content h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .brand-content h1 strong {
    margin-top: 4px;
  }

  .brand-content p {
    display: none;
  }

  .brand-badge {
    margin-top: 22px;
    padding: 11px 18px;
    font-size: 13px;
  }

  .form-panel {
    min-height: auto;
    padding: 0;

    display: block;

    background: transparent;
  }

  .login-card {
    max-width: 540px;
    margin: 0 auto;
    padding: 42px 34px 32px;

    border-radius: 25px;

    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
  }

  .login-kicker {
    font-size: 12px;
  }

  .login-header h2 {
    font-size: 34px;
  }

  .copyright {
    position: static;
    margin: 22px auto 0;

    color: rgba(255, 255, 255, 0.64);
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 28px 16px;
  }

  .brand-panel {
    padding-bottom: 30px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
  }

  .brand-content h1 {
    font-size: 25px;
  }

  .brand-badge {
    margin-top: 18px;
  }

  .login-card {
    padding: 36px 22px 28px;
    border-radius: 22px;
  }

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

  .login-header h2 {
    font-size: 30px;
  }

  .login-header p {
    font-size: 15px;
  }

  .label-row {
    align-items: flex-end;
  }

  .forgot-link {
    font-size: 12px;
  }

  .input-wrapper,
  .submit-button {
    height: 55px;
  }

  .input-wrapper > i {
    width: 48px;
  }

  .password-toggle {
    width: 48px;
  }

  .login-footer {
    font-size: 12px;
  }
}




/* Retorno discreto no layout empilhado/mobile */
@media (max-width: 900px) {
  .form-panel .back-home {
    position: static;
    width: fit-content;
    margin: 0 0 14px 2px;
    padding: 0;

    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    border: 0;

    font-size: 13px;
    font-weight: 600;
    opacity: 1;
  }

  .form-panel .back-home:hover {
    color: #ffffff;
  }

  .form-panel .back-home:focus-visible {
    outline-color: rgba(255, 255, 255, 0.55);
  }
}
