﻿/* Login Modern Styles - PRODIS PORTAL */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.container {
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    animation: fadeInDown 0.8s ease-out;
}

.login-logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-img {
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.login-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

.login-title {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 1em;
    font-weight: 500;
    color: #666;
    margin: 0;
    font-style: italic;
}

.login-box-body {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.login-box-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box-msg {
    text-align: center;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 30px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    background: white;
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.form-control::placeholder {
    color: #999;
    font-weight: 400;
}

.btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::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:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(17, 153, 142, 0.4);
    color: white;
}

.btn-success:active {
    transform: translateY(-1px);
}

#lblMensaje {
    display: block;
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 15px;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease;
}

/* Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos de partículas flotantes */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 15px;
    height: 15px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 8px;
    height: 8px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 12px;
    height: 12px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    top: 70%;
    left: 50%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Responsive Design - Mejorado */
@media (max-width: 1200px) {
    .container {
        max-width: 350px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 400px;
    }
    
    .login-box-body {
        padding: 35px 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
        align-items: flex-start;
        padding-top: 50px;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
    }
    
    .login-box-body {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .login-logo-img {
        max-width: 100px;
        max-height: 70px;
    }
    
    .login-title {
        font-size: 2em;
    }
    
    .login-subtitle {
        font-size: 0.9em;
    }
    
    .form-control {
        font-size: 16px; /* Previene zoom en iOS */
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
        padding-top: 30px;
    }
    
    .login-box-body {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .login-logo-img {
        max-width: 90px;
        max-height: 60px;
    }
    
    .login-title {
        font-size: 1.8em;
    }
    
    .login-subtitle {
        font-size: 0.8em;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 14px;
        border-radius: 20px;
    }
    
    .login-box-msg {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        padding-top: 20px;
    }
    
    .login-box-body {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .login-logo-img {
        max-width: 80px;
        max-height: 50px;
    }
    
    .login-title {
        font-size: 1.6em;
    }
    
    .login-subtitle {
        font-size: 0.7em;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 15px;
    }
    
    .login-box-msg {
        font-size: 0.9em;
        margin-bottom: 25px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 5px;
        padding-top: 15px;
    }
    
    .login-box-body {
        padding: 15px 12px;
        border-radius: 10px;
    }
    
    .login-logo-img {
        max-width: 70px;
        max-height: 45px;
    }
    
    .login-title {
        font-size: 1.4em;
    }
    
    .login-subtitle {
        font-size: 0.6em;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 16px;
        border-radius: 6px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 12px;
        border-radius: 12px;
    }
    
    .login-box-msg {
        font-size: 0.8em;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
}

/* Mejoras para orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .login-box-body {
        padding: 20px 25px;
    }
    
    .login-logo {
        margin-bottom: 20px;
    }
    
    .login-logo-img {
        max-width: 90px;
        max-height: 60px;
    }
    
    .login-title {
        font-size: 1.8em;
    }
    
    .login-subtitle {
        font-size: 0.8em;
    }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width: 320px) {
    .login-box-body {
        padding: 12px 10px;
    }
    
    .login-logo-img {
        max-width: 60px;
        max-height: 40px;
    }
    
    .login-title {
        font-size: 1.2em;
    }
    
    .login-subtitle {
        font-size: 0.5em;
    }
    
    .form-control {
        padding: 6px 8px;
        font-size: 16px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}