* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #009bb7 0%, #006d7f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Imagen de fondo con overlay oscuro */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../img/trasoftimg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

/* Animación de fondo */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 95vh;
    overflow-y: auto;
}

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

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #009bb7 0%, #006d7f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 155, 183, 0.4);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-logo i {
    font-size: 40px;
    color: white;
}

.login-header h1 {
    color: #333;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #009bb7;
    font-size: 18px;
    z-index: 1;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #009bb7;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 155, 183, 0.1);
    transform: translateY(-2px);
}

.form-control.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    animation: fadeIn 0.3s;
}

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

.alert {
    border-radius: 10px;
    border: none;
    padding: 12px;
    margin-bottom: 18px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fee;
    color: #c33;
    border-left: 4px solid #dc3545;
}

.alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #009bb7 0%, #006d7f 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 155, 183, 0.4);
}

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

.btn-login span {
    position: relative;
    z-index: 1;
}

.back-home {
    text-align: center;
    margin-top: 15px;
}

.back-home a {
    color: #009bb7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-home a:hover {
    color: #006d7f;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .login-card {
        padding: 30px 25px;
        border-radius: 15px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .login-logo {
        width: 70px;
        height: 70px;
    }

    .login-logo i {
        font-size: 35px;
    }

    .form-control {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }

    .input-icon {
        font-size: 16px;
        left: 12px;
    }

    .btn-login {
        padding: 13px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .login-header p {
        font-size: 13px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .login-logo i {
        font-size: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-control {
        padding: 11px 12px 11px 38px;
        font-size: 14px;
        border-radius: 8px;
    }

    .input-icon {
        font-size: 15px;
        left: 12px;
    }

    .btn-login {
        padding: 12px;
        font-size: 14px;
        border-radius: 8px;
        margin-top: 5px;
    }

    .alert {
        padding: 12px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    .back-home {
        margin-top: 15px;
    }

    .back-home a {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 20px 15px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .form-control {
        padding: 10px 10px 10px 35px;
        font-size: 13px;
    }

    .btn-login {
        padding: 11px;
        font-size: 13px;
    }
}

/* Asegurar que el botón siempre sea visible */
.btn-login {
    display: block;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}

/* Prevenir overflow que pueda ocultar el botón */
.login-card {
    overflow: visible;
}

form {
    width: 100%;
    display: block;
}

