display: flex;
align-items: center;
justify-content: center;
margin: 0;
padding: 40px 20px;
position: relative;
overflow: hidden;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('assets/img/bg-1.jpg');
background-size: cover;
background-position: center;
opacity: 0.1;
z-index: -1;
}
/* Partículas decorativas */
.particle {
position: absolute;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
pointer-events: none;
animation: float 6s ease-in-out infinite;
}
.particle:nth-child(1) {
width: 80px;
height: 80px;
top: 10%;
left: 10%;
animation-delay: 0s;
}
.particle:nth-child(2) {
width: 60px;
height: 60px;
top: 70%;
right: 10%;
animation-delay: 2s;
}
.particle:nth-child(3) {
width: 40px;
height: 40px;
bottom: 20%;
left: 20%;
animation-delay: 4s;
}
.particle:nth-child(4) {
width: 100px;
height: 100px;
top: 50%;
right: 20%;
animation-delay: 1s;
}
.particle:nth-child(5) {
width: 20px;
height: 20px;
bottom: 10%;
right: 30%;
animation-delay: 3s;
}
@keyframes float {
0%, 100% {
transform: translateY(0px) rotate(0deg);
opacity: 0.7;
}
50% {
transform: translateY(-20px) rotate(180deg);
opacity: 0.3;
}
}
.login-container {
width: 100%;
max-width: 440px;
z-index: 1;
}
.login-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
border-radius: var(--border-radius);
box-shadow: var(--shadow-lg);
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 48px;
transition: var(--transition);
}
.login-card:hover {
transform: translateY(-2px);
box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
.login-header {
text-align: center;
margin-bottom: 40px;
}
.login-header img {
max-width: 180px;
height: auto;
margin-bottom: 24px;
transition: var(--transition);
}
.login-header img:hover {
transform: scale(1.05);
}
.login-header h4 {
color: #1f2937;
font-weight: 700;
font-size: 28px;
margin-bottom: 8px;
letter-spacing: -0.025em;
}
.login-header p {
color: #6b7280;
font-size: 16px;
font-weight: 400;
margin: 0;
}
.form-group {
margin-bottom: 24px;
}
.form-label {
display: block;
font-weight: 600;
font-size: 14px;
color: #374151;
margin-bottom: 8px;
letter-spacing: 0.025em;
}
.form-control {
width: 100%;
padding: 16px 18px;
border: 2px solid #e5e7eb;
border-radius: 12px;
font-size: 16px;
font-weight: 500;
color: #1f2937;
background-color: #ffffff;
transition: var(--transition);
}
.form-control:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
transform: translateY(-1px);
}
.form-control::placeholder {
color: #9ca3af;
font-weight: 400;
}
.btn-primary {
width: 100%;
padding: 18px;
background: #4338ca;
border: none;
border-radius: 12px;
color: white;
font-weight: 600;
font-size: 16px;
letter-spacing: 0.025em;
transition: var(--transition);
position: relative;
overflow: hidden;
}
.btn-primary::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
transition: left 0.5s;
}
.btn-primary:hover::before {
left: 100%;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}
.btn-primary:active {
transform: translateY(0);
}
.login-footer {
text-align: center;
margin-top: 32px;
}
.login-footer p {
color: #6b7280;
font-size: 14px;
margin: 0;
}
.login-footer a {
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
transition: var(--transition);
}
.login-footer a:hover {
color: var(--primary-dark);
text-decoration: underline;
}
.alert {
border-radius: 12px;
border: none;
padding: 16px 20px;
margin-bottom: 24px;
font-weight: 500;
}
.alert-danger {
background-color: #fef2f2;
color: #dc2626;
border-left: 4px solid #dc2626;
}
.alert-success {
background-color: #f0fdf4;
color: #16a34a;
border-left: 4px solid #16a34a;
}
/* Responsive Design */
@media (max-width: 768px) {
body {
padding: 20px 16px;
}
.login-card {
padding: 32px 24px;
}
.login-header h4 {
font-size: 24px;
}
.login-header img {
max-width: 150px;
}
}
@media (max-width: 480px) {
.login-card {
padding: 24px 20px;
}
.form-control {
padding: 14px 16px;
font-size: 16px; /* Evita zoom en iOS */
}
.btn-primary {
padding: 16px;
}
}
/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
<