/* ---------- Tela de Login ---------- */

.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 50%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.login-screen.hidden {
  display: none;
}

.login-card {
  background: #fff;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 380px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 1rem 2rem rgba(18, 38, 63, 0.2),
    0 2.5rem 4rem rgba(18, 38, 63, 0.12);
  animation: fadeIn 0.3s ease-out;
  overflow: hidden;
}

.login-card-accent {
  height: 4px;
  background: linear-gradient(to right, #4f46e5, #7c3aed, #a855f7);
}

.login-header {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
}

.login-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.login-logo-icon {
  width: 28px;
  height: 28px;
  color: #fff;
}

.login-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}

.login-subtitle {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 2rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.login-input-icon {
  position: absolute;
  left: 0.8rem;
  display: flex;
  align-items: center;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s;
}

.login-input-icon svg {
  width: 16px;
  height: 16px;
}

.login-input-wrapper:focus-within .login-input-icon {
  color: #4f46e5;
}

.login-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.65rem 0.9rem 0.65rem 2.5rem;
  font-size: 0.875rem;
  color: #111827;
  font-family: inherit;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.login-error {
  font-size: 0.78rem;
  color: #ef4444;
  min-height: 1.1em;
  margin: 0.15rem 0 0;
  text-align: center;
  font-weight: 500;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

.login-card.shake {
  animation: shake 0.4s ease-out;
}

.login-input.error {
  border-color: #ef4444;
  background: #fff5f5;
}

.login-input.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.login-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  border-radius: 0.6rem;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.4rem;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  letter-spacing: 0.01em;
}

.login-submit-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.login-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

.login-submit-btn:hover:not(:disabled) .login-submit-arrow {
  transform: translateX(3px);
}

.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footer {
  font-size: 0.72rem;
  color: #9ca3af;
  text-align: center;
  margin: 1.5rem 0 1.25rem;
  letter-spacing: 0.02em;
}
