﻿@font-face {
    font-family: 'nexa book';
    src: url('/fonts/nexa-book.ttf') format('truetype');
    font-weight: normal;
}

:root {
    --primary-color: #009640;
    --secondary-color: #DF1995;
    --tertiary-color: #efefef;
    --white-color: #ffffff;
    --sidebar-width: 280px;
    --topbar-height: 60px;
}

html, body {
    font-family: 'nexa book', sans-serif;
    margin: 0;
    height: 100%;
    min-height: 100svh;
}

.w-500px {
    width: 500px !important;
}

.w-65 {
    width: 65% !important;
}

.w-110px {
    width: 110px !important;
}

.box-shadow {
    box-shadow: 0 0 5px 2px gray;
}

.fs-12px {
    font-size: 12px !important;
}

.fs-10px {
    font-size: 10px !important;
}

.border-radius-5px {
    border-radius: 5px;
}

.w-35 {
    width: 35% !important;
}

.bg-gray-light {
    background: #F9F8F9 !important;
}

.border-gray {
    border: 1px solid gray;
}

.btn-accion {
    width: 70px;
    height: 70px;
    font-size: 34px;
    background: transparent;
    border: none;
    color: rgb(0, 150,64);
}

.h-100 {
    height: 100% !important;
}

.h-140px {
    height: 140px !important;
}

.h-165px {
    height: 165px !important;
}

.h-250px {
    height: 250px !important;
}

.mt-1px {
    margin-top: 1px !important;
}

.btn-iconos:hover {
    background: white;
    color: black;
}

.servicios-detalle :hover {
    cursor: pointer;
    color: rgb(0,150,64);
}

body {
    background: url('/imagen/fondo_emprendedores.webp') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    margin: 0;
    min-height: 100vh;
    /*font-family: 'Inter', sans-serif;*/
}

    body.orders-page {
        background: url('https://images.unsplash.com/photo-1580674285054-bed31e145f59?q=80&w=2000&auto=format&fit=crop&ixlib=rb-4.0.1') no-repeat center center fixed;
        background-size: cover;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.92);
        z-index: -1;
    }

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--white-color);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    background: var(--white-color);
    color: var(--primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: 1rem;
}


.user-profile {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    /*background: var(--tertiary-color);*/
    overflow: hidden;
}

    .profile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border: 4px solid var(--white-color);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

.upload-overlay {
    position: absolute;
    bottom: 0;
    right: 45px;
    width: 32px;
    height: 32px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .upload-overlay:hover {
        transform: scale(1.1);
    }

.user-info {
    padding: 0 1rem;
}

.user-name {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.user-role {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .menu-link i {
        margin-right: 0.75rem;
        font-size: 1.2rem;
        color: #00A651;
    }

    .menu-link:hover, .menu-link.active {
        background: rgba(0, 150, 64, 0.1);
        color: var(--primary-color);
    }

.submenu-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.menu-item .collapse.show + .submenu-icon {
    transform: rotate(-180deg);
}

.submenu {
    list-style: none;
    padding: 0.5rem 0 0.5rem 3.5rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.02);
}

    .submenu a {
        display: flex;
        align-items: center;
        padding: 0.5rem 1rem;
        color: #666;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .submenu a i {
            font-size: 0.5rem;
            margin-right: 0.75rem;
        }

        .submenu a:hover, .submenu a.active {
            color: var(--secondary-color);
            background: rgba(223, 25, 149, 0.05);
            border-radius: 4px;
        }

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.top-navbar {
    height: var(--topbar-height);
    background: var(--white-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

    .top-navbar .btn-link {
        color: var(--primary-color);
        padding: 0.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

        .top-navbar .btn-link:hover {
            background: rgba(0, 150, 64, 0.1);
        }

    .top-navbar .user-welcome {
        color: var(--primary-color);
        font-weight: 500;
    }

    .top-navbar .dropdown-toggle::after {
        display: none;
    }

    .top-navbar .dropdown-toggle img {
        width: 32px;
        height: 32px;
        object-fit: cover;
    }



.dropdown-menu {
    position: absolute !important;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    z-index: 9999 !important;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .dropdown-item:hover {
        background: rgba(223, 25, 149, 0.05);
        color: var(--secondary-color);
    }

.content-wrapper {
    padding: 2rem;
}

/* Profile Page Styles */
.profile-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
}

.profile-photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-upload-label {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

    .photo-upload-label:hover {
        transform: scale(1.1);
    }

.page-header {
    /*background: var(--white-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);*/
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important; /* izquierda | centro | derecha */
    align-items: center !important;
    column-gap: 16px !important;
}

.header-content h1 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content h2 {
    color: #00A651;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: bold;
}

.header-content h3 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filters-toggle {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

    .filters-toggle:hover {
        color: #be157f;
    }

.filters-panel {
    background: var(--white-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /*border-left: 4px solid var(--secondary-color);*/
}

.orders-container {
    background: var(--white-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0 0.8rem;
}

    .table th {
        background: var(--white-color);
        color: var(--primary-color);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 1rem;
        border: none;
        font-size: 13px;
        text-align:center;
    }

    .table td {
        /*padding: 1.25rem 1rem;*/
        vertical-align: middle;
        background: #f8f9fa;
        border: none;
        transition: all 0.3s ease;
        text-align: center;
        font-size: 13px;
    }

    .table tr td:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .table tr td:last-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .table tr:hover td {
        background: rgba(0, 0, 0, 0.05);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

.badge {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

    .badge.bg-pending {
        background-color: var(--secondary-color);
    }

    .badge.bg-gray {
        background-color: #6c757d;
        color: black !important;
    }

.bg-gray span {
}

.badge.bg-processing {
    background-color: #ffc107;
}

.badge.bg-completed {
    background-color: var(--primary-color);
}

.badge.bg-cancelled {
    background-color: #dc3545;
}

.btn-sm.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-sm.btn-primary:hover {
        background-color: #be157f;
        border-color: #be157f;
        transform: translateY(-1px);
    }

.btn-sm.btn-secondary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-sm.btn-secondary:hover {
        background-color: #36762c;
        border-color: #36762c;
        transform: translateY(-1px);
    }

.btn-sm.btn-third {
    background-color: black;
    border-color: black;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    color: white;
    gap: 0.5rem;
}

    .btn-sm.btn-third:hover {
        background-color: gray;
        border-color: gray;
        transform: translateY(-1px);
    }

.btn-sm.btn-fourth {
    background-color: gray;
    border-color: gray;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    color: white;
    gap: 0.5rem;
}

.bg-fuxia {
    background: var(--secondary-color) !important;
}

.bg-gray {
    background: var(--tertiary-color) !important;
}

.btn-sm.btn-fourth:hover {
    background-color: lightgray;
    border-color: lightgray;
    transform: translateY(-1px);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .page-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 19px !important;
        text-align: center;
    }
}

/* Login and Password Recovery Styles */
.login-container {
    position: relative;
    z-index: 1;
}

.corporate-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-label {
    /*font-weight: bold;
    color: #00A651;
    margin-bottom: 0.5rem;*/
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-label1 {
    font-weight: bold;
    color: #00A651;
    margin-bottom: 0.5rem;
}

.modal {
    z-index: 1052 !important; /* Bootstrap maneja los modales en 1050, esto asegura que esté arriba */
}

.modal-backdrop {
    z-index: 1051 !important; /* El fondo oscuro debe estar por debajo del modal */
}

.modal-dialog {
    position: relative;
}

.form-ctrl {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    padding-left: 0.75rem;
    font-size: 1rem;
    font-weight: 400;   
    line-height: 1.5;
    color: var(--bs-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

    .form-ctrl:focus {
        color: var(--bs-body-color);
        background-color: none;
        border-color: black !important;
        outline: 0;
        box-shadow: 0 0 0 .5px rgba(0,150,64,.08) !important;
    }

.bck-green {
    background: rgb(0, 150, 64) !important;
}

.nombre-sucursal {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.direccion-recortada {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
}

#filtersContainer .row.g-3 {
    margin-left: 0 !important;
    margin-right: -160px !important;
}

.text-muted {
    color: #333 !important;
}

/*h6{
    color:#00A651;
}*/

/*PRIMER ESTILO RESPONSIVE APLICADO A LA VISTA INDEX.CSHTML*/
.banner-container {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    height: auto;
    max-height: 100vh;
    position: relative;
}

.banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .filters-panel {
        margin-left: -25px !important;
    }

    .banner-container {
        max-height: 60vh;
    }

    .banner-image {
        width: 100%;
        height: 455px;
        margin-left: -10px;
    }

    /*  Sidebar ocupa toda la pantalla (tipo overlay) */
    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--white-color);
        z-index: 1000 !important;
        transform: translateX(-100%); /* Oculto inicialmente */
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    /*  Cuando el body tiene la clase que tu JS activa */
    body.sidebar-collapsed .sidebar {
        transform: translateX(0); /* Se muestra el menú */
    }

    .sidebar-overlay {
        display: none; /*Sidebar-overlay estilo para el overlay*/
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    body.sidebar-collapsed .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    /*  El top-navbar siempre fijo arriba */
    .navbar,
    .header {
        position: fixed;
        top: -60px;
        left: 0;
        right: 0;
        height: var(--topbar-height, 60px);
        background: var(--white-color);
        z-index: 1050;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    .top-navbar {
        position: fixed !important;
        top: 0 !important; /* antes lo tenías en -60px */
        left: 0;
        right: 0;
        height: var(--topbar-height, 60px);
        z-index: 1050;
    }

    /* 2) En vez de margin-top (que crea hueco), usa padding-top (reserva espacio) */
    .main-content {
        margin-top: 0 !important; /* elimina el “espacio grande” */
        padding-top: var(--topbar-height, 60px) !important; /* evita que se tape arriba */
        width: 100% !important; /* evita el 102% que puede generar scroll lateral */
    }

        /*  Evita que el contenido se haga más angosto */
        .main-content > * {
            width: 100%;
        }

    /* 3) El wrapper interno que antes tenía padding grande, más compacto */
    .content-wrapper {
        padding-top: 12px !important;
    }
}



@media (max-width: 480px) {
    .banner-container {
        max-height: 50vh;
    }

    .banner-image {
        width: 110%;
        height: 500px;
        margin-left: -40px;
    }
}

/*FILTROS EESTADO Y DESTINO*/
/* ================================
   FILTROS HEADER: Estado / Destino
   (Solo afecta <th class="th-filter">)
================================ */
th.th-filter {
    vertical-align: middle;
    min-width: 163px; /* ajusta si quieres más ancho */
}

    th.th-filter:not(.is-open) .th-filter__wrap {
        flex-direction: row; /* ya no columna */
        justify-content: center;
        align-items: center;
        gap: .35rem;
    }

    /* En cerrado, el head no debe ocupar “bloque” */
    th.th-filter:not(.is-open) .th-filter__head {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
    }

    /* Oculta la bandeja en cerrado, aunque exista el d-none */
    th.th-filter:not(.is-open) .th-filter__body {
        display: none !important;
    }

    /* ===== MODO ABIERTO: título arriba y bandeja debajo ===== */
    th.th-filter.is-open {
        vertical-align: top; /*  porque ya habrá contenido abajo */
    }

        th.th-filter.is-open .th-filter__wrap {
            flex-direction: column;
            gap: .25rem;
            align-items: center;
        }

    th.th-filter .th-filter__wrap {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }

    th.th-filter .th-filter__title {
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: var(--primary-color);
        font-size: 13px;
    }

    /* fila en una sola línea */
    th.th-filter .th-filter__row {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
        justify-content: center;
    }

    /* input compacto y consistente */
    th.th-filter .th-filter__input {
        width: 100%;
        max-width: 260px;
        height: 34px;
        padding: 0.35rem 0.6rem;
        border-radius: 10px;
    }

    /* botones pequeños cuadrados, alineados */
    th.th-filter .th-filter__btn {
        height: 34px;
        width: 34px;
        padding: 0;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #e0e0e0;
        background: #fff;
        transition: all 0.2s ease;
    }

    /* botón X (limpiar) */
    th.th-filter .th-filter__btn--clear {
        color: #6c757d;
    }

        th.th-filter .th-filter__btn--clear:hover {
            background: rgba(108,117,125,.08);
        }

    /* botón filtro (verde Servi) */
    th.th-filter .th-filter__btn--apply {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #fff;
    }

        th.th-filter .th-filter__btn--apply:hover {
            filter: brightness(0.95);
            transform: translateY(-1px);
        }

    /* Solo afecta a Estado/Destino */
    th.th-filter .th-filter__combo {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: center;
    }

    th.th-filter .th-filter__dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 100%;
        max-height: 220px;
        overflow: auto;
        background: #fff;
        border: 1px solid #e7e7e7;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,.10);
        z-index: 9999;
        padding: 6px;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }

    th.th-filter .th-filter__option {
        padding: 8px 10px;
        border-radius: 10px;
        cursor: pointer;
        color: #525252; /* letras negras/grises */
        background: transparent;
        font-size: .9rem;
        line-height: 1.2;
    }

        th.th-filter .th-filter__option:hover {
            background: rgba(0,150,64,.08);
        }

    th.th-filter .th-filter__option--muted {
        color: #6c757d;
        cursor: default;
    }

    th.th-filter .th-filter__dropdown::-webkit-scrollbar {
        width: 10px;
    }

    th.th-filter .th-filter__dropdown::-webkit-scrollbar-thumb {
        background: #e2e2e2;
        border-radius: 10px;
    }

    /* Botón flecha - elegante (sin recuadro) */
    th.th-filter .th-filter__toggle {
        width: 28px;
        height: 28px;
        border: 0 !important;
        background: transparent !important;
        padding: 0;
        border-radius: 999px; /* por si quieres hover circular */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #009640; /* 👈 Servi green */
        cursor: pointer;
        transition: transform .18s ease, background-color .18s ease, opacity .18s ease;
        opacity: .95;
    }

        /* Ícono un poco más marcado */
        th.th-filter .th-filter__toggle i {
            font-size: 18px;
            line-height: 1;
            transition: transform .18s ease; /* rotación suave */
        }

        /* Hover elegante */
        th.th-filter .th-filter__toggle:hover {
            background: rgba(0,150,64,.10) !important;
            opacity: 1;
        }

        /* Focus accesible */
        th.th-filter .th-filter__toggle:focus-visible {
            outline: 2px solid rgba(0,150,64,.35);
            outline-offset: 2px;
        }

        /* Cuando está abierto: la flecha apunta hacia arriba */
        th.th-filter .th-filter__toggle.is-open i {
            transform: rotate(180deg);
        }


/* Responsive: si el espacio se pone muy justo, permite wrap sin desorden */
@media (max-width: 768px) {

    body {
        background: #ffffff !important;
    }

        body::before,
        body::after,
        html::before,
        html::after {
            display: none !important;
        }
    th.th-filter {
        min-width: 200px;
    }

        th.th-filter .th-filter__row {
            flex-wrap: wrap;
            justify-content: center;
        }

        th.th-filter .th-filter__input {
            max-width: 100%;
        }

    .consultar-por-header {
        text-align: left !important;
        align-items: flex-start !important;
    }

    .consultar-por__modes {
        justify-content: flex-start !important;
        gap: 14px !important;
    }

    .page-header .header-content {
        text-align: left !important;
    }

        .page-header .header-content p {
            text-align: left !important; /* NO justificado */
            max-width: 32ch; /* opcional: evita líneas larguísimas */
        }
    .page-header {
        grid-template-columns: 1fr !important;
        row-gap: 10px !important;
        align-items: start !important;
    }

    .header-content h2 {
        font-size: 1.25rem; /* reduce un poco en móvil */
        justify-content: flex-start;
        align-items: center;
        line-height: 1.15;
    }

        /* Icono: mismo “baseline” visual del texto */
        .header-content h2 i {
            font-size: 1.15em;
            line-height: 1;
            transform: translateY(1px);
        }

    .consultar-por-header {
        margin-right: 0 !important; /* quita el -70px en móvil */
        text-align: left !important;
    }

        .consultar-por-header .form-label1 {
            font-size: 1.15rem !important;
            margin-top: 0 !important;
        }

        .consultar-por-header .consultar-por__mode span {
            font-size: .98rem;
        }
}

/*AJUSTES DE OPCIONES PARA FILTRAR LA BÚSQUEDA*/
.consultar-por__banner {
    width: 100%;
    border: 1px solid rgba(0, 150, 64, .35);
    background: rgba(0, 150, 64, .06);
    color: #009640;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    cursor: pointer;
}

.consultar-por__label {
    font-weight: 700;
}

.consultar-por__hint {
    font-size: .9rem;
    opacity: .85;
    margin-left: auto;
    margin-right: 8px;
}

.consultar-por__icon {
    transition: transform .18s ease;
}

.consultar-por__panel {
    border: 1px solid rgba(0, 150, 64, .18);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    background: #fff;
}

.consultar-por__modes {
    display: flex;
    align-items: center;
    gap: 16px;
}

.consultar-por__mode {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    cursor: pointer;
}

.consultar-por__close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #009640;
    padding: 6px 8px;
    border-radius: 10px;
}

    .consultar-por__close:hover {
        background: rgba(0,150,64,.08);
    }


.consultar-por__modes {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
}

.consultar-por__mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}


/* Contenedor de "Consultar por" en el header */
.consultar-por-header {
    /* lo separa del borde derecho y lo "centra" un poco */
    margin-right: -70px; /* ajusta 60-120px según te guste */
    text-align: right;
}

    /* Label "Consultar por:" más grande */
    .consultar-por-header .form-label1 {
        font-size: 1.5rem; /* sube a 1.1rem si lo quieres más grande */
        font-weight: bold;
        margin-top: -20px;
    }

    /* Radios + texto en la misma fila, más grandes */
    .consultar-por-header .consultar-por__mode span {
        font-size: 1.02rem;
    }

    /* Radio un poquito más grande (Bootstrap) */
    .consultar-por-header .form-check-input {
        transform: scale(1.08);
        margin-top: 0.15rem;
    }

    /* X alineada y del mismo “peso visual” */
    .consultar-por-header .consultar-por__close {
        transform: scale(1.05);
    }

/* En pantallas pequeñas, que NO quede con margen raro */
@media (max-width: 992px) {
    .consultar-por-header {
        margin-right: 0;
        text-align: left;
    }
}

/* 1) Todos los labels en la fila tienen la misma altura */
.filter-label{
  min-height: 24px;     /* ajusta 20-26px según tu fuente */
  display: flex;
  align-items: center;
  margin-bottom: 10px;   /* consistente */
  gap: 5px;
}

/* 2) Contenido debajo del label empieza en el mismo baseline */
.filter-block{
  display: flex;
  flex-direction: column;
}

/* 3) Para que "Tipo de búsqueda" no quede más abajo por el mt-2 */
.tipo-busqueda-row{
  margin-top: 15px !important;
}

/* Alinea el contenido de Tipo con los inputs (porque los radios suelen quedar “más arriba”) */
.filter-block .form-check {
    display: inline-flex;
    align-items: center;
    margin: 0;
    gap: 5px !important;
}

/* Ajuste fino: centra verticalmente radio con texto */
.filter-block .form-check-input {
    margin-top: 0; /* bootstrap a veces pone margen */
}

.form-check-input:checked {
    background-color: #009640 !important;
    border-color: #009640 !important;
}

#numero_guia:focus {
    border-color: #009640 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 150, 64, 0.25) !important;
}

#bloqueFechas input[type="date"].form-control:focus {
    border-color: #009640 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 150, 64, 0.25) !important;
}

/* Clave: cada input dentro del flex debe ser flexible (no 100% rígido) */
#bloqueFechas input[type="date"].form-control {
    flex: 1 1 0; /* cada uno ocupa mitad */
    min-width: 0; /* permite encoger sin desbordar */
    width: auto !important; /* anula el 100% dentro de flex */
}

/* Desktop grande (laptops y monitores) */
@media (min-width: 992px) {

    .bloque-fechas-ajustado {
        margin-right: -45px;
        margin-left: -45px;
    }
}

/* Pantallas extra grandes (monitores 24"+) */
@media (min-width: 1200px) {

    .bloque-fechas-ajustado {
        margin-right: 65px;
        margin-left: -65px;
    }
}

/* Mobile y tablet → sin desplazamiento */
@media (max-width: 991px) {

    .bloque-fechas-ajustado {
        margin-right: 0;
        margin-left: 0;
    }
}

/*UBICACIÓN DE LOS BOTONES BUSCR Y EXPORTAR*/
.pt-md-custom {
    padding-top: 2.5rem !important;
    gap: .5rem !important;
}

.bloque-fechas-ajustado {
    min-width: 0;
}

/* El contenedor de los 2 date: que SÍ permita encoger y no empuje hacia fuera */
#bloqueFechas .d-flex {
    flex-wrap: nowrap; /* se quedan en una fila */
    min-width: 0;
}


/* Si en pantallas MUY angostas quieres que se apilen */
@media (max-width: 360px) {
    #bloqueFechas .d-flex {
        flex-wrap: wrap;
    }

    #bloqueFechas input[type="date"].form-control {
        flex: 0 0 100%;
        width: 100% !important;
    }
}

/* ================================
   FIX iPhone: fila Tipo más compacta
   ================================ */
@media (max-width: 480px) {
    .tipo-busqueda-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.65rem 0.9rem !important;
        margin-top: 10px !important;
    }

        .tipo-busqueda-row .form-check-label {
            font-size: 13px;
        }
}

/* Asegura alineación vertical y espacio uniforme en todos los radios */
.filters-panel .form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* separación radio-texto */
    margin: 0;
}

/* Evita que el input “suba/baje” raro y dale un pequeño margen */
.filters-panel .form-check-input {
  margin: 0 !important;     /* anulamos el margin-left default */
  transform: translateY(1px);
}

/* Labels sin salto raro */
.filters-panel .form-check-label {
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;      /* Remitente/Destinatario/Todos en una sola línea */
}


/* ================================
   09/03/2026 ALINEAR BÚSQUEDA
   ================================ */
.tipo-busqueda-row {
    display: grid !important;
    grid-template-columns: repeat(3, max-content);
    align-items: center !important;
    column-gap: 22px;
    row-gap: 0;
    width: 100%;
    margin-top: 15px !important;
    justify-content: start; /* arranca desde la izquierda */
}

    .tipo-busqueda-row .form-check {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px;
        margin: 0 !important;
        padding-left: 0 !important; /* quita sangría Bootstrap */
        min-width: 0;
    }

    .tipo-busqueda-row .form-check-input {
        margin: 0 !important; /* evita desplazamiento raro */
        position: static !important; /* neutraliza posicionamiento Bootstrap */
        float: none !important;
    }

    .tipo-busqueda-row .form-check-label {
        white-space: nowrap;
        margin: 0 !important;
    }

/* Resoluciones intermedias: compactar un poco */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .tipo-busqueda-row {
        gap: 0.9rem !important;
    }

        .tipo-busqueda-row .form-check-label {
            font-size: 0.95rem;
        }
}

/* Solo en móvil sí dejamos que se acomode */
@media (max-width: 767.98px) {
    .tipo-busqueda-row {
        flex-wrap: wrap !important;
        gap: 0.75rem 1rem !important;
    }
}

/* Radios del bloque de filtros */
.form-check-input[type="radio"] {
    border: 2px solid #525252; /* borde más visible */
    width: 18px;
    height: 18px;
    cursor: pointer;
}