/* Layout 100% viewport - Sobrescribe Material Dashboard */
html, body {
    height: 100%;
    width: 100%;
    max-width: 100vw !important;
    margin: 0;
    overflow-x: hidden;
}

body.g-sidenav-show #app,
#app {
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
}

/* Main content debe ocupar todo el espacio disponible */
main.main-content,
body.g-sidenav-show .main-content,
#app .main-content {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100% !important;
    max-width: none !important;
}

/* A partir de 1200px Material Dashboard pone margin-left: 15rem al main;
   el ancho efectivo ya es correcto, pero aseguramos que el contenido interior
   use todo el espacio */

#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#main-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#main-card .card-body {
    flex: 1;
    overflow: auto;
}

#main-card .card-body,
#main-body {
    width: 100%;
}

.main-content {
    width: 100% !important;
    max-width: none !important;
}

.container-fluid.messages,
.container-fluid#main-container,
#main-container.container-fluid,
.main-content .container-fluid {
    max-width: none !important;
    width: 100% !important;
    padding-left: 1rem;
    padding-right: 1rem;
}

#main-card,
#main-card .card,
#main-card .card-body {
    max-width: none !important;
    width: 100% !important;
}

/* Tablas: ancho del contenedor, sin overflow innecesario */
.table-responsive {
    width: 100% !important;
    overflow-x: auto; /* Solo scroll si el contenido es realmente más ancho */
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table,
.table-responsive table,
.footable,
table.table {
    width: 100% !important;
    max-width: 100%; /* No superar el contenedor */
    margin-bottom: 0;
}

/* Forzar ancho completo - override Material Dashboard */

#main-container,
#main-card,
#main-body,
.main-content > * {
    max-width: none !important;
}

/* Evitar que el contenido se centre con márgenes */
#main-card.card {
    margin-left: 0;
    margin-right: 0;
}

/* A 1200px+ el sidenav ocupa ~15rem; el main debe usar todo el espacio restante */
@media (min-width: 1200px) {
    body.g-sidenav-show main.main-content,
    .sidenav.fixed-start + main.main-content {
        flex: 1 1 0%;
        min-width: 0;
        width: 100% !important;
        max-width: none !important;
    }
}

.form-group{
    position: relative
}

.card{
    word-break: normal;
    max-width: none !important;
}

#remitente{
    width: 100%!important
}

.btn-check:focus+.btn-outline-success, .btn-outline-success:focus,
.btn-check:focus+.btn-outline-info, .btn-outline-info:focus,
.btn-check:focus+.btn-outline-danger, .btn-outline-danger:focus {
    box-shadow: none
}

.btn-check:checked+.btn-outline-success,
.btn-check:checked+.btn-outline-info,
.btn-check:checked+.btn-outline-danger{
    color: #fff
}

.toast-container{
    z-index: 9999
}

.ptop{
    padding-top: 0.8rem
}

.card-title {
    margin-bottom: .8rem;
}

.text-info.h2{
    line-height: 1
}

.text-info.h2 .material-symbols-outlined{
    font-size: 30px
}

.box-body{
    margin-bottom: 1rem
}

.box-show label{
    display: block;
    margin-left: 0;
    color: #7b809a
}

.box-show {
    color: #000
}

.border-box{
    border: 1px solid #ddd
}

.border-box h4{
    line-height: 1
}

#main-body nav.d-flex{
    margin-top: 3rem
}


.form-control, .form-control:focus {
    border: 1px solid #d2d6da;
    padding: .625rem .75rem;
}

.form-group input:not(.form-check-input), .form-group select,
.form-group textarea{
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.4rem;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d2d6da;
    appearance: none;
    border-radius: .375rem;
    transition: .2s ease;
}


.form-group input:not(.form-check-input):focus, .form-group select:focus,
.form-group textarea:focus{
    box-shadow: 0 0 6px 1px rgba(99,179,237,.3);
    outline: 0
}

.form-control:disabled, .form-control[readonly] {
    background-color: #e9ecef!important
}

.nav-link{
    color: #e53935
}

.btn-outline-primary {
    color: #e53935;
    border-color: #e53935;
}

.cont-action {
    display: none;
    font-size: 13px; 
    position: absolute;
    left: 0.5rem;
    bottom: 0;
    transition: all .2s linear
}

.cont-action span{ 
    color: #000
}


.btn-link{
    padding: 0;
    line-height: 1;
    border: 0;
    background-color: transparent;
    margin-bottom: 0
}

tr:hover .cont-action{
    display: block
}


.toast-header .btn-close{
    margin-bottom: 0
}

.daterangepicker .drp-buttons .btn{
    margin-bottom: 0
}


.btn-outline-info:hover{
    color: #fff!important
}

.show-data .form-group .ws span{
    width: 100%;
}

.navbar-main{
    top: 0.000001rem!important;
}

.table-hover.footable>tbody>tr:hover{
    cursor: pointer
}

.filter .text-start input, button{
    display: inline-block;
    margin-bottom: 1rem;
    width: auto;
    vertical-align: middle

}

.navbar-main .btn-sm{
    font-size: 12px
}

.form-inline > *{
    display: inline-block;
    vertical-align: middle;
    width: auto;
    margin-bottom: 1rem
}

#reportrange:hover{
    cursor: pointer
}

#reportrange{
    min-width: 200px;
    align-items: center
}

#reportrange span{
    flex: 1;
    text-align: center
}

.btn{
    line-height: 22px
}

.btn i{
    line-height: 20px;
}

.daterangepicker .drp-buttons .btn:disabled{
    background-color: var(--bs-secondary);
    color: #fff
}

.btn-block{
    width: 100%
}

.precio-unitario, .precio-total{
    white-space: nowrap!important
}

#main-card .card-body .d-flex.gap-5.mb-4{
    justify-content: space-between
}

.navbar-vertical .nav-item .nav-link span.sidenav-mini-icon{
    min-width: auto
}


.show-data .form-group {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px dashed #ddd;
    padding-bottom: .8rem;
    padding-top: .8rem;
    margin-bottom: 0!important;
}


.show-data .form-group strong{
    flex: 0 0 auto;
    width: 25%;
}


.show-data .form-group > span{
    flex: 0 0 auto;
    width: 75%;
}


.show-data.ajuste .form-group strong{
    flex: 0 0 auto;
    width: 40%;
}


.show-data.ajuste .form-group span{
    flex: 0 0 auto;
    width: 60%;
}

.show-data.ajuste .form-group{
    border: 0;
    padding-top: .3rem;
    padding-bottom: .3rem;
}

.product-show .show-data .form-group strong{
    flex: 0 0 auto;
    width: 40%;
}


.product-show .show-data .form-group span{
    flex: 0 0 auto;
    width: 60%;
}


.form-switch .form-check-input:checked {
    border-color: var(--bs-success);
    background-color: var(--bs-success);
}

.form-switch .form-check-input:checked:after {
    border-color: var(--bs-success);
}

.select2 *{
    box-shadow: none!important
}

.select2-container{
    max-width: 100%
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder{
    color: #aaa;
    font-size: .875rem
}

.table thead.movimiento{
    background-color: var(--bs-gray-400)
}

.table thead.movimiento th {
    color: #333!important;
    opacity: 1!important;
}

#tabla-articulos input[type="number"]{
    max-width: 65px
}

.btn-close{
    opacity: 1;
    filter: invert(1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e")
}

#toast-title{
    text-transform: capitalize;
    color: #fff
}

.select2-container--bootstrap-5 .select2-selection--single{
    padding-top: .625rem;
    padding-bottom: .625rem;
    height: auto
}


.select2-selection.select2-selection--single{
    padding-left: 40px;
}

.select2.select2-container:before{
    content: "";
    position: absolute;
    opacity: .8;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Im0yMSAyMS00LTQiLz48L3N2Zz4=");
    background-position:6px;
    background-size: auto;
    background-repeat:no-repeat;
    width: 30px;
    height: 30px
}

.form-group .form-control{
    border: 1px solid #d2d6da;
    padding: .625rem .75rem
}




.table-total .form-group .descuento{
    max-width: 65px;
    padding-top: 2px;
    padding-bottom: 2px;
}

#tabla-articulos .form-group .form-control{
    padding: .325rem .65rem
}


.form-group  input[type="number"].form-control{
    padding-right: 0!important
}

.invalid-feedback{
    line-height: 1.1
}


.btn-0{
    border: 0;
    background-color: transparent
}

.btn-null{
    border: 0;
    background-color: transparent;
}


.thumb,
svg.icon.icon-picture {
    height: 40px;
    width: 40px;
    fill: #ccc;
}


.full-img img, .full-img svg{
    max-width: 100%;
    width: 100%
}


.product-show .form-group{
    margin-bottom: 0.5rem
}


.btn-file {
    position: relative;
    overflow: hidden;
}
.btn-file input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    background: white;
    cursor: inherit;
    display: block;
}

.form-group > label{
    margin-bottom: 0
}


td form{
    display: inline-block
}


.card-title,
#card_title{
    line-height: 1
}

.material-symbols-outlined{
    vertical-align: middle
}

.navbar-vertical.navbar-expand-xs .navbar-collapse{
    min-height: 220px;
    height:auto;
}

.add-remove-item:before{
    content: "\e147";
    top: 4px;
    position: relative;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

span[aria-expanded="true"] .add-remove-item:before{
    content: "\e644";
}

.navbar-vertical.navbar-expand-xs .navbar-collapse{
    overflow:  initial
}

.btn-sm{
    padding: .375rem
}

.alert p{
    margin-bottom: 0
}

input[type="file"]:focus,
input[type="file"]:active,
input[type="file"]{
    border: 1px solid #d2d6da
}

.pagination {
    gap: 5px;
}

/* Paginación: evitar que las flechas se salgan del cuadro */
.pagination .page-link {
    min-width: 2.25rem;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.btn-group-sm>.btn i, .btn.btn-sm i{
    font-size: 24px
}

table>tbody>tr>td>span.footable-toggle:before{
    content: "";
    color: #4caf50;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}



/*.table td, .table th{
    white-space: normal
}*/

/*.footable-row-detail .footable-row-detail-cell .footable-row-detail-inner > div:last-child{
    order:-1
}*/
.footable-row-detail .footable-row-detail-cell .footable-row-detail-inner{
    display: grid;
}

.footable.breakpoint > tbody > tr > td > span.footable-toggle:before {
    content: "\e147";
}

.footable.breakpoint > tbody > tr.footable-detail-show > td > span.footable-toggle:before {
    content: "\e644";
}

.footable-row-detail-inner {
    display: table;
}

.footable-row-detail-row {
    display: table-row;
    line-height: 1.5em;
}

table.footable>tbody>tr>td.footable-row-detail-cell{
    display: table-cell
}

.footable-row-detail-name {
    display: table-cell;
    font-weight: bold;
    padding-right: 0.5em;
}

table>tbody>tr>td>span.footable-toggle{
    opacity: 1;
    vertical-align: middle;
}

textarea.form-control{
    max-height: 80px
}


.page-item.active .page-link {
    background-color: #FFA000;
    border-color: #FFA000;
}

.btn-link, .btn-link:hover{
    color: #FFA000
}

.bg-gradient-danger {
    background-image: linear-gradient(195deg,#ef5350,#e53935)!important;
}

.text-primary {
    color: #FFA000!important;
}


.nav-item ul {
    margin-bottom: 10px
}

.nav-item ul li a.active:after {
    bottom: -3px
}

.nav-item ul li a:after {
    content: "";
    position: absolute;
    bottom: 0;
    width: calc(100%);
    left: 0;
    height: 1px;
    background-color: #444;
}


.navbar-vertical .nav-item .nav-link+.collapse1 .nav .nav-item>.nav-link{
    margin-left: 25px;
    margin-right: 25px
}


.btn.btn-sm{
    line-height: 1.2
}

.btn-group-sm>.btn i, .btn.btn-sm i {
    font-size: 18px;
    line-height: 1.2;
}


.btn-primary {
    color: #fff;
    background-color: #FFA000;
    border-color: #FFA000;
}


.btn-primary, .btn.bg-gradient-primary {
    box-shadow: 0 3px 3px 0 rgba(255, 160, 0, .15),
        0 3px 1px -2px rgba(255, 160, 0, .20),
        0 1px 5px 0 rgba(255, 160, 0, .15);
}

.btn-primary:active, .btn.bg-gradient-primary:active,
.btn-primary:focus, .btn.bg-gradient-primary:focus,
.btn-primary:hover, .btn.bg-gradient-primary:hover {
    background-color: #FFA000!important;
    border-color: #FFA000;
    box-shadow: 0 14px 26px -12px rgba(255, 160, 0,.4),
        0 4px 23px 0 rgba(255, 160, 0,.15),
        0 8px 10px -5px rgba(255, 160, 0,.2);
}

.table-normal thead td,
.table-normal thead th{
    padding: 5px 10px
}

.table tr td .btn{
    margin-bottom: 0
}

.table:not(.table-normal) thead th{
    font-weight: 700!important;
    font-size: .65rem!important;
    color: #7b809a!important;
    text-transform: uppercase!important;
    opacity: .7!important;
    padding-left: .5rem!important;
}

.vertical-middle{
    vertical-align: middle
}

.form-group{
    margin-bottom: 1rem
}

.alert, .alert > *:not(strong){
    color: #fff
}

.d-flex.margin-tb{
    flex-wrap: wrap
}

.messages .alert{
    margin-bottom: 0
}

.whitespace-normal{
    white-space: normal!important
}


.alert-outline-info {
    color: #0dcaf0;
    border-color: #0dcaf0;
    background-color: transparent;
    border-width: 1px;
}

@media (max-width: 575px){
    .page-item .page-link, .page-item span {
        padding: 5px 10px;
        border-radius: 0%!important;
        width: auto;
        height: auto;
    }
}

@media (max-width: 991.98px){
    .dropdown .dropdown-menu {
        top:100%
    }
}


@media print{
    .card-body, .card{
        box-shadow: none;
        padding: 0
    }

    .table td{
        font-size: 15px
    }

    .offset-8 {
        margin-left: 66.666667%;
    }

    .d-print-flex > .col-md-4{
        width: 33.333333%
    }

    .d-print-flex > .col-md-5{
        width: 41.666667%
    }

    .d-print-flex >  .col-md-8 {
        flex: 0 0 auto;
        width: 66.666667%;
    }

    .d-print-flex > .col-md-6{
        width: 50%
    }

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

    .d-print-flex > .col-md-2{
        width: 16.666667%
    }


    .d-print-flex > .col-md-3{
        width: 25%
    }

    .d-print-block{
        display: block!important
    }

    #main-body{
        border: 1px solid #ddd
    }


}