/* ==========================================================================
   Login
   ========================================================================== */

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 40% 60%;
}

html.android-webview .login-shell {
  min-height: calc(100vh - max(24px, env(safe-area-inset-top)));
}

html.android-webview {
  background: #134e4a;
}

html.android-webview body {
  background: transparent;
}

/* ---------------------------------- Painel de marca ---------------------------------- */

.login-brand {
  position: relative;
  overflow: hidden;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px 0;
}

.login-brand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.login-brand-top img {
  display: block;
  height: 200px;
  margin: 0 auto;
}

.login-brand-copy {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 0 0 64px;
}

.login-brand-copy h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.login-brand-copy p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.login-brand-features {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.login-brand-features .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}

.login-brand-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
}

.login-brand-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-brand-stats strong {
  font-size: 20px;
  font-weight: 800;
}

.login-brand-stats span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* Linha d'água (divisor animado, motivo aquário) */
.login-waterline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  z-index: 1;
}

.login-waterline svg {
  width: 100%;
  height: 100%;
}

.wave-back {
  fill: rgba(94, 234, 212, 0.14);
  animation: wave-drift 14s linear infinite;
}

.wave-front {
  fill: rgba(94, 234, 212, 0.22);
  animation: wave-drift 9s linear infinite reverse;
}

@keyframes wave-drift {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.login-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  animation: bubble-rise linear infinite;
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translateY(-620px) translateX(12px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .wave-back,
  .wave-front,
  .bubble {
    animation: none;
  }
}

/* ---------------------------------- Painel de formulário ---------------------------------- */

.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--bg-page);
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warning-bg);
  color: var(--warning-fg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.login-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #fbfaf6;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.login-input-wrap input::placeholder {
  color: var(--text-faint);
}

.login-input-wrap input:focus {
  border-color: var(--accent-green-500);
  background: #fff;
}

.login-toggle-pass {
  position: absolute;
  right: 12px;
  border: none;
  background: transparent;
  padding: 4px;
  display: flex;
  color: var(--text-faint);
}

.login-toggle-pass svg {
  position: static;
  width: 17px;
  height: 17px;
}

.login-toggle-pass:hover {
  color: var(--text-muted);
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-green-500);
}

.login-forgot {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-green-700);
}

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

.login-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--brand-green-light) 0%, var(--brand-green) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: none;
  transition: filter 0.15s ease;
}

.login-submit:hover {
  filter: brightness(1.06);
}

.login-submit svg {
  width: 17px;
  height: 17px;
}

.login-footer {
  margin-top: 26px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.login-footer a {
  font-weight: 600;
  color: var(--accent-green-700);
}

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

@media (max-width: 768px) {
  .login-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 50% 50%;
    min-height: 100vh;
    align-items: stretch;
  }

  .login-brand {
    max-width: none;
    min-height: 40%;
    height: 100%;
    padding: 32px 20px 110px;
    align-self: stretch;
  }

  .login-form-panel {
    min-height: 0;
    align-items: stretch;
  }

  .login-brand-top img {
    height: 120px;
  }

  .login-brand-copy {
    max-width: none;
    margin: 0 0 24px;
    text-align: center;
  }

  .login-brand-copy h1 {
    font-size: 26px;
  }

  .login-brand-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
  }

  .login-brand-stats div {
    flex: 1 1 90px;
    text-align: center;
  }

  .login-form-panel {
    padding: 20px 16px 28px;
  }

  .login-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
  }
}

@media (max-width: 420px) {
  .login-brand {
    min-height: auto;
    height: auto;
    padding: 24px 16px 90px;
  }

  .login-brand-copy h1 {
    font-size: 22px;
  }

  .login-brand-copy p {
    font-size: 14px;
  }

  .login-brand-stats {
    gap: 10px;
  }

  .login-brand-stats strong {
    font-size: 18px;
  }

  .login-input-wrap input {
    font-size: 16px;
  }

  .login-submit {
    font-size: 14px;
  }
}