/* Auth — identidade Protec Balanças */
:root {
  --protec-blue: #0E4182;
  --protec-blue-dark: #0B3468;
  --protec-yellow: #EFA602;
  --protec-yellow-hover: #D99400;
  --bg-page: #F9FAFB;
  --bg-card: #ffffff;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --border-color: #E5E7EB;
  --shadow-md: 0 10px 28px rgba(11, 52, 104, 0.12);
}

* { box-sizing: border-box; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(239, 166, 2, 0.14), transparent 38%),
    radial-gradient(circle at bottom right, rgba(14, 65, 130, 0.12), transparent 40%),
    var(--bg-page);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.auth-shell-compact {
  max-width: 460px;
  grid-template-columns: 1fr;
}

.auth-brand {
  background: linear-gradient(160deg, var(--protec-blue-dark) 0%, var(--protec-blue) 100%);
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.auth-brand img {
  max-width: 180px;
  height: auto;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand h1 span {
  color: var(--protec-yellow);
}

.auth-brand p {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-features {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}

.auth-features i {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(239, 166, 2, 0.2);
  color: var(--protec-yellow);
  flex-shrink: 0;
}

.auth-panel {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--protec-blue-dark);
}

.auth-panel .auth-subtitle {
  margin: 0.35rem 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.auth-panel .form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.auth-panel .form-control {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  background: #fff;
  color: var(--text-primary);
}

.auth-panel .form-control:focus {
  border-color: var(--protec-blue);
  box-shadow: 0 0 0 3px rgba(14, 65, 130, 0.15);
}

.auth-panel .input-group-icon {
  position: relative;
}

.auth-panel .input-group-icon > i:first-child {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--protec-blue);
  z-index: 2;
}

.auth-panel .input-group-icon .form-control {
  padding-left: 2.5rem;
  padding-right: 2.75rem;
}

.auth-panel .password-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.auth-panel .password-toggle:hover {
  background: #F3F7FC;
  color: var(--protec-blue-dark);
}

.auth-panel .form-check-label,
.auth-panel .forgot-link,
.auth-panel .register-link a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-panel .forgot-link,
.auth-panel .register-link a {
  color: var(--protec-blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-panel .forgot-link:hover,
.auth-panel .register-link a:hover {
  color: var(--protec-blue-dark);
  text-decoration: underline;
}

.auth-panel .btn-auth {
  width: 100%;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: var(--protec-yellow);
  color: var(--protec-blue-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-panel .btn-auth:hover {
  background: var(--protec-yellow-hover);
  color: var(--protec-blue-dark);
}

.auth-panel .btn-auth.loading {
  opacity: 0.85;
  pointer-events: none;
}

.auth-panel .register-link {
  margin-top: 1.25rem;
  text-align: center;
}

.auth-panel .alert {
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.auth-panel .alert-danger {
  background: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}

.auth-panel .alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.auth-logo-center {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-logo-center img {
  max-width: 140px;
  height: auto;
}

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .auth-brand {
    padding: 2rem 1.75rem 1.5rem;
  }

  .auth-features {
    display: none;
  }

  .auth-panel {
    padding: 1.75rem;
  }
}
