/* ============================================================
   FinControl — Login Page Styles
   Dark mode premium, consistente com o app principal
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:          #080b14;
  --bg-card:          rgba(15, 23, 42, 0.85);
  --border:           rgba(255, 255, 255, 0.07);
  --border-focus:     rgba(124, 58, 237, 0.7);
  --accent:           #7c3aed;
  --accent-light:     #a78bfa;
  --accent-glow:      rgba(124, 58, 237, 0.35);
  --text-primary:     #f1f5f9;
  --text-secondary:   #94a3b8;
  --text-muted:       #475569;
  --color-error:      #ef4444;
  --color-error-bg:   rgba(239, 68, 68, 0.1);
  --color-error-border: rgba(239, 68, 68, 0.3);
  --input-bg:         rgba(255, 255, 255, 0.04);
  --input-bg-hover:   rgba(255, 255, 255, 0.07);
  --radius-card:      20px;
  --radius-input:     12px;
  --font:             'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card:      0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-btn:       0 8px 30px rgba(124, 58, 237, 0.4);
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  overflow: hidden;
}

/* ---- Orbs de fundo ---- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float 8s ease-in-out infinite alternate;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation-delay: 3s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1.5s;
}
@keyframes float {
  from { transform: translateY(0px) scale(1); }
  to   { transform: translateY(-30px) scale(1.05); }
}

/* ---- Wrapper centralizado ---- */
.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* ---- Card ---- */
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 40px 36px 32px;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ---- Header ---- */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  gap: 10px;
}
.logo-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(79,70,229,0.15));
  border: 1px solid rgba(124,58,237,0.3);
  box-shadow: 0 0 30px rgba(124,58,237,0.2);
  margin-bottom: 4px;
}
.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f1f5f9 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ---- Formulário ---- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Banner de erro */
.error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 500;
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%, 90%  { transform: translateX(-3px); }
  20%, 80%  { transform: translateX(4px);  }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%  { transform: translateX(4px);  }
}

/* Input Groups */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  transition: color 0.2s;
}
.login-input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.login-input::placeholder { color: var(--text-muted); }
.login-input:hover { background: var(--input-bg-hover); }
.login-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(124, 58, 237, 0.05);
}
.login-input:focus + .input-wrapper .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-light);
}

/* Toggle senha */
.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.btn-toggle-password:hover { color: var(--accent-light); }

/* Botão de Login */
.btn-login {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border: none;
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 0.97rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-btn);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}
.btn-login:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5);
}
.btn-login:active:not(:disabled) {
  transform: translateY(0);
}
.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.btn-login-spinner svg {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Responsivo ---- */
@media (max-width: 480px) {
  .login-card { padding: 32px 24px 24px; }
  .login-title { font-size: 1.4rem; }
}
