/**
 * Login Moderno para Clínica Odontológica - ORION WEB
 * Diseño profesional y responsivo
 */

/* ========================================
   CONTENEDOR PRINCIPAL DEL LOGIN
   Fondo Animado Estilo BUFINS - Colores ORION
======================================== */
body {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #7EC96F, #6BB85D, #55A147, #376A2D, #2D5A3D);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   CARD DE LOGIN MEJORADO
======================================== */
#containerdiv {
    width: 100% !important;
    max-width: 420px !important;
    margin: 2rem auto !important;
    padding: 0 1rem;
}

.card {
    border-radius: 20px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98) !important;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HEADER DEL LOGIN
======================================== */
.card-header.bg-orionppal {
    background: linear-gradient(135deg, #55A147 0%, #376A2D 100%) !important;
    padding: 2rem 1.5rem !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}


.card-header h5 {
    color: white !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    text-align: center;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

/* ========================================
   LOGO
======================================== */
.imglogologinreg {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    margin: 1rem auto !important;
    display: block !important;
}

.imglogologinreg:hover {
    transform: scale(1.05) rotate(3deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

/* ========================================
   BODY DEL CARD
======================================== */
.card-body {
    padding: 2rem 2rem 1.5rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

/* ========================================
   INPUTS MODERNOS - REDISEÑADOS
======================================== */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group-prepend {
    display: none;
}

.form-control {
    padding: 1rem 1.2rem !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: #f8f9fa !important;
    width: 100%;
}

.form-control:focus {
    border-color: #55A147 !important;
    box-shadow: 0 0 0 3px rgba(85, 161, 71, 0.12) !important;
    background: white !important;
    outline: none;
}

.form-control::placeholder {
    color: #888;
    font-weight: 400;
}

/* Iconos como labels flotantes */
.input-group::before {
    content: attr(data-icon);
    position: absolute;
    left: 1.2rem;
    top: -0.6rem;
    background: white;
    padding: 0 0.5rem;
    color: #55A147;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    border-radius: 4px;
}

/* ========================================
   BOTÓN DE LOGIN MODERNO
======================================== */
.btn-green {
    width: 100% !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #55A147 0%, #376A2D 100%) !important;
    color: white !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(85, 161, 71, 0.4) !important;
    position: relative;
    overflow: hidden;
}

.btn-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-green:hover::before {
    left: 100%;
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 161, 71, 0.5) !important;
    background: linear-gradient(135deg, #6BB85D 0%, #55A147 100%) !important;
}

.btn-green:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(85, 161, 71, 0.3) !important;
}

/* ========================================
   ALERTA DE ERROR
======================================== */
.alert-danger {
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%) !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 10px rgba(201, 42, 42, 0.3) !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ========================================
   SEPARADOR
======================================== */
hr {
    border: none !important;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(85, 161, 71, 0.3), transparent);
    margin: 1.5rem 0 !important;
}

/* ========================================
   FOOTER DEL LOGIN
======================================== */
.card-body > div:last-child {
    text-align: center;
    margin-top: 1rem;
}

.card-body h8 {
    color: #376A2D !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    #containerdiv {
        max-width: 95% !important;
        margin: 1rem auto !important;
    }

    .card-body {
        padding: 1.5rem 1.25rem !important;
    }

    .card-header h5 {
        font-size: 1.3rem !important;
    }

    .imglogologinreg {
        width: 100px !important;
        height: 100px !important;
    }

    .btn-green {
        height: 48px !important;
        line-height: 48px !important;
    }
}

@media (max-height: 700px) {
    .imglogologinreg {
        width: 80px !important;
        height: 80px !important;
        margin: 0.5rem auto !important;
    }

    .card-body {
        padding: 1.25rem !important;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    hr {
        margin: 1rem 0 !important;
    }
}

/* ========================================
   ANIMACIONES DE CARGA
======================================== */
.form-control:disabled {
    background: #f5f5f5 !important;
    cursor: not-allowed;
}

/* Efecto de enfoque en inputs */
@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(85, 161, 71, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(85, 161, 71, 0.1);
    }
}

.form-control:focus {
    animation: inputFocus 0.3s ease-out;
}

/* ========================================
   MEJORAS VISUALES ADICIONALES
======================================== */
.card {
    transition: transform 0.3s ease;
}

/* Sombra más pronunciada en dispositivos grandes */
@media (min-width: 1024px) {
    .card {
        box-shadow:
            0 25px 70px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    }
}
