.breadcrumb {
    background-color: white !important;
    padding: 5px 20px !important;
    margin-bottom: 0;
    list-style: none;
    border: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #4a4a4a;;
    font-weight: 400;
}

.card .card-header .card-title {
    font-size: 1.3rem;
    font-weight: bold;
}

.table thead tr {
    background-color: #ececec !important;
    color: #000000 !important;
}

.table thead th {
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
}

.password-progress {
    margin-top: 10px;
    margin-bottom: 0;
}

.dataTables_scroll {
    overflow: auto;
}

.form-control-checkbox {
    height: 25px;
    width: 25px;
    text-align: center;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.cursor-pointer {
    cursor: pointer;
}

a.card-icon p.desc {
    text-align: center;
    font-size: 12px !important;
}

a.card-icon {
    text-decoration: none !important;
    color: black !important;
    border: 1px solid #dee2e6 !important;
}

.card-icon-selected {
    background-color: #fdedbc;
}

a.card-icon:hover {
    background-color: #fdedbc;
    animation: shakeY;
    animation-duration: 2s;
}

.low-stock {
    background-color: red;
    color: white !important;
}

.img-small {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .modal-xl {
        width: 90%;
        max-width: 1200px;
    }
}

@media (max-width: 767px) {
    .input-group.bootstrap-touchspin.bootstrap-touchspin-injected {
        width: 200px !important;
    }
}

/* Capa móvil. Estas reglas no alteran la distribución de escritorio. */
@media (max-width: 767.98px) {
    :root {
        --app-mobile-gutter: 12px;
        --app-mobile-radius: 12px;
        --app-mobile-header-height: 56px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .app-header {
        min-height: var(--app-mobile-header-height);
        padding: 4px 8px;
        position: relative;
    }

    .app-header .nav-link {
        align-items: center;
        display: flex;
        font-size: 1.15rem;
        height: 46px;
        justify-content: center;
        min-width: 44px;
        padding: 8px 10px;
    }

    .app-header-left,
    .app-header-actions {
        align-items: center;
        flex-direction: row;
        position: relative;
        z-index: 2;
    }

    .app-header-actions {
        flex-wrap: nowrap;
    }

    .app-header .app-nav-label,
    .app-header .app-profile-menu {
        display: none;
    }

    .app-mobile-brand {
        align-items: center;
        color: inherit;
        display: flex;
        font-size: 1rem;
        font-weight: 600;
        gap: 8px;
        left: 50%;
        max-width: 45%;
        position: absolute;
        text-decoration: none;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
        z-index: 1;
    }

    .app-mobile-brand:hover,
    .app-mobile-brand:focus {
        color: inherit;
        text-decoration: none;
    }

    .app-mobile-brand img {
        border-radius: 6px;
        height: 32px;
        object-fit: contain;
        width: 32px;
    }

    .app-mobile-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-header .dropdown-menu-lg {
        left: var(--app-mobile-gutter) !important;
        max-height: calc(100vh - 72px);
        max-width: none;
        overflow-y: auto;
        position: fixed;
        right: var(--app-mobile-gutter) !important;
        top: 54px;
        width: auto;
    }

    .app-horizontal-header .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .app-horizontal-header .navbar-brand {
        align-items: center;
        display: flex;
        margin-right: 4px;
        max-width: calc(100% - 148px);
    }

    .app-horizontal-header .navbar-brand .brand-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-horizontal-header .navbar-toggler {
        border: 0;
        height: 44px;
        min-width: 44px;
        padding: 8px;
    }

    .app-horizontal-header #navbarCollapse {
        flex-basis: 100%;
    }

    .app-horizontal-header #navbarCollapse .nav-link {
        justify-content: flex-start;
    }

    .main-sidebar,
    .main-sidebar::before {
        max-width: 320px;
        width: min(86vw, 320px);
    }

    body:not(.sidebar-open) .main-sidebar,
    body:not(.sidebar-open) .main-sidebar::before {
        margin-left: -100vw;
    }

    .sidebar {
        padding: 0 10px 20px;
    }

    .sidebar .user-panel {
        align-items: center;
        padding-left: 6px;
    }

    .nav-sidebar .nav-header {
        font-size: .75rem;
        letter-spacing: .08em;
        padding: 14px 12px 8px;
        text-transform: uppercase;
    }

    .nav-sidebar .nav-link {
        align-items: center;
        border-radius: 9px;
        display: flex;
        min-height: 46px;
        padding-bottom: 10px;
        padding-top: 10px;
    }

    .nav-sidebar .nav-link p {
        line-height: 1.25;
        white-space: normal;
    }

    .nav-sidebar .nav-treeview {
        padding-left: 8px;
    }

    .content-header {
        padding: 10px 0 8px;
    }

    .content-header .container-fluid,
    .content > .container-fluid {
        padding-left: var(--app-mobile-gutter);
        padding-right: var(--app-mobile-gutter);
    }

    .breadcrumb {
        border-radius: 9px;
        flex-wrap: nowrap;
        min-height: 44px;
        overflow-x: auto;
        padding: 9px 12px !important;
        white-space: nowrap;
    }

    .breadcrumb-item {
        align-items: center;
        display: flex;
    }

    .content .card {
        border-radius: var(--app-mobile-radius);
        box-shadow: 0 2px 10px rgba(31, 45, 61, .08);
        margin-bottom: 14px;
    }

    .content .card-header {
        align-items: center;
        display: flex;
        min-height: 52px;
        padding: 12px 14px;
    }

    .content .card .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .content .card-body {
        padding: 14px 12px;
    }

    .content .card-body > .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    table.app-mobile-cards,
    table.app-mobile-cards tbody,
    table.app-mobile-cards tr,
    table.app-mobile-cards td {
        display: block;
        width: 100% !important;
    }

    table.app-mobile-cards {
        background: transparent;
        border: 0;
    }

    table.app-mobile-cards thead {
        display: none;
    }

    table.app-mobile-cards tbody tr {
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(31, 45, 61, .06);
        margin-bottom: 12px;
        padding: 4px 10px;
    }

    table.app-mobile-cards tbody tr.child,
    table.app-mobile-cards tbody tr.dataTables_empty {
        padding: 10px;
    }

    table.app-mobile-cards tbody td {
        align-items: center;
        border: 0;
        border-bottom: 1px solid #edf0f2;
        display: grid;
        gap: 12px;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        min-height: 42px;
        padding: 9px 2px;
        text-align: right !important;
    }

    table.app-mobile-cards tbody td:last-child {
        border-bottom: 0;
    }

    table.app-mobile-cards tbody td::before {
        color: #65717d;
        content: attr(data-label);
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .02em;
        text-align: left;
        text-transform: uppercase;
    }

    table.app-mobile-cards tbody td.dataTables_empty {
        display: block;
        text-align: center !important;
    }

    table.app-mobile-cards tbody td.dataTables_empty::before {
        content: none;
    }

    table.app-mobile-cards .btn-group,
    table.app-mobile-cards .dropdown-toggle,
    table.app-mobile-cards .input-group.bootstrap-touchspin.bootstrap-touchspin-injected {
        width: 100% !important;
    }

    table.app-mobile-cards .dropdown-menu {
        max-width: 100%;
    }

    .dataTables_wrapper > .row:first-child > div,
    .dataTables_wrapper > .row:last-child > div {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_filter input {
        margin-left: 0;
        width: 100%;
    }

    .app-sale-list_wrapper .dataTables_length,
    .app-sale-list_wrapper .dataTables_filter {
        margin-bottom: 8px;
    }

    .app-list-primary-action .btn {
        align-items: center;
        display: flex;
        font-size: 1rem;
        font-weight: 600;
        justify-content: center;
        min-height: 46px;
        width: 100%;
    }

    table.app-sale-list tbody tr,
    table.app-expense-list tbody tr,
    table.app-purchase-list tbody tr {
        display: grid;
        gap: 0 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 7px 10px;
    }

    table.app-sale-list tbody td,
    table.app-expense-list tbody td,
    table.app-purchase-list tbody td {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        min-height: 0;
        overflow-wrap: anywhere;
        padding: 6px 0;
        text-align: left !important;
    }

    table.app-sale-list tbody td::before,
    table.app-expense-list tbody td::before,
    table.app-purchase-list tbody td::before {
        font-size: .66rem;
        line-height: 1.1;
    }

    table.app-sale-list tbody td:nth-child(1):not(.dataTables_empty),
    table.app-expense-list tbody td:nth-child(1):not(.dataTables_empty),
    table.app-purchase-list tbody td:nth-child(1):not(.dataTables_empty) {
        display: none;
    }

    table.app-sale-list tbody td:nth-child(2),
    table.app-sale-list tbody td:nth-child(4),
    table.app-sale-list tbody td:nth-child(11),
    table.app-expense-list tbody td:nth-child(2),
    table.app-expense-list tbody td:nth-child(4),
    table.app-expense-list tbody td:nth-child(5),
    table.app-expense-list tbody td:nth-child(8),
    table.app-expense-list tbody td:nth-child(9),
    table.app-purchase-list tbody td:nth-child(2),
    table.app-purchase-list tbody td:nth-child(3),
    table.app-purchase-list tbody td:nth-child(8) {
        grid-column: 1 / -1;
    }

    table.app-sale-list tbody td:nth-child(2),
    table.app-expense-list tbody td:nth-child(2),
    table.app-purchase-list tbody td:nth-child(2) {
        font-size: 1rem;
        font-weight: 700;
    }

    table.app-sale-list tbody td:nth-child(10),
    table.app-expense-list tbody td:nth-child(7),
    table.app-purchase-list tbody td:nth-child(7) {
        color: #166534;
        font-size: 1rem;
        font-weight: 700;
    }

    table.app-sale-list tbody td:nth-child(6) {
        min-width: 0;
    }

    table.app-sale-list tbody td:nth-child(6) .badge {
        display: block;
        line-height: 1.25;
        max-width: 100%;
        overflow-wrap: anywhere;
        padding: .3rem .5rem;
        text-align: left;
        white-space: normal;
    }

    table.app-sale-list tbody td:nth-child(11),
    table.app-expense-list tbody td:nth-child(9),
    table.app-purchase-list tbody td:nth-child(8) {
        padding-top: 8px;
    }

    table.app-sale-list tbody td:nth-child(11) {
        display: block;
    }

    table.app-sale-list tbody td:nth-child(11)::before {
        display: block;
        margin-bottom: 5px;
    }

    table.app-sale-list tbody td:nth-child(11) .btn-group {
        display: block;
        position: static;
        width: 100% !important;
    }

    table.app-sale-list tbody td:nth-child(11) .dropdown-menu {
        float: none;
        margin: 6px 0 0;
        max-width: 100%;
        position: static !important;
        transform: none !important;
        width: 100%;
    }

    table.app-sale-list tbody td:nth-child(11) .dropdown-item {
        overflow-wrap: anywhere;
        padding: .55rem .7rem;
        white-space: normal;
    }

    table.app-expense-list tbody td:nth-child(9) {
        align-items: center;
        display: grid;
        gap: 6px;
        grid-template-columns: 1fr 44px 44px;
    }

    table.app-purchase-list tbody td:nth-child(6) .badge {
        line-height: 1.25;
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    table.app-purchase-list tbody td:nth-child(8) {
        align-items: center;
        display: grid;
        gap: 6px;
        grid-template-columns: 1fr 44px 44px;
    }

    table.app-expense-list tbody td:nth-child(9) .btn,
    table.app-purchase-list tbody td:nth-child(8) .btn {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 38px;
        min-width: 44px;
    }

    table.app-provider-list tbody tr,
    table.app-product-list tbody tr {
        display: grid;
        gap: 0 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 7px 10px;
    }

    table.app-provider-list tbody td,
    table.app-product-list tbody td {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        min-height: 0;
        overflow-wrap: anywhere;
        padding: 6px 0;
        text-align: left !important;
    }

    table.app-provider-list tbody td::before,
    table.app-product-list tbody td::before {
        font-size: .66rem;
        line-height: 1.1;
    }

    table.app-provider-list tbody td:nth-child(1):not(.dataTables_empty),
    table.app-product-list tbody td:nth-child(1):not(.dataTables_empty) {
        display: none;
    }

    table.app-provider-list tbody td:nth-child(2),
    table.app-provider-list tbody td:nth-child(5),
    table.app-provider-list tbody td:nth-child(6),
    table.app-provider-list tbody td:nth-child(7),
    table.app-product-list tbody td:nth-child(2),
    table.app-product-list tbody td:nth-child(12) {
        grid-column: 1 / -1;
    }

    table.app-provider-list tbody td:nth-child(2),
    table.app-product-list tbody td:nth-child(2) {
        font-size: 1rem;
        font-weight: 700;
    }

    table.app-product-list tbody td:nth-child(8),
    table.app-product-list tbody td:nth-child(9),
    table.app-product-list tbody td:nth-child(10) {
        color: #166534;
        font-weight: 700;
    }

    table.app-product-list tbody td:nth-child(5) .badge,
    table.app-product-list tbody td:nth-child(11) .badge {
        line-height: 1.25;
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    table.app-provider-list tbody td:nth-child(7),
    table.app-product-list tbody td:nth-child(12) {
        align-items: center;
        display: grid;
        gap: 6px;
        grid-template-columns: 1fr 44px 44px;
        padding-top: 8px;
    }

    table.app-provider-list tbody td:nth-child(7) .btn,
    table.app-product-list tbody td:nth-child(12) .btn,
    table.app-product-list tbody td:nth-child(6) .btn,
    table.app-product-list tbody td:nth-child(7) .btn {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 38px;
        min-width: 44px;
    }

    .app-sale-form .app-sale-products {
        border: 0;
        box-shadow: none;
        margin-left: -2px;
        margin-right: -2px;
        padding: 8px !important;
    }

    .app-sale-form table.app-sale-product-table tbody tr {
        display: grid;
        gap: 0 10px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 6px 9px;
    }

    .app-sale-form table.app-sale-product-table tbody td {
        align-content: center;
        display: grid;
        gap: 2px;
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 5px 0;
        text-align: left !important;
    }

    .app-sale-form table.app-sale-product-table tbody td::before {
        font-size: .68rem;
        line-height: 1.1;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(1) {
        border-bottom: 1px solid #edf0f2;
        grid-column: 2;
        grid-row: 1;
        justify-items: end;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(1)::before {
        content: none;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(2) {
        grid-column: 1;
        grid-row: 1;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(3) {
        font-weight: 700;
        grid-column: 1 / -1;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(7) {
        grid-column: 1;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(8) {
        align-content: end;
        font-size: 1rem;
        font-weight: 700;
        grid-column: 2;
        text-align: right !important;
    }

    .app-sale-form table.app-sale-product-table tbody td:nth-child(8)::before {
        text-align: right;
    }

    .app-sale-form table.app-sale-product-table .form-control,
    .app-sale-form table.app-sale-product-table .btn,
    .app-sale-form table.app-sale-product-table .input-group-text {
        font-size: .85rem;
        min-height: 32px;
    }

    .app-sale-form table.app-sale-product-table .form-control {
        height: 32px;
        padding: 3px 6px;
    }

    .app-sale-form table.app-sale-product-table a[rel="remove"] {
        align-items: center;
        display: inline-flex;
        height: 30px;
        justify-content: center;
        min-height: 30px;
        width: 34px;
    }

    .app-sale-form .app-sale-summary td {
        padding: 8px;
        vertical-align: middle;
    }

    .app-sale-form .app-sale-summary td:first-child {
        font-size: .8rem;
        width: 45%;
    }

    .app-sale-form > .card > .card-footer {
        background: rgba(255, 255, 255, .97);
        bottom: 0;
        box-shadow: 0 -3px 12px rgba(31, 45, 61, .12);
        display: grid;
        gap: 6px;
        grid-template-columns: 1.15fr 1.15fr .9fr;
        padding: 8px 10px;
        position: sticky;
        z-index: 1020;
    }

    .app-sale-form > .card > .card-footer .btn {
        align-items: center;
        display: flex;
        justify-content: center;
        font-size: .78rem;
        gap: 4px;
        min-height: 38px;
        padding: 6px 5px;
        white-space: normal;
    }

    .app-sale-form > .card > .card-footer .app-primary-action {
        grid-column: auto;
    }

    .app-sale-form .select2-container,
    .app-sale-form .input-group-search {
        width: 100% !important;
    }

    .modal-dialog {
        margin: 8px;
    }

    .modal-content {
        border-radius: var(--app-mobile-radius);
    }

    .modal-body {
        max-height: calc(100vh - 135px);
        overflow-y: auto;
        padding: 12px;
    }

    .modal-body > .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    .main-footer {
        font-size: .88rem;
        padding: 14px var(--app-mobile-gutter);
    }
}
