@import url('custom-utilities.css');

/* Deshabilitar transiciones en la carga inicial para evitar flash al aplicar dark mode */
.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
  transition: none !important;
}

[data-theme=light] {
  /*--bs-body-bg-rgb: 239, 243, 249;*/
  --bs-body-bg-rgb: 236, 240, 248;
}

[data-theme=dark] {
  --bs-body-bg-rgb: 19, 25, 32;
}

.font-monospace-num {
  font-feature-settings: "tnum";
}

.w-min {
  width: 1%;
}

.text-warning {
  color: #FA9128 !important;
}

.text-info{
  color: #00B9D0 !important;
}

.btn-small {
  padding: 0px 15px;
  line-height: 36px;
  font-size: 14px;
}
.btn-sm{
  padding: 0.25rem 0.5rem !important;
  font-size: 14px;
}

.form-small{
  font-size: 14px;
  padding: 4px 8px;
  height: inherit;
}
.form-small::placeholder {
  font-size: 13px;
}

.form-controlXX{
  padding: 10px 12px;
  font-size: 15px;
  height: inherit;
}


.form-check .form-check-input[type="radio"]{
  border-radius: 10px;
}

.alert{
  border: none !important;
}
/*
.button_loading i,
.button_loading span{
  display: inline-block;
  min-width: 16px;
}
  */

.modal-content{
  background-color: var(--color-gray-0);
}

.capitalize-sentence {
    text-transform: lowercase;
}

.capitalize-sentence::first-letter {
    text-transform: uppercase;
}

.menu-vertical .menu-item .menu-link .count {

  right: 0;
}
.menu-vertical .menu-item .menu-link.menu-toggle .count {

  right: 20px;
}

[data-theme="dark"] .menu-vertical .menu-item.open .menu-link.active .title,
[data-theme="dark"] .menu-vertical .menu-item.open .menu-link.active:hover .title,
[data-theme="dark"] .menu-vertical .menu-item .menu-link:hover .title{
  color: #0f7fff !important;
}


.navbar-sub{
  padding: 0;
  min-height: 50px;
  width: 100%;
}

.navbar-sub li.nav-item.border-end{
  border-color: var(--color-gray-300) !important;
}

/* Placeholder small size */
.navbar-sub .form-control::placeholder {
  font-size: 13px;
}

.navbar-sub .form-control:focus{
  border:1px solid var(--color-gray-600) !important;
}
.form-control:focus{
  border-bottom-width: 1px !important;
}

.navbar-sub li.nav-item > button.btn:active{
  border-color: transparent !important;
}
.navbar-sub li.nav-item > a.nav-link,
.navbar-sub li.nav-item > button.btn{
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gray-700);
  row-gap:0 !important;
}
.navbar-sub li.nav-item.active > a.nav-link,
.navbar-sub li.nav-item.active > button.btn{
  color: var(--bs-primary); 
}
.navbar-sub .nav-item a.nav-link:hover,
.navbar-sub .nav-item button.btn:hover{
  color: var(--bs-primary) !important;
}

.navbar-sub li.nav-item .dropdown-menu{
  position: absolute;
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
  font-size: 14px;
}

.navbar-sub li.nav-item .dropdown-menu input.form-control,
.navbar-sub li.nav-item .dropdown-menu select.form-select{
  color: var(--color-gray-800) !important;
  font-size: 14px;
  background-color: var(--color-gray-0);
}

.navbar-sub li.nav-item .dropdown-menu a{
  color: var(--color-gray-800);
  font-size: 14px;
}
.navbar-sub li.nav-item .dropdown-menu a:hover,
.navbar-sub li.nav-item .dropdown-menu li.active a{
  color: var(--bs-primary);
  background-color: var(--color-gray-100);
}

.navbar-sub li.parent_dynamic_input{
  flex-grow: 1;
  width: 500px;
}

@media (max-width: 1023px) {
  .navbar-sub li.parent_dynamic_input{
    min-width: 70px !important; 
    width: 100%;
  }
}



ul.custom-nav-tabs > .nav-item .nav-link.active{
  background-color: #fff;
  color: var(--bs-nav-link-color);
  border: 1px solid #fff;
}

[data-theme=dark] ul.custom-nav-tabs > .nav-item .nav-link.active{
  background-color: #1b232d;
  border: 1px solid #1b232d;
}

/* bg-light en tema oscuro se comporta como bg-dark */
[data-theme=dark] .bg-light {
  background-color: #1b232d !important;
}

/* bg-white en tema oscuro se comporta como bg-dark */
[data-theme=dark] .bg-white {
  background-color: #1b232d !important;
}


.bg-table-header {
  background-color: #f8f9fa;
}

[data-theme=dark] .bg-table-header {
  background-color: #1e252e;
}
[data-theme="dark"] .form-select{
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-theme="dark"] .ts-wrapper.is-invalid, 
[data-theme="dark"] .was-validated .invalid, 
[data-theme="dark"] .was-validated :invalid + .ts-wrapper {
  border-color: var(--bs-form-invalid-color) !important;
}

.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-control:invalid, 
.form-control.is-invalid {
  background-image: none;
  transition: none !important;

    
}
.was-validated .form-select:valid,
.form-select.is-valid,
.was-validated .form-select:invalid, 
.form-select.is-invalid { 
  background-image: var(--bs-form-select-bg-img) !important;
}



[data-theme=dark] .was-validated .form-control:valid,
[data-theme=dark] .form-control.is-valid{
  border-color: #2ed47e !important;
}


[data-theme=dark] .was-validated .form-control:invalid,
[data-theme=dark] .form-control.is-invalid{
  border-color: #ff5745 !important;
}


.day_type_icon {
  width: 22px;
  height: 22px;
  text-align: center;
  line-height: 22px;
  padding: 0;
  font-size: 15px;
  border-radius: 3px;
  color: #fff;
  display: inline-block;

}



.header-area {
  padding: 10px 11px;
  margin-top: 0;
  border-radius: 0 0 10px 10px;
}


.form-label {
  margin-bottom: 0.1rem;
}

.icon-profile-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  user-select: none;
}

.icon-profile-svg-departments {
  height: 42px !important; 
  overflow: hidden;
  width: 100%;
  max-width: 42px;
}

/* Color picker grid - 6 columnas */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  min-width: 220px;
}

.color-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
  position: relative;
}

.color-picker-item:hover {
  background-color: #f5f5f5;
}

.color-picker-item.active {
  background-color: #e3f2fd;
  box-shadow: 0 0 0 2px #1976d2;
}

.color-picker-item.active::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
  pointer-events: none;
}

[data-theme=dark] .color-picker-item:hover {
  background-color: #2d3748;
}

[data-theme=dark] .color-picker-item.active {
  background-color: #1e3a5f;
  box-shadow: 0 0 0 2px #4a9eff;
}

/* Shift schedule table - sin scroll lateral */
.shift-schedule-table {
  table-layout: fixed;
  width: 100%;
  font-size: 12px;
}
.shift-schedule-table th:first-child,
.shift-schedule-table td:first-child {
  width: 50px;
}
.shift-schedule-table th,
.shift-schedule-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.2rem 0.15rem !important;
  vertical-align: middle;
  line-height: 1.2;
}

/* Flecha blanca para selects en dark mode */
[data-theme=dark] .form-select.bg-white {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    border-color: #2d3748 !important;
}


.page-link-nav1 {
  min-height: 46px;

}

.page-link-nav1 a.page-link{
  padding-top: 10px;
  padding-bottom: 10px;
}

.page-link-nav1 a.page-link > span {
  font-size: 14px;
}
.page-link-nav1 a.page-link > i.material-symbols-outlined {
  margin-top:-1px;
}
.page-link-nav1 a.page-link > * {
  margin: 0 0.12rem;
}

.page-link-nav1 a.page-link, 
.page-link-nav1 span.page-link  {
  background-color: #ffffff;
  height: 100%;
}
.page-link-nav1 a.page-link.active {
  background-color: #0f79f3;
  border-color: #E7E2E2;
}

.page-link-nav1 a.page-link:hover {
  background-color: #0f79f3;
  color: #fff;
}

.page-link-nav1 .nav-complete{
  flex-grow: 1;
  
}

.page-link-nav1 .nav-complete span.page-link{
  pointer-events: none;
  height: 100%;
}


[data-theme=dark] .page-link-nav1 a.page-link, 
[data-theme=dark] .page-link-nav1 span.page-link {
  color: #4a9eff;
  background-color: #1b232d;
  border-color: #313949;
}
[data-theme=dark] .page-link-nav1 a.page-link.active {
  background-color: #0f79f3;
  color: #fff;
  border-color: #313949;
}
[data-theme=dark] .page-link-nav1 a.page-link:hover {
  background-color: #0f79f3;
  color: #fff;
}

@media (max-width: 767.98px) {
  .employees-list-text-truncate{
    max-width: 100%;
    display: block !important;
  }  
}
@media (min-width: 768px) and (max-width: 860px) {
  .employee-name-title{
    max-width: 240px;
  }

}
@media (min-width: 861px) and (max-width: 991px) {
  .employee-name-title{
    max-width: 320px;
  }

}
@media (min-width: 992px) and (max-width: 1199px) {
  .employee-name-title{
    max-width: 400px;
  }
  .employees-list-text-truncate{
    max-width: 200px;
  }
}
@media (min-width: 1200px) and (max-width: 1360px) {
  .employee-name-title{
    max-width: 360px;
  }
  .employees-list-text-truncate{
    max-width: 180px;
  }
}
@media (min-width: 1361px) and (max-width: 1580px) {
  .employee-name-title{
    max-width: 520px;
  }
  .employees-list-text-truncate{
    max-width: 260px;
  }
}
@media (min-width: 1581px) {

  .employees-list-text-truncate{
    max-width: 520px;
  }
}





.form-switch .form-check-input {
  background-color: #efefef;
  width: 2.3em;
  border: 1px solid;
  border-radius: 2em;
}
.form-switch .form-check-label {
  line-height: 25px;
  cursor: pointer;
}
.form-check-success .form-check-input:checked[type="checkbox"] {
  border-color: #2ed47e;
  background-color: #2ed47e;
}
[data-theme=dark] .form-switch .form-check-input {
  background-color: #CCC;
}


[data-theme=light] .btn-outline-success{
  color: #00b356;
  border-color: #00b356;
}

[data-theme=light] .text-success{
  color: #00b356 !important;
}

.table-no-last-border tr:last-child td{
  border-bottom: 0;
}



.flex-grow-1 {
  min-width: 0;
}


.btn-palette{
  width: 44px;
  height: 44px;
  padding: 0;
  margin-top: -50px;
  margin-right: 15%;
  background-color: #fff;
}
[data-theme=dark] .btn-palette{
  background-color: #1f242f;  
}

.text-hover-primary:hover, .hover-text-primary:hover, .text-hover-primary-child:hover * {
  color: #0f79f3 !important;
  transition: all ease 0.1s;
  opacity: 1 !important;
}
.text-hover-info:hover, .hover-text-info:hover {
  color: #00cae3 !important;
  transition: all ease 0.1s;
  opacity: 1 !important;
}
.text-hover-white:hover, .hover-text-white:hover, .text-hover-white:hover > * {
  color: #ffffff !important;
  transition: all ease 0.1s;
  opacity: 1 !important;
}

.table > :not(caption) > * > td{
  background-color: inherit;
}
.table > :not(caption) > * > th{
  color: inherit;
}

.text-color-inherit, .text-color-inherit td, .text-color-inherit th {
  color: inherit;
}
.bg-color-inherit, .bg-color-inherit td, .bg-color-inherit th{
  background-color: inherit;
}
.bg-orange{
  background-color: #FA9128;
}

.right-header-content .header-right-item .admin-profile .dropdown-menu {
  width: 320px;
}
.menu-vertical .menu-item .menu-link{
  transition: all ease 0.1s;
}

.menu-vertical .menu-item .menu-link:hover,
.menu-vertical .menu-item.open .menu-link.active:hover .title,
.menu-vertical .menu-item .menu-link:hover .menu-icon,
.menu-vertical .menu-item.open .menu-link.active:hover .menu-icon{
  /* color: #00cee9 !important; */
 
  color: #006ae2 !important; 
  transition: all ease 0.1s;
}

.menu-vertical .menu-item .menu-link:hover .title{
  text-decoration-line: underline;
  text-decoration-color: #00dcf7;
  text-decoration-thickness: 2px;
}

.menu-vertical .menu-item .menu-link .title{
  font-size: 15px;
}
.menu-vertical .menu-item .menu-link .menu-icon{
  color: inherit;
  font-size: 18px;
}

.sidebar-area .logo .logo-text,
[sidebar-data-theme="sidebar-hide"] .sidebar-area:hover .logo .logo-text {
  left: 37px;
}
@media only screen and (max-width: 1199px) {
  [sidebar-data-theme="sidebar-hide"] .sidebar-area .logo .logo-text {
    left: 37px;
  }
}

.default-table-area .table-responsive .table thead tr th {
  background-color: #f8f9fa;
  font-size: 15px;
}

[data-theme=dark] .default-table-area .table-responsive .table thead tr th {
  background-color: #1e252e;
}
[data-theme="dark"] .sidebar-area .logo .logo-text {
  color: #E1E6EE !important;
}


@media (max-width: 767.98px) {
  .fs-sm-14{
    font-size: 14px !important;
  }

}


@media only screen and (max-width: 1800px) {
  .default-table-area.table-employees .table-responsive .table {
    width: 100%;
  }
}




.table-hover > tbody > tr:hover > * {--bs-table-bg-state: #fafbfc;}
[data-theme="dark"] .table-hover > tbody > tr:hover > * {--bs-table-bg-state: #121924;}

.border-end-week{
  border-bottom: 2px dashed #ced4da !important;
}


.popover {
    background-color: #fff !important;
    font-size: 16px;
}
.popover-body {
    color: #475569; 
    font-weight: 600;
}
/* Si tiene header */
.popover-header {
    background-color: white !important;
    color: #212529;
}

/* Flechas para cada dirección */
.bs-popover-top > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after {
    border-top-color: white !important;
}

.bs-popover-end > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after {
    border-right-color: white !important;
}

.bs-popover-bottom > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after {
    border-bottom-color: white !important;
}

.bs-popover-start > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after {
    border-left-color: white !important;
}



.bar-worked-period {
  background-color: #0F79F3;
  cursor: pointer;
}
.bar-worked-period:hover {
  background-color: #1fa5ff;
}


/* Tom Select customizations */
.has-items .ts-control > input {
  margin-left: 1px !important;
}
.ts-dropdown .active, .ts-dropdown .active.create {
  color: var(--bs-primary) !important;
}
.ts-wrapper.form-control, .ts-wrapper.form-select{
  padding-top: inherit !important;
  padding-bottom: inherit !important;
}
.ts-control:not(.rtl){
  padding-left: 15px;
  padding-right: 25px !important;
  white-space: nowrap;
  max-width: 100%
}

.ts-control, .ts-control input{
  color: var(--color-white) !important;
}
.tom_select_with_icon .ts-control{
  padding-left: 40px !important;
}

.ts-dropdown .dropdown-input-wrap {
  position: relative;
}
.ts-dropdown .dropdown-input-wrap::before {
  content: "\f0d1";
  font-family: "remixicon";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}
.ts-dropdown .dropdown-input-wrap .dropdown-input {
  padding-left: 36px !important;
  background-color: var(--bs-white);
}
.ts-dropdown .dropdown-input-wrap .dropdown-input::placeholder {
  color: #c1c9d4;
}
.ts-control, .ts-wrapper.single.input-active .ts-control {
  cursor: pointer;
}




.form-control.h-42, .form-select.h-42 {
  height: 42px !important;
}
.form-select.h-42 {
  padding-top: 8px;
}
.ps-40{
  padding-left: 40px !important;
}
i.ico-h-42{
  top: 6px !important;
  padding-left: 12px;
}


/*
.tooltip-light.show {
    opacity: 1 !important;
}
.tooltip-light .tooltip-inner {
    background-color: #fff;
    color: #475569;
    border:1px solid #475569;
    font-size: 16px;
    font-weight: 600;
}


.tooltip-light.bs-tooltip-top .tooltip-arrow::before,
.tooltip-light.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #475569 !important;
}

.tooltip-light.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip-light.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: #475569 !important;
}
*/



/* Responsive Table Employees - Mobile View */
@media (max-width: 991px) {
  .table-employees .table thead {
    display: none;
  }
  
  .table-employees .table,
  .table-employees .table tbody,
  .table-employees .table tr {
    display: block;
    width: 100%;
  }
  
  .table-employees .table tr {
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
  }
  
  .table-employees .table td {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: 0 !important;
    border: none !important;
  }
  
  .table-employees .table td:before {
    content: attr(data-label);
    font-weight: 600;
    display: inline-block;
    margin-right: 8px;
    color: #64748b;
    font-size: 13px;
  }
  
  .table-employees .table td:first-child {
    padding-top: 0 !important;
  }
  
  .table-employees .table td:last-child {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  /* Ajustes específicos para el badge de estado */
  .table-employees .table td:nth-child(4) {
    margin-top: 8px;
  }
  
  /* Botones de acción en 3 columnas en móvil */
  .table-employees .table td:last-child .d-flex {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-content: stretch !important;
    margin-top: 0;
  }
  
  .table-employees .table td:last-child .d-flex a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.2s;
    text-decoration: none !important;
  }
  
  .table-employees .table td:last-child .d-flex a:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
  }
  
  [data-theme=dark] .table-employees {
    background-color: #131920;
  }

  [data-theme=dark] .table-employees .table td:last-child .d-flex a {
    background-color: #1b232d;
    border-color: #2d3748;
    text-decoration: none;
  }
  
  [data-theme=dark] .table-employees .table td:last-child .d-flex a:hover {
    background-color: #2d3748;
  }
  
  /* Empty state en móvil */
  .table-employees .table td[colspan] {
    display: table-cell !important;
  }
  
  .table-employees .table td[colspan]:before {
    display: none;
  }
  
  [data-theme=dark] .table-employees .table tr {
    background-color: transparent;
    border-color: #2d3748;
  }
}

@media (max-width: 767px) { 

  #employees-list .table-src-form #employeeSearch{
    width: 240px;
  }

}

/* Smaller time inputs for shift scheduling */
.time-input-subtle {
  padding: 0.25rem 0.5rem !important;
  font-size: 12px !important;
  height: auto !important;
}

/* Rotation steps container width limit */
.rotation-steps-container {
  max-width: 500px;
  margin: 0 auto;
}

/* Full width on mobile (compensates container-fluid padding) */
@media (max-width: 575px) {
   .container-fluid{
      --bs-gutter-x: 0.9rem;
   }
  #employees-list .table-src-form #employeeSearch{
    width: 168px;
  }
}

