/* Estilos para el sistema de login del CCPSM */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1e3c72;
  --primary-light: #2a5298;
  --secondary-color: #f8f9fa;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/insignea.png') no-repeat center center;
  background-size: 60%;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.login-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.logo-container {
  margin-bottom: 30px;
}

.logo-container img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.welcome-title {
  color: var(--text-dark);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.welcome-subtitle {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 30px;
  font-weight: 400;
}

.form-section {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.form-section.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-floating {
  margin-bottom: 20px;
  position: relative;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 20px 10px 20px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(30, 60, 114, 0.25);
  background: rgba(255, 255, 255, 1);
}

.form-floating label {
  padding: 20px 20px 10px 20px;
  color: var(--text-light);
  font-weight: 500;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border: none;
  color: white;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-primary-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary-custom:hover::before {
  left: 100%;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 60, 114, 0.4);
  color: white;
}

.btn-danger-custom {
  background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
  border: none;
  color: white;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-danger-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
  color: white;
}

.link-custom {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 15px;
}

.link-custom:hover {
  color: var(--primary-light);
  text-decoration: underline;
  transform: translateY(-1px);
}

.alert {
  border-radius: 12px;
  padding: 15px 20px;
  margin: 20px 0;
  border: none;
  font-weight: 500;
}

.alert-danger {
  background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
  color: white;
}

.alert-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
  color: white;
}

.app-download {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.app-download h4 {
  color: var(--text-dark);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 600;
}

.app-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-app {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 14px;
}

.btn-google {
  background: white;
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-google:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
}

.btn-apple {
  background: #000;
  color: white;
}

.btn-apple:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  color: white;
}

.btn-apple svg path {
  fill: white !important;
}

#verificando {
  margin-top: 20px;
}

.spinner-grow {
  margin: 0 5px;
}

.spinner-grow.text-success {
  color: var(--success-color) !important;
}

.spinner-grow.text-primary {
  color: var(--primary-color) !important;
}

/* Powered by ArCons */
.powered-by {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: #666;
  font-size: 12px;
  font-weight: 500;
}

.powered-by:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #333;
  text-decoration: none;
}

.powered-by img {
  height: 20px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.powered-by:hover img {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-card {
    padding: 30px 20px;
    margin: 10px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .form-control {
    padding: 18px 18px 8px 18px;
    font-size: 16px;
  }

  .form-floating label {
    padding: 18px 18px 8px 18px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .login-card {
    padding: 25px 15px;
  }

  .welcome-title {
    font-size: 20px;
  }

  .app-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-app {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }

  .powered-by {
    bottom: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .powered-by img {
    height: 16px;
  }
}
