/* LBCA - Manual Litigation Tracker: Estilização da Página de Login */
:root {
  --roxo: #69103F;
  --magenta: #922764;
  --lilas: #F3E8F0;
  --bg: #FBF8FA;
  --panel: #FFFFFF;
  --ink: #221C1F;
  --ink2: #4A4046;
  --mute: #86797F;
  --line: #E6D8DF;
  --ok: #158F58;
  --warn: #B8760A;
  --stop: #B4292A;
  --tip: #1E5FA8;
  --pink: #F2BBD8;
  --shadow: 0 12px 36px rgba(105, 16, 63, 0.12);
}

:root[data-theme="dark"] {
  --roxo: #F2BBD8;
  --magenta: #E08CBF;
  --lilas: #3A1E30;
  --bg: #17111A;
  --panel: #211823;
  --ink: #F3E9EF;
  --ink2: #D6C8D0;
  --mute: #9D8E97;
  --line: #3E2C38;
  --ok: #4CC58C;
  --warn: #E0A33A;
  --stop: #F07A74;
  --tip: #6FA7F0;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root[data-theme="dark"] .login-header .logo-container {
  background: #ffffff;
  border-radius: 12px;
  padding: 6px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Background decorativo do Design System */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-decor .ring {
  position: absolute;
  right: -15%;
  top: -20%;
  width: 65vw;
  max-width: 800px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(146, 39, 100, 0.12);
  box-shadow: inset 0 0 0 40px rgba(105, 16, 63, 0.02), inset 0 0 0 80px rgba(105, 16, 63, 0.02);
}

.bg-decor .glow {
  position: absolute;
  left: -10%;
  bottom: -15%;
  width: 50vw;
  max-width: 600px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146, 39, 100, 0.08) 0%, transparent 70%);
}

/* Container Principal */
.login-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* Cartão de Login */
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  width: 100%;
  padding: clamp(28px, 6vw, 42px);
  position: relative;
}

/* Cabeçalho do Card */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.login-header .logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  width: 100%;
}

.login-header .logo {
  height: 60px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #69103F, #922764);
  padding: 5px 15px;
  border-radius: 999px;
  margin: 0 0 14px 0;
  box-shadow: 0 2px 8px rgba(105, 16, 63, 0.18);
}

.login-header h1 {
  font-family: "Bricolage Grotesque", "Source Sans 3", Arial, sans-serif;
  font-size: clamp(23px, 5vw, 27px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--roxo);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.login-header p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink2);
}

/* Mensagens de Alerta */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.alert.error {
  background: rgba(180, 41, 42, 0.08);
  border-left: 4px solid var(--stop);
  color: var(--stop);
}

.alert.info {
  background: var(--lilas);
  border-left: 4px solid var(--magenta);
  color: var(--roxo);
}

.alert.success {
  background: rgba(21, 143, 88, 0.08);
  border-left: 4px solid var(--ok);
  color: var(--ok);
}

.alert svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* Campos do Formulário */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

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

.input-box input {
  width: 100%;
  padding: 13px 16px;
  padding-right: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.input-box input:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(146, 39, 100, 0.15);
  background: var(--panel);
}

.input-box .toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  padding: 6px;
  color: var(--mute);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.input-box .toggle-pwd:hover {
  color: var(--roxo);
}

/* Botão de Submissão */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #69103F, #922764);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(105, 16, 63, 0.25);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(105, 16, 63, 0.35);
  filter: brightness(1.05);
}

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

/* Botão Oficial / Harmonioso Google Sign-In */
.btn-google {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-google:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(105, 16, 63, 0.16);
  border-color: var(--magenta);
}

.btn-google:active:not(:disabled) {
  transform: translateY(0);
}

.btn-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-google .google-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.login-auth-hint {
  text-align: center;
  font-size: 13.5px;
  color: var(--mute);
  margin-top: 14px;
  margin-bottom: 4px;
}

/* Spinner de carregamento */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(146, 39, 100, 0.2);
  border-top-color: var(--magenta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Rodapé do Login */
.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.6;
}

.login-footer b {
  color: var(--ink2);
}

/* Responsividade */
@media (max-width: 480px) {
  .login-card {
    padding: 26px 20px;
    border-radius: 16px;
  }
  .login-header h1 {
    font-size: 22px;
  }
}
