/**
 * Banking Login Theme - Aparência de Sistema Bancário
 * Inspirado em: Itaú, Bradesco, Banco do Brasil, Nubank
 */

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-page {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #001f3f 0%, #003d82 50%, #0056b3 100%);
  position: relative;
  overflow: hidden;
}

/* Padrão geométrico de banco */
.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.02) 35px, rgba(255,255,255,0.02) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,0.02) 35px, rgba(255,255,255,0.02) 70px);
  pointer-events: none;
}

/* Círculos decorativos estilo bancário */
.login-page::after {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,180,216,0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -400px;
  right: -400px;
  pointer-events: none;
}

.form-panel {
  flex: 0 0 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: #ffffff;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 60px rgba(0,0,0,0.3);
}

.form-container {
  width: 100%;
  max-width: 400px;
  animation: slideInRight 0.8s cubic-bezier(0.16,1,0.3,1) both;
}

/* Logo área estilo bancário */
.logo-area {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.logo-area::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #003d82, #00b4d8);
  border-radius: 2px;
}

.logo-img {
  width: 180px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 8px 16px rgba(0,61,130,0.15));
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #003d82;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

/* Alertas estilo bancário */
.alert-error, .alert-success {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.alert-error {
  background: #fff5f5;
  border: 2px solid #feb2b2;
  color: #c53030;
}

.alert-error::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #c53030;
}

.alert-success {
  background: #f0fdf4;
  border: 2px solid #86efac;
  color: #16a34a;
}

.alert-success::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #16a34a;
}

/* Campos do formulário estilo bancário */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #003d82;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #003d82, #0056b3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.form-group:first-of-type .input-wrapper::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 20 20'%3E%3Cpath d='M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #003d82;
}

.form-group:nth-of-type(2) .input-wrapper::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #003d82;
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 0 1rem 0 50px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #212529;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
  color: #95a5a6;
}

.form-input:hover {
  border-color: #00b4d8;
  background: #ffffff;
}

.form-input:focus {
  border-color: #003d82;
  box-shadow: 0 0 0 4px rgba(0,61,130,0.1);
  background: #ffffff;
}

.form-input.has-toggle {
  padding-right: 50px;
}

/* Botão de mostrar/ocultar senha */
.password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s;
  font-size: 1rem;
}

.password-toggle:hover {
  color: #003d82;
  background: rgba(0,61,130,0.05);
}

/* Checkbox estilo bancário */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #495057;
  margin-bottom: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #003d82;
  cursor: pointer;
  border-radius: 4px;
}

.form-checkbox label {
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

/* Botão de login estilo bancário */
.btn-login {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,61,130,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-login:hover:not(:disabled) {
  background: linear-gradient(135deg, #002451 0%, #003d82 100%);
  box-shadow: 0 6px 30px rgba(0,61,130,0.4);
  transform: translateY(-2px);
}

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

.btn-login:active::before {
  width: 400px;
  height: 400px;
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Footer do formulário */
.form-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
  font-size: 0.8rem;
  color: #6c757d;
}

.form-footer a {
  color: #003d82;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.form-footer a:hover {
  color: #00b4d8;
  text-decoration: underline;
}

/* Painel lateral da marca */
.brand-panel {
  flex: 1;
  background: linear-gradient(135deg, #001f3f 0%, #003d82 50%, #0056b3 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

/* Elementos decorativos do painel */
.brand-panel::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(0,180,216,0.1);
  top: -300px;
  right: -200px;
  animation: float 15s ease-in-out infinite;
}

.brand-panel::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0,180,216,0.08);
  bottom: -200px;
  left: -150px;
  animation: float 20s ease-in-out infinite reverse;
}

.brand-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 550px;
  animation: fadeInUp 1s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}

/* Ícones de serviços bancários */
.brand-icon-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.brand-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.brand-icon-box:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.brand-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.brand-title span {
  background: linear-gradient(90deg, #00b4d8, #90e0ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Features estilo bancário */
.brand-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brand-pill:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.brand-pill i {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Estatísticas estilo bancário */
.brand-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  padding-top: 2.5rem;
  border-top: 2px solid rgba(255,255,255,0.15);
}

.brand-stat {
  text-align: center;
}

.brand-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #ffffff, #90e0ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-50px) rotate(5deg);
  }
}

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

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsividade */
@media (max-width: 1024px) {
  .brand-panel {
    display: none;
  }
  
  .form-panel {
    flex: 1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  }
}

@media (max-width: 480px) {
  .form-panel {
    padding: 2rem 1.5rem;
  }
  
  .form-container {
    max-width: 100%;
  }
  
  .logo-img {
    width: 140px;
  }
  
  .brand-title {
    font-size: 1.8rem;
  }
}