/* ==========================================================================

   ESTILOS DEFINITIVOS - PANEL DE USUARIO (CENTRADOS Y CAPA SUPERIOR)

   ========================================================================== */



#modal-user-panel {

    position: fixed !important;

    top: 0 !important;

    left: 0 !important;

    width: 100vw !important;

    height: 100vh !important;

    display: none; /* Se cambia a flex desde JS al abrir */

    flex-direction: column !important;

    align-items: center !important;

    justify-content: center !important;

    background: rgba(3, 7, 18, 0.9) !important;

    z-index: 999999 !important;

    margin: 0 !important;

    padding: 20px !important;

    box-sizing: border-box;

    overflow-y: auto !important;

}



#modal-user-panel.show,

#modal-user-panel[style*="display: flex"] {

    display: flex !important;

}



#modal-user-panel .profile-core-container {

    width: 100% !important;

    max-width: 850px !important;

    background-color: #030712 !important;

    border: 1px solid rgba(0, 242, 254, 0.4) !important;

    border-radius: 12px !important;

    box-shadow: 0 0 50px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 242, 254, 0.15) !important;

    padding: 30px !important;

    box-sizing: border-box;

    margin: auto !important;

    max-height: 90vh;

    overflow-y: auto;

}



/* Barra de acciones: botones separados a cada extremo */

.profile-actions-bar {

    display: flex !important;

    justify-content: space-between !important;

    align-items: center !important;

    width: 100% !important;

    margin-bottom: 1.5rem !important;

    margin-top: 1.5rem !important;

}



/* Botones con iluminación neón sólida y efecto hover brillante */

.btn-neon-cyan {

    background: #00f2fe !important;

    border: 1px solid #00f2fe !important;

    color: #030712 !important;

    font-family: 'Orbitron', sans-serif !important;

    font-weight: 700 !important;

    font-size: 0.9rem !important;

    padding: 10px 24px !important;

    border-radius: 6px !important;

    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4) !important;

    transition: all 0.3s ease !important;

    cursor: pointer !important;

}



.btn-neon-cyan:hover {

    background: #38bdf8 !important;

    border-color: #38bdf8 !important;

    color: #030712 !important;

    box-shadow: 0 0 25px rgba(0, 242, 254, 0.8), 0 0 10px rgba(56, 189, 248, 0.8) !important;

    transform: translateY(-1px) !important;

}



/* Campos de formulario estilizados (Inputs y Labels limpios y profesionales) */

.profile-view-container .form-label {

    color: #94a3b8 !important;

    font-size: 0.85rem !important;

    font-weight: 500 !important;

    text-transform: uppercase !important;

    letter-spacing: 0.5px !important;

    margin-bottom: 0.4rem !important;

}



.profile-view-container .form-control {

    background-color: rgba(15, 23, 42, 0.85) !important;

    border: 1px solid rgba(255, 255, 255, 0.1) !important;

    color: #f8fafc !important;

    border-radius: 6px !important;

    padding: 10px 14px !important;

    font-size: 0.95rem !important;

    transition: all 0.2s ease-in-out !important;

}



.profile-view-container .form-control:focus {

    background-color: rgba(15, 23, 42, 1) !important;

    border-color: #00f2fe !important;

    box-shadow: 0 0 10px rgba(0, 242, 254, 0.25) !important;

    color: #fff !important;

}



.profile-view-container .form-control[readonly] {

    background-color: rgba(15, 23, 42, 0.4) !important;

    border-color: rgba(255, 255, 255, 0.05) !important;

    color: #64748b !important;

}

/* ==========================================================================

   FORMULARIO ALINEADO Y CENTRADO EN EL MODAL (25% / 65%)

   ========================================================================== */



.profile-view-container .row.g-3 {

    justify-content: center !important;

    margin-left: 15%;

    margin-right: 0;

}



.profile-field-row {

    display: flex !important;

    align-items: center !important;

    justify-content: space-between !important;

    width: 80% !important;

    margin-bottom: 0.5rem !important;

}



.profile-field-row .form-label {

    width: 25% !important;

    text-align: left !important;

    padding-right: 15px !important;

    margin-bottom: 0 !important;

    flex-shrink: 0 !important;

}



.profile-field-row .form-control {

    width: 50% !important;

    flex-grow: 1 !important;

}



/* ==========================================================================

   EFECTO LUMINOSO PARA INFORMAR DE INCIDENCIAS / ACIERTOS

   ========================================================================== */



@keyframes neonFlash {

    0% {

        border-color: rgba(0, 242, 254, 0.4);

        box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);

    }

    50% {

        border-color: #00f2fe;

        box-shadow: 0 0 35px rgba(0, 242, 254, 0.8), inset 0 0 15px rgba(0, 242, 254, 0.3);

    }

    100% {

        border-color: rgba(0, 242, 254, 0.4);

        box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);

    }

}



.profile-core-container.success-flash {

    animation: neonFlash 1.5s ease-in-out !important;

}



/* ==========================================================================

   ESTILOS DE LA VISTA DE PEDIDOS ACTIVOS (PANEL DE USUARIO)

   ========================================================================== */



.pedidos-empty-state {

    background: rgba(0, 242, 254, 0.02);

    border: 1px dashed rgba(0, 242, 254, 0.2);

    border-radius: 8px;

}



.pedidos-empty-state i {

    color: #00f2fe;

    opacity: 0.5;

}



.pedidos-scroll-wrapper {

    max-height: 340px;

    overflow-y: auto;

    padding-right: 4px;

    overflow-x: hidden;

}



/* Tarjeta contenedora de la fila */

.pedido-row-item {

    background: rgba(15, 23, 42, 0.85);

    border: 1px solid rgba(0, 242, 254, 0.2);

    border-radius: 6px;

    transition: all 0.2s ease;

    width: 100%;

}



.pedido-row-item:hover {

    border-color: rgba(0, 242, 254, 0.5);

    background: rgba(15, 23, 42, 0.95);

    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);

}



/* Forzar que las columnas se mantengan estrictamente en línea horizontal */

.pedido-row-item .row {

    display: flex;

    flex-wrap: nowrap;

    align-items: center;

    width: 100%;

    margin: 0;

    justify-content: space-around;

}



.pedido-ref {

    font-family: 'Orbitron', sans-serif;

    font-weight: bold;

    color: #fff;

    font-size: 0.8rem;

    letter-spacing: 0.5px;

}



.pedido-fecha {

    font-size: 0.75rem;

    color: #94a3b8;

    white-space: nowrap;

}



.pedido-total {

    font-size: 0.85rem;

    font-weight: bold;

    color: #00f2fe;

    white-space: nowrap;

}



/* Insignias de Estado (Badges con diseño brillante) */

.pedido-row-item .badge {

    font-size: 0.65rem;

    font-family: 'Orbitron', sans-serif;

    padding: 0.3em 0.6em;

    letter-spacing: 0.5px;

    white-space: nowrap;

    border-radius: 4px;

}



.badge-pendiente {

    background: rgba(255, 193, 7, 0.15);

    color: #ffc107;

    border: 1px solid rgba(255, 193, 7, 0.4);

}



.badge-enviado {

    background: rgba(13, 202, 240, 0.15);

    color: #0dcaf0;

    border: 1px solid rgba(13, 202, 240, 0.4);

}



.badge-procesando {

    background: rgba(0, 242, 254, 0.15);

    color: #00f2fe;

    border: 1px solid rgba(0, 242, 254, 0.4);

}



/* Botón de Seguimiento estilizado */

.pedido-row-item .btn-ver-seguimiento {

    font-size: 0.7rem;

    font-family: 'Orbitron', sans-serif;

    border-color: #00f2fe;

    color: #00f2fe;

    padding: 0.25rem 0.5rem;

    white-space: nowrap;

    background: transparent;

    transition: all 0.2s ease;

}



.pedido-row-item .btn-ver-seguimiento:hover {

    background: #00f2fe;

    color: #030712;

    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);

}



/* Contenedor desplegable del timeline justo debajo de la fila */

.pedido-timeline-dropdown {

    background: rgba(10, 15, 30, 0.95);

    border: 1px dashed rgba(0, 242, 254, 0.3);

    border-top: none;

    border-radius: 0 0 8px 8px;

    margin-top: -4px;

    animation: fadeInTimeline 0.3s ease;

}



@keyframes fadeInTimeline {

    from { opacity: 0; transform: translateY(-5px); }

    to { opacity: 1; transform: translateY(0); }

}



/* Estilos visuales de la línea temporal vertical */

.custom-timeline {

    position: relative;

    padding-left: 20px;

    margin-top: 10px;

}



.custom-timeline::before {

    content: '';

    position: absolute;

    left: 6px;

    top: 4px;

    bottom: 4px;

    width: 2px;

    background: rgba(0, 242, 254, 0.2);

}



.timeline-step {

    position: relative;

    margin-bottom: 12px;

    display: flex;

    align-items: flex-start;

}



.timeline-step:last-child {

    margin-bottom: 0;

}



.step-dot {

    position: absolute;

    left: -17px;

    top: 3px;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #475569;

    border: 1px solid #1e293b;

}



.timeline-step.completed .step-dot {

    background: #00f2fe;

    box-shadow: 0 0 6px #00f2fe;

}



.timeline-step.active .step-dot {

    background: #ffc107;

    box-shadow: 0 0 6px #ffc107;

}



.step-info {

    display: flex;

    flex-direction: column;

}



.step-title {

    font-size: 0.75rem;

    font-family: 'Orbitron', sans-serif;

    color: #e2e8f0;

}



.timeline-step.completed .step-title {

    color: #00f2fe;

}



/* ==========================================================================

   ESTILOS DE LA VISTA DE DIRECCIONES (PANEL DE USUARIO)

   ========================================================================== */



/* Estado vacío en direcciones */

.user-panel-section .text-center.py-5.text-muted,

.user-panel-section .text-center.py-4.text-muted {

    background: rgba(0, 242, 254, 0.02);

    border: 1px dashed rgba(0, 242, 254, 0.2);

    border-radius: 8px;

    padding: 2.5rem 1rem !important;

}



.user-panel-section .text-center.py-5.text-muted i,

.user-panel-section .text-center.py-4.text-muted i {

    color: #00f2fe !important;

    opacity: 0.5;

}



.user-panel-section .text-center.py-5.text-muted p,

.user-panel-section .text-center.py-4.text-muted p {

    color: #94a3b8 !important;

    font-size: 0.95rem;

}



/* Tarjetas de direcciones */

.user-panel-section .card.bg-dark {

    background: rgba(15, 23, 42, 0.85) !important;

    border: 1px solid rgba(0, 242, 254, 0.2) !important;

    border-radius: 6px !important;

    transition: all 0.2s ease !important;

}



.user-panel-section .card.bg-dark:hover {

    border-color: rgba(0, 242, 254, 0.5) !important;

    background: rgba(15, 23, 42, 0.95) !important;

    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15) !important;

}



/* Tarjeta principal destacada */

.user-panel-section .card.border-primary {

    border-color: #00f2fe !important;

    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2) !important;

}



/* Títulos y textos dentro de la tarjeta de dirección */

.user-panel-section .card-title {

    font-family: 'Orbitron', sans-serif !important;

    font-size: 1.05rem !important;

    letter-spacing: 0.5px !important;

    color: #fff !important;

}



.user-panel-section .card-text {

    font-size: 0.92rem !important;

    color: #94a3b8 !important;

    line-height: 1.6;

}



.user-panel-section .card-text .text-light {

    color: #e2e8f0 !important;

}



/* Insignia de Dirección Principal */

.user-panel-section .badge.bg-primary {

    font-size: 0.75rem !important;

    padding: 0.4em 0.7em !important;

}



/* Pie de tarjeta (botones de acción internos) */

.user-panel-section .card-footer {

    border-top: 1px solid rgba(0, 242, 254, 0.1) !important;

    background-color: transparent !important;

    padding: 0.75rem 1rem !important;

}



/* Botón "Marcar principal" estilizado */

.user-panel-section .btn-set-principal {

    font-size: 0.8rem !important;

    font-family: 'Orbitron', sans-serif !important;

}



.user-panel-section .btn-set-principal:hover {

    background: #00f2fe !important;

    color: #030712 !important;

    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4) !important;

    border-color: #00f2fe !important;

}



/* Botón de eliminar dirección estilizado */

.user-panel-section .btn-eliminar-dir {

    font-size: 0.85rem !important;

    padding: 0.3rem 0.6rem !important;

    border-color: rgba(239, 68, 68, 0.4) !important;

    color: #ef4444 !important;

    background: transparent !important;

    transition: all 0.2s ease !important;

}



.user-panel-section .btn-eliminar-dir:hover {

    background: #ef4444 !important;

    color: #fff !important;

    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4) !important;

    border-color: #ef4444 !important;

}



/* Contenedor con scroll propio para las direcciones si hay varias */

#direcciones-content {

    max-height: 340px;

    overflow-y: auto;

    padding-right: 4px;

    overflow-x: hidden;

}



#direcciones-content::-webkit-scrollbar {

    width: 5px;

}



#direcciones-content::-webkit-scrollbar-track {

    background: rgba(15, 23, 42, 0.5);

}



#direcciones-content::-webkit-scrollbar-thumb {

    background: rgba(0, 242, 254, 0.3);

    border-radius: 3px;

}



#direcciones-content::-webkit-scrollbar-thumb:hover {

    background: rgba(0, 242, 254, 0.6);

}

/* Forzar estrictamente 2 tarjetas por renglón en la sección de direcciones */
#direcciones-content .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -8px;
    margin-left: -8px;
}

#direcciones-content .row > [class*="col-"] {
    flex: 0 0 48% !important;
    max-width: 50% !important;
    padding-right: 8px;
    padding-left: 8px;
}