html {
    font-size: 14px;
}

/* Font Awesome 6.x respeta `prefers-reduced-motion` y congela `.fa-spin` cuando
   Windows/macOS tienen "Reducir movimiento" activo. Forzamos la animación siempre —
   el spin del spinner es feedback de progreso, no adorno. */
.fa-spin {
    animation: fa-spin 2s linear infinite !important;
}
.fa-spin-pulse {
    animation: fa-spin 1s steps(8) infinite !important;
}
@keyframes fa-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bootstrap 5 `.progress-bar-animated` — misma story: cae víctima del prefers-reduced-motion.
   Forzamos la animación de rayas para que la barra de progreso sí se mueva siempre. */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite !important;
}
@keyframes progress-bar-stripes {
    0%   { background-position-x: 1rem; }
    100% { background-position-x: 0; }
}

html {
    position: relative;
    min-height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

table {
    border-radius: 5px;
}

    table thead th {
        background-color: #5b6674 !important;
        color: #fff !important;
        font-weight: 700 !important;
        white-space: normal !important;
        word-break: normal;
        overflow-wrap: break-word;
        text-align: center;
        vertical-align: middle;
    }

td > div > .btn {
    padding: 2px 10px !important;
}

.dtr-details > li {
    margin: 0px !important;
    padding: 2px !important;
    text-align: left !important;
}

/* Child row responsive — chips horizontales para columnas ocultas.
   Reemplaza la lista vertical del renderer default. Ver site.js DataTable.defaults.responsive.details.renderer */
.rsp-hidden-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.25rem 0;
    max-width: 100%;
    box-sizing: border-box;
}
.rsp-chip {
    background: #f4f6f9;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}
.rsp-chip-lbl {
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}
.rsp-chip-val {
    color: #212529;
}

/* Botón de expand/collapse del plugin Responsive de DataTables — reemplaza el
   triángulo default por un ícono Font Awesome dentro de un botón circular.
   Solo aparece cuando la tabla tiene `.collapsed` (efectivamente hay columnas ocultas). */
table.dataTable > tbody > tr td.dtr-control {
    position: relative;
    cursor: pointer;
    text-align: left !important;
    padding-right: 8px !important;
}
table.dataTable > tbody > tr > td:first-child,
table.dataTable > thead > tr > th:first-child {
    text-align: left !important;
}
table.dataTable.collapsed > tbody > tr > td.dtr-control::before {
    content: "\f054" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px !important;
    height: 22px !important;
    margin-right: 8px !important;
    background: #4e9af1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    top: auto !important;
    left: auto !important;
    box-sizing: border-box;
    transition: background 0.15s ease-in-out, transform 0.15s ease-in-out;
}
table.dataTable.collapsed > tbody > tr > td.dtr-control:hover::before {
    background: #2e7dd7 !important;
    transform: scale(1.08);
}
table.dataTable.collapsed > tbody > tr.parent > td.dtr-control::before,
table.dataTable.collapsed > tbody > tr.dtr-expanded > td.dtr-control::before {
    content: "\f078" !important;
    background: #3dbb7d !important;
}
table.dataTable.collapsed > tbody > tr.parent > td.dtr-control:hover::before,
table.dataTable.collapsed > tbody > tr.dtr-expanded > td.dtr-control:hover::before {
    background: #2f9b62 !important;
}

.homecontent {
    z-index: 10;
    height: calc(100vh - 156px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.userOptionsDark {
    background-color: #4682b4;
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsDark:hover { background-color: #5b9bd5; }

.userOptionsLight {
    background-color: #ddd;
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsLight:hover { background-color: #ccc; }

.userOptionsClear {
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsClear:hover { background-color: #eee; }

.userOptionsWarning {
    background-color: #ffc107;
    border-radius: 5px;
    margin: 5px 1px;
    font-size: 20px !important;
    font-weight: 700;
    text-wrap: nowrap;
    min-height: 35px;
}

.dtBody {
    overflow-y: scroll !important;
    background-color: #eee;
}

.dtBody tr td { vertical-align: middle; }

/* DataTables 2.x: alineación text-center / text-end en headers */
table.dataTable thead th.text-center { text-align: center !important; }
    table.dataTable thead th.text-center .dt-column-header { justify-content: center !important; }
    table.dataTable thead th.text-center .dt-column-title { text-align: center !important; }
table.dataTable thead th.text-end { text-align: right !important; }
    table.dataTable thead th.text-end .dt-column-header { justify-content: flex-end !important; }
    table.dataTable thead th.text-end .dt-column-title { text-align: right !important; }

.selectize-input {
    padding-right: 30px;
    padding-top: 7px;
    padding-bottom: 6px;
}

.input-group .selectize-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}
    .input-group .selectize-control .selectize-input {
        height: calc(2.25rem + 2px);
        padding: .375rem .75rem;
    }

.selectize-input > div {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selectize-control.disabled,
.selectize-control.disabled .selectize-input,
.selectize-input.disabled {
    opacity: 1 !important;
    background-color: #e9ecef !important;
    color: #495057 !important;
}
    .selectize-control.disabled .selectize-input > .item,
    .selectize-control.disabled .selectize-input > input,
    .selectize-input.disabled > .item,
    .selectize-input.disabled > input {
        color: #495057 !important;
        opacity: 1 !important;
    }

.row > dl > dd, .row > dl > dt {
    margin: 0px !important;
    padding: 2px 5px 2px 5px;
}

.option.selected {
    background-color: #efb916;
    color: #000;
    font-weight: 700;
}

.btn, .input-group-text { padding: 5px 10px; }

.csPanel {
    color: #000 !important;
    padding: 5px 5px 5px 5px;
    display: inline-block;
    background-color: #ffc107;
    cursor: pointer;
    user-select: none;
    width: 100%;
}
    .csPanel:hover { background-color: #efb916; }

.user-panel .image { padding-left: .5rem; padding-top: .3rem; }

.bg-Main {
    /* Coloca wwwroot/img/background.jpg cuando esté disponible (o remueve este bloque). */
    background: url(../img/background.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}
    .bg-Main::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: rgba(255, 255, 255, 0.35);
        z-index: 0;
    }

.content-wrapper { background-color: transparent !important; }

main {
    padding: 10px;
    background-color: rgb(255,255,255,.4);
    border-radius: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(100vh - 130px);
}

/* Página Index (welcome): main sin overlay para que la foto del warehouse
   se vea claramente detrás del título. Aplica solo cuando el main contiene
   .homecontent (única en Pages/Index.cshtml). */
main:has(> .homecontent) {
    background-color: transparent !important;
    padding: 0 !important;
}

p { font-size: 20px; font-weight: 300; color: #000; }
    p.custom { font-size: 20px; font-weight: 300; color: #838383; }

strong { color: #000; font-weight: 500; }

.user-panel {
    border-bottom: 0px solid #4f5962 !important;
    vertical-align: middle !important;
}

.sidebar { height: calc(100vh - 70px); }

.sidebar-dark-custom, .brand-link {
    background: linear-gradient(170deg, #5e6a74 0%, #454d55 50%, #343a40 100%);
}
    .sidebar-dark-custom a { text-decoration: none; color: #ddd; font-weight: 500; font-size: medium; }
    .sidebar-dark-custom p { text-decoration: none; color: #ddd; font-weight: 500; font-size: medium; }

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #708090;
    border-color: #1861ac;
}

.nav-treeview > .nav-item > .nav-link.active {
    background-color: #e2e8f5 !important;
    color: #444 !important;
}
    .nav-treeview > .nav-item > .nav-link.active p { color: #444 !important; font-weight: 700; }

.custom-pills > .nav-item > .nav-link:hover { background-color: lightblue !important; color: #444 !important; }
.custom-pills > .nav-item > .nav-link.active { background-color: #4682b4 !important; color: white !important; }

tbody > tr:hover { background-color: #e2e6ea !important; }
tbody tr td { padding: 3px 5px !important; }

.brand-link { height: 50px; }
    .brand-link .brand-image { float: none !important; }

.main-sidebar,
.main-sidebar .brand-link { transition: width 0.2s ease !important; }

.main-sidebar { overflow: hidden; }

.main-sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 100%, #000 50%, transparent 90%);
    mask-image: radial-gradient(ellipse 120% 80% at 50% 100%, #000 50%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

.main-sidebar .sidebar { position: relative; z-index: 1; }

.nav-sidebar > .nav-item { position: relative; }
.nav-sidebar > .nav-item > .nav-link {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin: 2px 6px;
}
.nav-sidebar .nav-treeview .nav-item .nav-link {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 1px 10px;
}
.nav-sidebar > .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Breadcrumb colors */
.navbar-light .breadcrumb-item a { color: #4682b4; }
.navbar-light .breadcrumb-item a:hover { color: #1861ac; }
.navbar-dark .breadcrumb-item a { color: rgba(255, 255, 255, 0.85); }
.navbar-dark .breadcrumb-item a:hover { color: #fff; }
.navbar-dark .breadcrumb-item.active { color: rgba(255, 255, 255, 0.65); }
.navbar-dark .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.4); }

/* Menu group left-border accent — agregar más conforme se creen módulos en MGCv2 */
.nav-grp-inventario, .nav-grp-inventario.active { border-left: 3px solid #1abc9c !important; }
.nav-grp-mant,       .nav-grp-mant.active       { border-left: 3px solid #3dbb7d !important; }
.nav-grp-proc,       .nav-grp-proc.active       { border-left: 3px solid #4e9af1 !important; }
.nav-grp-config,     .nav-grp-config.active     { border-left: 3px solid #f0913a !important; }
.nav-grp-reportes,   .nav-grp-reportes.active   { border-left: 3px solid #9b59b6 !important; }
.nav-grp-seguridad,  .nav-grp-seguridad.active  { border-left: 3px solid #d4ac0d !important; }

.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.maxw-100 { max-width: 100px; text-align: center; }
.w-100px { width: 100px; text-align: center; }
.maxw-200 { width: 200px !important; text-wrap: pretty; }

/* .modal-xxl — ancho custom para modales que necesitan más espacio */
.modal-xxl { --bs-modal-width: 95vw; }
@media (min-width: 1200px) {
    .modal-xxl { --bs-modal-width: 80vw; }
}

@media only screen and (max-width: 800px) {
    .btn span { display: block; }
}

.hidden { display: none; }
.highlight { background-color: yellow; }

.form-switch .form-check-input {
    margin-left: -24px !important;
    padding: 0px !important;
    width: 30px !important;
    height: 20px !important;
}
.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

:root {
    --dt-row-selected: 125, 125, 125;
}

img { margin: 0 !important; padding: 0 !important; }
.img-container { text-align: center; padding: 0 !important; }

.badge-pill { font-size: 0.85em !important; }

table.dataTable > tbody > tr.selected a.btn { color: inherit !important; }

/* Títulos de vista */
h4.viewTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.3px;
}
h4.viewSubTitle,
h5.viewSubTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: -0.2px;
    color: #333;
}
