:root {
  --brand-primary: #1a6b3c;
  --brand-secondary: #0d4a28;
  --brand-accent: #f5a623;
  --bg-gradient-start: #0d4a28;
  --bg-gradient-end: #1a6b3c;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 60%, #2d9c5a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Fondo con patrón sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
                    radial-gradient(circle at 60% 80%, rgba(255,255,255,0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 8px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Cabecera */
.login-header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
}

.login-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.login-logo {
  width: 100px;
  height: 110px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.login-logo i {
  font-size: 2rem;
  color: #fff;
}

.login-header h1 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

.login-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Cuerpo del formulario */
.login-body {
  padding: 2rem 2rem 2.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.form-control {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f9fafb;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.12);
  background: #fff;
}

.input-group .form-control {
  border-right: none;
  border-radius: 10px 0 0 10px;
}

.input-group .btn-outline-secondary {
  border: 1.5px solid #e5e7eb;
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: #f9fafb;
  color: #6b7280;
  padding: 0.65rem 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.input-group .btn-outline-secondary:hover {
  background: #e5e7eb;
  color: #374151;
}

.btn-login {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(26, 107, 60, 0.35);
}

.btn-login:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 107, 60, 0.4);
}

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

.btn-login:disabled {
  opacity: 0.65;
  transform: none;
  cursor: not-allowed;
}

/* Separador */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 1.25rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Botón Google */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  color: #374151;
}

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

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Extras */
.forgot-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}

.form-check-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* Pie */
.login-footer {
  text-align: center;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Alertas */
.alert-login {
  border-radius: 10px;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: none;
}

/* Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
  .login-header {
    padding: 2rem 1.5rem 1.75rem;
  }
  .login-body {
    padding: 1.5rem 1.5rem 2rem;
  }
}
