/* login.css - Versión completamente nueva con estilo elegante */

/* Importar fuentes modernas */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f0f23;
    background-image: 
        radial-gradient(circle at 25% 25%, #1a1a2e 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #16213e 0%, transparent 50%),
        linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Efecto de estrellas en el fondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s linear infinite;
    opacity: 0.4;
    z-index: -1;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

/* Imagen de fondo sutil */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('img/pos.png') no-repeat center center;
    background-size: cover;
    opacity: 0.03;
    z-index: -1;
}

/* Contenedor principal */
.container {
    z-index: 1;
}

/* Tarjeta principal */
.card {
    border: none !important;
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    animation: slideUp 0.8s ease-out;
    position: relative;
}

/* Efecto de brillo en la tarjeta */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.card:hover::before {
    left: 100%;
}

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

.card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Cabecera de la tarjeta */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 30px 25px !important;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: -1;
}

.card-header h3 {
    font-weight: 600 !important;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 0 !important;
    color: white !important;
    font-size: 24px;
    position: relative;
    z-index: 2;
}

/* Cuerpo de la tarjeta */
.card-body {
    background: rgba(15, 15, 35, 0.9) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    padding: 35px 30px !important;
    position: relative;
    z-index: 2;
}

/* Etiquetas de formulario */
.card-body label {
    font-weight: 500 !important;
    margin-bottom: 10px !important;
    color: #e2e8f0 !important;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: block;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 25px !important;
    position: relative;
}

/* Grupos de input */
.input-group {
    display: flex !important;
    width: 100% !important;
    position: relative;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.input-group:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.input-group-prepend {
    display: flex !important;
}

.input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    padding: 15px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 55px;
    border-radius: 0 !important;
    position: relative;
    z-index: 1;
}

.input-group-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: -1;
}

/* Campos de input y select */
.form-control {
    border: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    padding: 15px 18px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    flex: 1 !important;
    border-radius: 0 !important;
    height: auto !important;
    min-height: 50px !important;
    outline: none !important;
    box-shadow: none !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: white !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Efecto focus para todo el grupo */
.input-group:focus-within {
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px);
}

.input-group:focus-within .input-group-text {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
}

/* Select específico */
select.form-control {
    color: white !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer;
}

select.form-control option {
    background: #1a1a2e !important;
    color: white !important;
    padding: 12px !important;
    border: none !important;
}

select.form-control option:hover,
select.form-control option:focus {
    background: #667eea !important;
    color: white !important;
}

/* Botón principal */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 16px 35px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    font-size: 14px;
    width: 100% !important;
    margin-top: 25px !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
}

.btn-primary:active {
    transform: translateY(-1px) !important;
}

.btn-primary:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

/* Iconos de Font Awesome */
.fas {
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group:hover .fas {
    transform: scale(1.1);
}

.input-group:focus-within .fas {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin: 20px !important;
        border-radius: 20px !important;
    }
    
    .card-body {
        padding: 25px 20px !important;
    }
    
    .card-header {
        padding: 25px 20px !important;
    }
    
    body {
        padding: 15px;
    }
    
    .input-group-text {
        min-width: 50px;
        padding: 12px 15px !important;
    }
    
    .form-control {
        padding: 12px 15px !important;
        min-height: 45px !important;
    }
    
    .btn-primary {
        padding: 14px 30px !important;
    }
}

/* Animaciones adicionales */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

.card-header h3 {
    animation: glow 3s ease-in-out infinite;
}

/* Efecto de entrada escalonada */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.btn-primary { animation-delay: 0.4s; }

.form-group,
.btn-primary {
    animation: slideInFromLeft 0.6s ease-out both;
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Efecto de cristal mejorado */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}