/******************************************************************************* 
Created on : 31/01/2020, 00:00:00
Author     : ING ANDRES CHILIQUINGA
*******************************************************************************/

root { 
    display: block;
}

html, body{
    direction:ltr;
    font-family             : 'Nunito',sans-serif !important;
    font-size               : 11px !important;
    color                   : rgb(119, 121, 126) !important; 
    padding                 : 0px;   
    background-color        : #f0f1f2;
    background-size         : 100% 100%;
    background-attachment   : fixed;
}

.main-container{
    position        : absolute; 
    background-color: #f8f9f9;
    width           : 100%;
    height          : 100%;
    overflow        : hidden;
}

.container{
    width       : 100% !important;
    height      : 100% !important;
    max-width   : 100% !important;
    min-width   : 100% !important;
    padding     : 10px !important;
    overflow    : hidden;
}

.contend{
    width         : 100% !important;
    height        : 90% !important;
    max-width     : 100% !important;
    min-width     : 100% !important;
    padding       : 15px !important;
    background    : #ffffff; 
    overflow      : hidden;
    border-radius : 10px !important;  
}

.offcanvas {
    --bs-offcanvas-width: 300px !important;
}

.accordion-mnu {
    --bs-accordion-color                    : #212529 !important;
    --bs-accordion-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,border-radius 0.15s ease;
    --bs-accordion-btn-padding-x            : 1.25rem;
    --bs-accordion-btn-padding-y            : 1rem;
    --bs-accordion-btn-color                : #9ea0a2 !important;
    --bs-accordion-btn-icon                 : url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239ea0a2'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    --bs-accordion-btn-icon-width           : 1.25rem;
    --bs-accordion-btn-icon-transform       : rotate(-180deg);
    --bs-accordion-btn-icon-transition      : transform 0.2s ease-in-out;
    --bs-accordion-btn-active-icon          : url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239ea0a2'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    --bs-accordion-btn-focus-border-color   : #212529;
    --bs-accordion-btn-focus-box-shadow     : 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-accordion-body-padding-x           : 1.25rem;
    --bs-accordion-body-padding-y           : 1rem;
    --bs-accordion-active-color             : #f5f6f6 !important;
}

.card-shadow {
    position        : relative;
    display         : flex;
    flex-direction  : column;
    min-width       : 0;
    word-wrap       : break-word;
    background-color: #fff;
    background-clip : border-box;
    border          : 0px solid transparent;
    border-radius   : 10px !important;  
    box-shadow      : 7px 7px 12px 0 rgba(20, 20, 20, 0.3);
}

.load {
    /*Div que ocupa toda la pantalla*/
    display         : none; /* Hidden by default */
    position        : fixed;
    top             : 0px;
    left            : 0px;
    bottom          : 0px;
    right           : 0px;
    width           : 100%;
    height          : 100%;
    background-color: #FFF;
    filter          : alpha(opacity=60); /*IE*/
    -moz-opacity    : 0.5;
    opacity         : 0.5; /*FireFox Opera*/
    z-index         : 2000;
}

.row-margin{
    margin-top  : 0.5rem !important; 
}

.col-margin{
    margin  : 1rem !important; 
}

.nav-link {
    text-align : left !important;
    color      : #f7f8fa !important;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color            : #0a2658  !important;
    background-color : #fcea1e !important;
}

.bg-toolbar {
  --bs-bg-opacity: 1;
  background-color: #0f1b63 !important;
}

.accordion-mnu {  
  --bs-accordion-btn-color: #d4e2f0 !important;
}

.required::after {
    content: ' *';
    color: red;
    font-weight: bold;
}

@media (min-width: 90vw) {
  .modal-xl {
    --bs-modal-width: 95vw !important;
  }
}


.nav-tabs .nav-link.active {
  color: var(--bs-nav-tabs-link-active-color);
  background-color: #1461b3 !important;
  border-color: var(--bs-nav-tabs-link-active-border-color);
}

/* TABS DE APROBACION AREA*/
.nav-link-head {
    text-align : center;
    color      : #afafaf;
    background : #ffffff;
    border: solid 1px #dee0e1;
    padding: 7px;
    margin: 1px;
    border-radius: 5px;
}

.nav-pills-head .nav-link-head.active, .nav-pills-head .show > .nav-link-head {
    color            : #ffffff  !important;
    background-color : #8b8b8b !important;
    border: solid 1px #8b8b8b;
    padding: 7px;
    margin: 1px;
    border-radius: 5px;
}

/* TABS DE APROBACION*/
.nav-link-mnu {
    text-align : center;
    color      : #8f9294;
    background : #ffffff;
    border: solid 1px #dee0e1;
    padding: 7px;
    margin: 1px;
    border-radius: 5px;
}

.nav-pills-mnu .nav-link-mnu.active, .nav-pills-mnu .show > .nav-link-mnu {
    color            : #f1f1f1  !important;
    background-color : #0b77d1 !important;
    border: solid 1px #0b77d1;
    padding: 7px;
    margin: 1px;
    border-radius: 5px;
}

  .sticky-header {
    position: sticky;
    top: 0;
    z-index: 1; /* Asegura que la cabecera esté por encima del contenido al hacer scroll */
    background-color: white; /* O el color de fondo que desees para la cabecera */
  }

  /* Opcional: Para una cabecera oscura */
  .sticky-header.thead-dark th {
    background-color: #343a40 !important; /* Reemplaza con el color de fondo oscuro */
    color: white !important;
  }

  /* Opcional: Para una cabecera clara */
  .sticky-header.thead-light th {
    background-color: #f8f9fa !important; /* Reemplaza con el color de fondo claro */
    color: #495057 !important;
  }
  
  
 .img{
    width         : 100px;
    height        : 100px;
    border-radius : 50%;
    object-fit    : cover;
    border        : solid 4px;
    border-color  : #909497;
}

/* ITP - Maintenance */
.pmt-table-container {
    width: 80% !important;
    max-width: 90vw;
    margin: 0 auto;
    max-height: 85vh;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 !important;
    min-height: 0;
}


.pmt-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    display: table;
}



ul.pmt-tabs.nav-tabs .nav-link {
    color: #333333 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}


ul.pmt-tabs.nav-tabs .nav-item.show .nav-link,
ul.pmt-tabs.nav-tabs .nav-link.active {
    background-color: #0A2658 !important;
    color: #ffffff !important;
    border-color: #0A2658 #0A2658 #ffffff !important;
}

.pmt-thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.pmt-table th {
    background-color: #828282 !important;
    color: #ffffff !important;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #dee2e6;
    max-height: 85vh;
}

.pmt-table td {
    vertical-align: middle;
    align-items: center;
    padding: 0 !important;
    border: none !important;
    text-align: center;
}

.pmt-via-cell {
    background-color: #828282;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    position: sticky;
    left: 0;
    z-index: 5;
}

.maintenance-cell {
    width: 100%;
    height: 95%;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.maintenance-cell.status-pending {
    background-color: #fffded;
    border: 1px solid #ffeaa7;
}

.maintenance-cell.status-completed {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.maintenance-cell.status-missed {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.maintenance-cell.status-none {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.edit-mode .maintenance-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.pmt-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pmt-progress {
    width: 200px;
    height: 20px;
    background-color: #f5f5f5;
}

.pmt-progress .progress-bar {
    background-color: #51A351;
    font-weight: bold;
}


/* Cards */
.pmt-cards-container .maintenance-card {
    border: 2px solid #dee2e6;
    transition: all 0.3s;
    padding: 5%;
}

.pmt-cards-container .maintenance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.maintenance-card.status-completed {
    border-color: #c3e6cb;
}

.maintenance-card.status-pending {
    border-color: #ffeaa7;
}

.maintenance-card.status-missed {
    border-color: #f5c6cb;
}

.pmt-card-body {
    height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem !important;
}

.pmt-header-section {
    flex-shrink: 0;
}

.pmt-content-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: clumn !important;
    min-height: 0;
}

.pmt-cards-container {
    flex: 1 !important;
    overflow-y: auto;
    max-height: 100%;
}

/* ============================================
                WIM - MTOP
   ============================================ */
#wimContainer {
    display: flex;
    flex-direction: column;
    height: 70%;
}

#wimDataTable,
.laneTable {
    width: 100%;
    height: 80%;
    border-collapse: collapse;
}

#wimDataTable thead th,
.laneTable thead th {
    background-color: #0A2658;
    color: white;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
}

#wimDataTable thead td,
.laneTable thead td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

#wimDataTable tbody tr:nth-child(even) td,
.laneTable tbody tr:nth-child(even) td {
    background-color: #fff;
}

#wimDataTable tbody tr:nth-child(odd) td,
.laneTable tbody tr:nth-child(odd) td {
    background-color: #e8f5e954;
}

#wimDataTable thead tr:first-child th:first-child,
.laneTable thead tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

#wimDataTable thead tr:first-child th:last-child,
.laneTable thead tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

#wimContainer h4 {
    font-size: 15px;
}

#filtersContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#filterButtonsLeft {
    min-height: 50px;
}

#yearButtons,
#monthButtons {
    display: flex;
    align-items: center;
}

#monthButtons {
    display: flex;
}

#btnBackToYear {
    order: -1;
    margin: 5px 10px 5px 5px;
}

.year-btn {
    background-color: #0A2658;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.year-btn:hover {
    background-color: #abc3eb;
    opacity: 0.85;
    color: #0A2658;
}

.month-btn {
    background-color: #48A634;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.month-btn:hover {
    background-color: #48A634;
    opacity: 0.85;
}

#paginationControls button,
.paginationControls button {
    background-color: #0a2758a4;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#paginationControls button:hover,
.paginationControls button:hover {
    background-color: #6895e4;
    opacity: 0.85;
}

#currentFilterLabel {
    font-size: 15px;
    font-weight: bold;
    color: #0A2658;
    text-align: center;
}

#wimDataTable th {
    font-size: 0.85rem;
    padding: 0.4rem 0.25rem;
    white-space: nowrap;
    font-weight: 600;
    text-align: center !important;
    vertical-align: middle;
    border: 1px solid #dee2e6;
    border-right: 1px dotted rgba(255, 255, 255, 0.5);
}

#wimDataTable td {
    font-size: 0.9rem;
    padding: 0.35rem 0.25rem;
    text-align: center !important;
    vertical-align: middle;
    line-height: 1.2;
}

#wimDataTable tbody tr:nth-of-type(odd) td {
    background-color: rgba(0, 0, 0, 0.02);
}

#wimDataTable tbody tr:hover td {
    background-color: rgba(10, 38, 88, 0.1);
}

.card-shadow {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

.wim-controls-grid {
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    align-items: center;
    gap: 1rem;
    min-height: 50px;
}

.wim-controls-left {
    justify-self: start;
    display: flex;
    align-items: center;
}

.wim-controls-center {
    justify-self: center;
    text-align: center;
    width: 100%;
}

.wim-controls-right {
    justify-self: end;
    display: flex;
    align-items: center;
}

#wimDataTable thead {
    background-color: #0A2658 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
}

#wimDataTable thead th {
    background-color: #0A2658 !important;
    color: white !important;
    border-color: #ffffff33 !important;
    border-right: 1px dotted rgba(255, 255, 255, 0.5) !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    position: sticky;
    top: 0;
}

#wimDataTable thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

#wimDataTable thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
    border-right: 1px solid #ffffff33 !important;
}

#wimDataTable thead th:last-child {
    border-right: 1px solid #ffffff33 !important;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #0A2658;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #061a3a;
}

.table-responsive {
    overflow: visible;
}

.card-body {
    display: flex;
    flex-direction: column;
}

.wim-filter-icon {
    cursor: pointer;
    margin-right: 8px;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.wim-filter-icon:hover {
    opacity: 1;
    color: #ffc107 !important;
}

.wim-filter-icon.active {
    color: #ffc107 !important;
    opacity: 1;
}

.wim-filter-popup {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 250px;
    max-width: 350px;
}

.wim-popup-header {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wim-popup-header strong {
    font-size: 0.875rem;
    color: #495057;
}

.wim-btn-close-popup {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wim-btn-close-popup:hover {
    color: #495057;
}

.wim-popup-body {
    padding: 0.75rem;
}

.wim-popup-body .form-check {
    margin-bottom: 0.5rem;
}

.wim-popup-body .form-check-label {
    font-size: 0.875rem;
    cursor: pointer;
}

.wim-popup-body .form-check-input {
    cursor: pointer;
}

.wim-popup-body .form-check-input:checked {
    background-color: #0A2658;
    border-color: #0A2658;
}

.wim-popup-body .form-check-input:focus {
    border-color: #0A2658;
    box-shadow: 0 0 0 0.25rem rgba(10, 38, 88, 0.25);
}

.wim-popup-footer {
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.375rem 0.375rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.wim-popup-body::-webkit-scrollbar {
    width: 6px;
}

.wim-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wim-popup-body::-webkit-scrollbar-thumb {
    background: #0A2658;
    border-radius: 3px;
}

.wim-popup-body::-webkit-scrollbar-thumb:hover {
    background: #061a3a;
}

.wim-pagination-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .wim-controls-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem;
        text-align: center;
    }

    .wim-controls-left,
    .wim-controls-center,
    .wim-controls-right {
        justify-self: center;
        width: 100%;
        text-align: center;
    }

    .wim-controls-left {
        order: 1;
    }

    .wim-controls-center {
        order: 2;
    }

    .wim-controls-right {
        order: 3;
    }

    #wimDataTable th:nth-child(n+6):nth-child(-n+10),
    #wimDataTable td:nth-child(n+6):nth-child(-n+10) {
        display: none;
    }

    #wimDataTable th,
    #wimDataTable td {
        font-size: 0.75rem !important;
        padding: 0.2rem !important;
    }
}
