/* Estilos para el panel de usuario - Box Courrier */

/* Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Estilos generales */
body {
    background-color: #f8f9fa;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    min-width: 320px;
    overflow-x: hidden;
}

main {
    padding-bottom: 3rem;
    width: 100%;
}

/* Contenedores principales */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.horizontal-nav {
    background-color: #212529;
}

/*#main-extended{
    height: 600px;
}*/

#shipment-list-mobile, #products-list-mobile{
    display: none;
}

#shipment-list-horizontal, #products-list-horizontal{
    display: flex;
}

/* Alertas */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.dashboard-alerts {
    margin-bottom: 1.5rem;
}

/* Alertas */
.alert {
    display: flex;
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.dashboard-alerts {
    margin-bottom: 1.5rem;
}

/* Escalado de contenedores según tamaño de pantalla */
@media screen and (max-width: 480px)  {
   /* Ocultar navegación horizontal y mostrar la versión móvil */
   .horizontal-nav {
    display: none !important;
    background-color: #212529;
    }

    .navbar {
        display: flex !important;
        flex-direction: row-reverse;
        justify-content: space-between;
        background-color: #212529;
    }

    .navbar .container-fluid {
        width: auto;
        margin: 0;
        padding: 0;
    }

    /* Estilo para el menú colapsable */
    .collapse {
        display: none;
    }

    .collapse.show {
        display: flex !important;
        width: 100%;
        background-color: #212529;
    }

    .links {
        width: 100%; /* Ancho completo en móviles pequeños */
        display: block;
    }

    /* Ajuste de los elementos de navegación */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 10px 0 15px 10px; /* Padding más reducido */
        margin-left: 10px; /* Margen más reducido */
        list-style-type: none;
    }

    .nav-links a {
        width: 100%;
        text-decoration: none;
        color: white;
        display: block;
    }

    .nav-links li {
        width: 100%;
        padding: 7px 3px; /* Padding más pequeño */
        margin: 0;
        list-style-type: disc !important;
        color: white;
        font-size: 16px; /* Tamaño de fuente más pequeño */
        font-weight: bold;
        text-align: left;
        display: list-item;
    }

    /* Para el elemento "Cerrar Sesión", aplicamos un color rojo */
    .nav-links a[href="/logout"] li {
        color: #dc3545;
    }

    /* Ajustes para el logo */
    .logo {
        margin-right: auto;
        transform: scale(0.85); /* Reducir más el tamaño del logo */
    }

    /* Estilo para el botón de toggle */
    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 3px 6px; /* Padding aún más pequeño */
        margin: 5px; /* Margen reducido */
    }

    /* Para el dropdown, que no se muestre en esta resolución */
    .dropdown-parent-mobile .submenu-mobile {
        display: none !important;
    }

    /* Box en color azul */
    .spanBox, a[href="/"] .nav-links li:first-child {
        color: #0d6efd;
    }

    /* Ajustes específicos para móviles muy pequeños */
    .navbar-toggler-icon {
        width: 1em;
        height: 1em;
    }

    .spanBox {
        font-size: 90%;
    }

    .spanCourrier {
        font-size: 90%;
    }


    #shipment-list-mobile, #products-list-mobile{
        display: flex;
    }

    #shipment-list-horizontal, #products-list-horizontal{
        display: none;
    }
}

@media screen and (min-width: 481px) and (max-width: 700px) {
    .horizontal-nav {
        display: none !important;
    }
    
    .navbar {
        display: flex !important;
        flex-direction: row-reverse;
        justify-content: space-between;
        background-color: #212529;
    }
    
    .navbar .container-fluid {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    /* Estilo para el menú colapsable */
    .collapse {
        display: none;
    }
    
    .collapse.show {
        display: flex !important;
        width: 100%;
        background-color: #212529;
    }
    
    .links {
        width: 80%;
        display: block;
    }
    
    /* Ajuste de los elementos de navegación */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 10px 0 20px 15px; /* Reducido ligeramente el padding */
        margin-left: 15px; /* Reducido el margen */
        list-style-type: none;
    }
    
    .nav-links a {
        width: 100%;
        text-decoration: none;
        color: white;
        display: block;
    }
    
    .nav-links li {
        width: 100%;
        padding: 8px 5px; /* Reducido el padding vertical */
        margin: 0;
        list-style-type: disc !important;
        color: white;
        font-size: 18px; /* Ligeramente más pequeño */
        font-weight: bold;
        text-align: left;
        display: list-item;
    }
    
    /* Para el elemento "Cerrar Sesión", aplicamos un color rojo */
    .nav-links a[href="/logout"] li {
        color: #dc3545;
    }
    
    /* Ajustes para el logo */
    .logo {
        margin-right: auto;
        transform: scale(0.9); /* Reducir ligeramente el tamaño del logo */
    }
    
    /* Estilo para el botón de toggle */
    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 4px 8px; /* Reducir el padding */
    }
    
    /* Para el dropdown, que no se muestre en esta resolución */
    .dropdown-parent-mobile .submenu-mobile {
        display: none !important;
    }
    
    /* Box en color azul */
    .spanBox, a[href="/"] .nav-links li:first-child {
        color: #0d6efd;
    }

    #shipment-list-mobile, #products-list-mobile{
        display: flex;
    }

    #shipment-list-horizontal, #products-list-horizontal{
        display: none;
    }
}

@media screen and (min-width: 701px) and (max-width: 999px){
    
    
    #shipment-list-mobile, #products-list-mobile{
        display: flex;
    }

    #shipment-list-horizontal, #products-list-horizontal{
        display: none;
    }
}

@media screen and (min-width: 701px) and (max-width: 1100px){
    /* Ocultar navegación horizontal y mostrar la versión móvil */
    .horizontal-nav {
        display: none !important;
    }
    
    .navbar {
        display: flex !important;
        flex-direction: row-reverse;
        justify-content: space-between;
        background-color: #212529; /* Color oscuro como en la segunda imagen */
    }
    
    .navbar .container-fluid {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    /* Estilo para el menú colapsable */
    .collapse {
        display: none;
    }
    
    .collapse.show {
        display: flex !important;
        width: 100%;
        background-color: #212529; /* Color de fondo oscuro como en la segunda imagen */
    }
    
    .links {
        width: 80%;
        display: block;
    }
    
    /* Ajuste de los elementos de navegación */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 10px 0 20px 20px; /* Padding izquierdo para alinear con los bullets */
        margin-left: 20px;
        list-style-type: none;
    }
    
    .nav-links a {
        width: 100%;
        text-decoration: none;
        color: white;
        display: block;
    }
    
    .nav-links li {
        width: 100%;
        padding: 10px 5px;
        margin: 0;
        list-style-type: disc !important; /* Cambiamos a disc para mostrar viñetas como en la imagen */
        color: white;
        font-size: 20px;
        font-weight: bold;
        text-align: left;
        display: list-item; /* Importante para mostrar los bullets */
    }
    
    /* Para el elemento "Cerrar Sesión", aplicamos un color rojo */
    .nav-links a[href="/#"] li {
        color: #dc3545;
    }
    
    /* Ajustes para el logo */
    .logo {
        margin-right: auto;
    }
    
    /* Estilo para el botón de toggle */
    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Para el dropdown, que no se muestre en esta resolución */
    .dropdown-parent-mobile .submenu-mobile {
        display: none !important;
    }
    
    /* Box en color azul */
    .spanBox, a[href="/"] .nav-links li:first-child {
        color: #0d6efd;
    }
}

@media (max-width: 575px) {

    #search-product{
        display: none;
    }
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}



/* Filas y columnas */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    width: 100%;
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #0d6efd;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-avatar-overlay:hover {
    background-color: #0b5ed7;
}

/* Navbar personalizado */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
}

.navbar .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

.navbar .logo {
    display: flex;
}

.navbar-brand {
    display: flex;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    white-space: nowrap;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: white;
    font-weight: 500;
}

/* Títulos de sección */
.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.welcome-title span {
    color: var(--primary-color);
}

/* Cards del dashboard */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    width: 100%;
}

.card-header {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.dashboard-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 0.5rem;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Tablas */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th {
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    vertical-align: bottom;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badge para estados */
.badge {
    display: inline-block;
    padding: 0.4em 0.6em;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* Botones */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Formularios */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

/* Footer */
footer.bg-dark {
    background-color: var(--dark-color);
    padding: 2rem 0;
}

footer.text-white {
    color: white;
}

/* WhatsApp flotante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    background-color: #1ab152;
    color: white;
}

.whatsapp-icon {
    margin-top: 0;
}

/* Perfil de usuario */
.profile-image {
    color: var(--primary-color);
    font-size: 6rem;
    margin-bottom: 1rem;
}

/* Modales */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Detalles de productos */
.product-details p {
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

/* Estilos para responsive */
@media (max-width: 768px) {
    .page-title, .welcome-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle, .welcome-subtitle {
        font-size: 0.9rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
        font-size: 25px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-card, .card {
    animation: fadeIn 0.5s ease-out;
}

.dashboard-card:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-card:nth-child(3) {
    animation-delay: 0.2s;
}

.dashboard-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Helpers */
.fw-bold {
    font-weight: 700 !important;
}

.text-center {
    text-align: center !important;
}

.text-md-end {
    text-align: right !important;
}

.h-100 {
    height: 100% !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Texto Logo */
.spanBox {
    color: var(--primary-color);
    font-weight: bold;
}

.spanCourrier {
    color: white;
    font-weight: normal;
}

/* Ensure small screens don't cause horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.links {
    background-color: #212529;
}


