/* ======== RESET E BASE ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #2a6099 100%);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ======== TELA DE BOAS-VINDAS ======== */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #2a6099 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.welcome-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.background-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0.1;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: float 8s infinite;
}

.circle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.circle:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -100px;
  right: 10%;
  animation-delay: 3s;
}

.circle:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 50%;
  right: -75px;
  animation-delay: 7s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.1);
  }
}

.welcome-container {
  text-align: center;
  z-index: 10;
  animation: fadeInUp 1s ease-out;
  max-width: 600px;
  padding: 40px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 300;
  color: white;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -1px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 50px;
  font-weight: 300;
  line-height: 1.6;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-access {
  display: inline-block;
  padding: 16px 60px;
  background: rgba(255, 255, 255, 0.95);
  color: #4a90e2;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: fadeInUp 1s ease-out 0.6s both;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-access:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: white;
}

.btn-access:active {
  transform: translateY(-1px);
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0s both;
  backdrop-filter: blur(10px);
}

.icon-wrapper svg {
  width: 40px;
  height: 40px;
  fill: white;
}

/* ======== CONTAINERS ======== */
.login-container {
  display: flex;
  height: 100vh;
}

/* Lado esquerdo - Imagem */
.login-image {
  flex: 1;
  background-color: #4a90e2;
  background-image: linear-gradient(135deg, rgba(74, 144, 226, 0.4) 0%, rgba(53, 122, 189, 0.4) 50%, rgba(42, 96, 153, 0.4) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat, no-repeat;
  position: relative;
  overflow: hidden;
}

.image-overlay {
  position: absolute;
  top: 0;
  right: -100px;
  width: 200px;
  height: 100%;
  background: #f5f5f5;
  border-radius: 50% 0 0 50%;
  transform: scaleX(1.4);
}

/* Lado direito - Formulário */
.login-form-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  padding: 40px;
}

.login-form {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: slideInLeft 0.8s ease-out forwards;
}

/* ======== TÍTULOS ======== */
.welcome-title {
  font-size: 48px;
  font-weight: 400;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 0.1s;
}

.welcome-subtitle {
  font-size: 15px;
  color: #999;
  margin-bottom: 40px;
  font-weight: 300;
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* ======== ALERTAS ======== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-danger,
.alert-error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  opacity: 1;
}

.btn-close::before {
  content: '×';
  font-size: 24px;
  line-height: 1;
}

/* ======== INPUTS ======== */
.input-group {
  position: relative;
  margin-bottom: 20px;
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
}

.input-group:nth-child(1) { animation-delay: 0.3s; }
.input-group:nth-child(2) { animation-delay: 0.4s; }

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  color: #333;
}

.form-input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-input::placeholder {
  color: #bbb;
}

/* ======== ESQUECEU SENHA ======== */
.forgot-password {
  text-align: right;
  margin-bottom: 30px;
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 0.5s;
}

.forgot-password a {
  color: #999;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #4a90e2;
}

/* ======== BOTÃO DE LOGIN ======== */
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 0.6s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  background: linear-gradient(135deg, #357abd 0%, #2a6099 100%);
}

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

/* ======== SIGNUP LINK ======== */
.signup-link {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 30px;
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
  animation-delay: 0.7s;
}

.signup-link a {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.signup-link a:hover {
  color: #357abd;
}

/* ======== ANIMAÇÕES ======== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======== RESPONSIVIDADE ======== */
@media (max-width: 968px) {
  .login-image {
    display: none;
  }

  .login-form-wrapper {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .welcome-container {
    padding: 20px;
  }

  .subtitle {
    margin-bottom: 40px;
  }

  .btn-access {
    padding: 14px 50px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .login-form {
    padding: 20px;
  }

  .welcome-title {
    font-size: 36px;
  }

  .login-form-wrapper {
    padding: 20px;
  }
}