/* Login / denied — partilhado entre anest/calendario.html e anest/producao.html */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  isolation: isolate;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}
.login-overlay.hidden { display: none !important; }
.login-overlay__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-overlay__video {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.login-overlay__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 5, 5, 0.82) 0%,
    rgba(30, 8, 8, 0.68) 50%,
    rgba(10, 5, 5, 0.86) 100%
  );
}
.login-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: auto;
}
.login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 40px 36px 36px;
  box-shadow:
    0 8px 48px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  animation: anestLoginFadeUp 0.65s ease both;
}
@keyframes anestLoginFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand img {
  display: block;
  margin: 0 auto;
  max-width: min(280px, 82vw);
  width: auto;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.5));
}
.login-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 2px;
  margin: 0 auto 22px;
}
.login-title-portal {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  color: #fff;
}
.login-title-portal span {
  background: linear-gradient(90deg, #fca5a5, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-sub-portal {
  margin: 0 0 22px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}
.login-field { margin-bottom: 12px; }
.login-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 5px;
}
.login-card .login-field .in,
.login-card .in {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.login-card .login-field .in:focus,
.login-card .in:focus {
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
.login-card .login-pass-field {
  position: relative;
  width: 100%;
}
.login-card .login-pass-field__input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 46px;
}
.login-card .login-pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.login-card .login-pass-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.login-card .login-pass-toggle:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.65);
  outline-offset: 1px;
}
.login-card .login-pass-toggle .lucide-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.login-error { color: #fecaca; font-size: 0.8rem; min-height: 20px; margin-bottom: 8px; }
.login-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(165deg, #fb7185 0%, #dc2626 52%, #be123c 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 22px rgba(220, 38, 38, 0.38);
}
.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.45);
}
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.login-or::before,
.login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.login-google {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.login-google:hover:not(:disabled) {
  border-color: rgba(251, 146, 60, 0.45);
  background: rgba(255, 255, 255, 0.06);
}
.login-google:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.login-google svg { flex-shrink: 0; }
.login-footer-link {
  margin-top: 14px;
  font-size: 0.78rem;
  text-align: center;
}
.login-footer-link a {
  color: #fca5a5;
  font-weight: 600;
}
.login-oauth-hint {
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  margin: 8px 0 0;
}
@media (max-width: 480px) {
  .login-card { padding: 32px 22px 28px; }
}

.denied {
  position: relative;
  z-index: 2;
  padding: 48px 20px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  color: #94a3b8;
}
.denied strong { color: #e8eaf0; }
.denied.hidden { display: none !important; }
