/* Tamaño de fuente base reducido para mejor visualización en 1440x900 */
html {
  font-size: 14px; /* Reducido de 16px (por defecto) a 14px */
}

body {
  font-size: 1rem; /* Hereda del html, ahora 14px */
}

.button {
  box-shadow: 0 2px 2px #ddd;
  min-width: 8rem;
  padding: 0.5em;
  color: #357edd;
  cursor: pointer;
  border-radius: 0.25em;
  border: 1px solid #357edd;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-family: sans-serif;
  background-color: white;
}

.mini-button {
  color: #357edd;
  cursor: pointer;
  border: 1px solid #357edd;
  display: inline-block;
  text-decoration: none;
  font-family: sans-serif;
  font-size: small;
  padding: 0.25em;
  vertical-align: text-bottom;
  font-weight: 400;
  border-radius: 3px;
  box-shadow: 0 2px 2px #ddd;
}

.button.primary {
  color: white;
  background-color: #357edd;
}

.seleccionado {
  background-color: #007eff30 !important;
}

.button:active,
.mini-button:active {
  transform: translateY(2px);
  box-shadow: 0 0 0;
}

.primary:hover {
  border-color: #00449e;
  background-color: #00449e;
}

form input:focus,
form textarea:focus,
.input:focus,
button:focus {
  box-shadow: inset 0 0 2px rgba(67, 90, 111, 0.14), inset 0 0 0 1px #579ad9, 0 0 0 3px rgba(16, 112, 202, 0.14);
  outline: 0;
  z-index: 2;
}

.bg-azul {
  background-color: #163253;
}

.flex1 {
  flex: 1;
}

h1 {
  font-size: 1.5rem !important;
  font-weight: 300;
}

form label {
  width: 300px;
  display: inline-block;
  color: gray;
  padding-bottom: 5px;
  user-select: none;
}

form input,
form textarea {
  width: 100%;
  display: inline-block;

  /*.input*/
  box-shadow: inset 0 1px 3px #ddd;

  /* pa2 */
  padding: 0.5rem;

  /*.br2*/
  border-radius: 0.25rem;

  /*.b--light-silver*/
  border-color: #aaa;

  /* .ba */
  border-style: solid;
  border-width: 1px;
}

form select {
  width: 100%;
  display: inline-block;

  /* pa2 */
  padding: 0.5rem;
    border-radius: 0.25rem;
    border-color: #aaa;
    border-style: solid;
    border-width: 1px;
}

form p {
  padding-top: 0.5em;
}

/* Estilos específicos para audit trail */
.audit-header {
  background-color: #e6f3ff !important;
  border-bottom: 2px solid #b3d9ff !important;
  font-weight: bold !important;
}

.audit-row {
  border-bottom: 1px solid #e0e0e0 !important;
  transition: background-color 0.2s ease;
}

.audit-row:hover {
  background-color: #f8f9fa !important;
}

/* Columnas con anchos fijos para mantener alineación */
.audit-col-fecha {
  flex: 0 0 15% !important;
  min-width: 0;
  border-right: 1px solid #e0e0e0;
}

.audit-col-usuario {
  flex: 0 0 10% !important;
  min-width: 0;
  border-right: 1px solid #e0e0e0;
}

.audit-col-rol {
  flex: 0 0 10% !important;
  min-width: 0;
  border-right: 1px solid #e0e0e0;
}

.audit-col-amb {
  flex: 0 0 10% !important;
  min-width: 0;
  border-right: 1px solid #e0e0e0;
}

.audit-col-tipo {
  flex: 0 0 10% !important;
  min-width: 0;
  border-right: 1px solid #e0e0e0;
}

.audit-col-descripcion {
  flex: 0 0 40% !important;
  min-width: 0;
}

.audit-date {
  font-size: 0.875rem;
  line-height: 1.2;
}

.audit-time {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.2;
}

.audit-link {
  color: #0066cc !important;
  text-decoration: none;
}

.audit-link:hover {
  color: #004499 !important;
  text-decoration: underline;
}

.audit-consolidado {
  color: #8b4513 !important;
  text-decoration: none;
}

.audit-consolidado:hover {
  color: #654321 !important;
  text-decoration: underline;
}

.fila_detalle {
  /* pv1 */
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
}

.fila_detalle label {
  color: gray;
  display: inline-block;
  width: 200px;
  vertical-align: top;

  /* pv1 */
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.fila_detalle_contenido {
  /* pv1 */
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  display: inline-block;
}

.bloque-pre {
  white-space: pre;
  border: 1px solid #ccc;
}

.tabla {
  /* mv2 */
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  /* .ph1  */
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  /* .relative  */
  position: relative;
  /* .w-100  */
  width: 100%;
  /* .lh-copy, .nested-copy-line-height ol, .nested-copy-line-height p, .nested-copy-line-height ul { */
  line-height: 1.5;
  /* .dt--fixed  */
  table-layout: fixed;
  width: 100%;
  /* .b--moon-gray  */
  border-color: #ccc;
  /* .ba  */
  border-style: solid;
  border-width: 1px;
  /* .collapse  */
  border-collapse: collapse;
  border-spacing: 0;
}

.tabla.auto {
  table-layout: auto;
}

.tabla thead tr {
  /* .bg-light-blue  */
  background-color: #96ccff;
}

.tabla th {
  /* .w-50  */
  width: 50%;
  /* .truncate  */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* .tl  */
  text-align: left;
  /* .pa2  */
  padding: 0.5rem;
  /* .normal  */
  font-weight: 400;

  border-bottom: 1px solid #ccc;
}

.tabla tr {
  border-bottom: 1px solid #cccccc;
}

.tabla td {
  /* .v-top  */
  vertical-align: top;

  /* .truncate  */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* .pa2  */
  padding: 0.5rem;
}

a {
  text-decoration: none;
}

.disable,
.disabled {
  pointer-events: none;
}

.disable span,
.disabled span {
  pointer-events: none;
}

.select2-container {
  width: 100% !important;
}

.select2-selection {
  padding: 0.5em;
  height: 38px !important;
}

.select2-selection__rendered {
  line-height: initial !important;
}

.select2-selection__arrow {
  top: 4px !important;
}

.no-reducir {
  max-width: none;
}

.select2-selection.select2-selection--single:focus {
  box-shadow: inset 0 0 2px rgba(67, 90, 111, 0.14), inset 0 0 0 1px #579ad9, 0 0 0 3px rgba(16, 112, 202, 0.14);
  outline: 0;
  z-index: 2;
}

.select2-search__field:focus {
  outline: 0;
  z-index: 2;
}

.eliminar {
  color: #ff4136 !important;
  border: 1px solid #ff4136;
}

.desactivado {
  color: #999 !important;
  border: 1px solid #999 !important;
  pointer-events: none;
}

form input[type="checkbox"] {
  box-shadow: none;
}

.w-100 label {
  width: 100%;
}

.tabla-detalle {
  border: 1px solid gray;
  border-spacing: 0px;
}

.tabla-detalle th {
  background-color: #b0d1f9;
  font-weight: normal;
  border-bottom: 1px solid gray;
}

.tabla-detalle tr:not(:last-child) td {
  border-bottom: 1px solid gray;
}

.tabla-detalle td,
.tabla-detalle th {
  padding: 5px;
  text-align: left;
}

.VS-search .search_facet input {
  height: 19px !important;
}

.VS-search .search_input input {
  margin-top: 2px !important;
}

.VS-search .search_input .ui-autocomplete-input {
  margin-left: 11px;
}

/* Fuentes */

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Italic-webfont.woff") format("woff");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-BoldItalic-webfont.woff") format("woff");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Thin-webfont.woff") format("woff");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-ThinItalic-webfont.woff") format("woff");
  font-weight: 200;
  font-style: italic;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Light-webfont.woff") format("woff");
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-LightItalic-webfont.woff") format("woff");
  font-weight: 100;
  font-style: italic;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Medium-webfont.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-MediumItalic-webfont.woff") format("woff");
  font-weight: 300;
  font-style: italic;
}

.roboto {
  font-family: "Roboto";
}

.errorlist {
  display: flex;
  color: red;
  list-style: none;
  padding-left: 0;
}

input[disabled] {
  opacity: 0.5;
}

form .checkbox input[type="checkbox"] {
  width: 1.5em !important;
}

.error {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.info {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}

.warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}

.success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.no-user-select {
  user-select: none;
}

.link-desactivado {
  pointer-events: none;
  color: black;
}

div.VS-search-box-wrapper.VS-search-box {
  border: 1px solid #cdcdcd;
  border-radius: 5px;
  box-shadow: none;
}

.permisos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.measure2 {
  max-width: 38rem;
}

/* Mejoras en el calendario */

.flatpickr-weekdays {
  background-color: #e7e7e7 !important;
}

.flatpickr-months {
  background-color: #b9d9ff !important;
  padding-bottom: 0.5em;
}

.flatpickr-calendar.arrowBottom:before {
  border-top-color: #acacac !important;
}
.flatpickr-calendar {
  box-shadow: rgb(188, 188, 188) 0px 1px 4px 2px !important;
}

.boton-fecha {
  float: right;
  width: 50px;
  height: 36px;
  border-radius: 0;
  border: 1px solid gray;
  border-left: 0;
}

.input-fecha {
  width: calc(100% - 50px);
  border-radius: 3px 0px 0px 3px;
}

.errorlist {
  margin: 0 0 1rem 0;
}

.w6 {
  width: 20rem;
}

/* Footer */
.footer {
  display: block;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem;
  text-align: center;
  font-size: 12px;
}

/* Table Column Resizer Styles */
.tabla th {
  position: relative;
}

.column-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: transparent;
  cursor: col-resize;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.column-resizer:hover {
  background-color: rgba(53, 126, 221, 0.1);
}

.column-resizer:active {
  background-color: rgba(53, 126, 221, 0.2);
}

body.resizing {
  cursor: col-resize;
  user-select: none;
}

body.resizing * {
  cursor: col-resize !important;
}

/* Mejorar la apariencia de las tablas con resizers */
.tabla {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

/* Sobrescribir la clase auto cuando está junto con tabla */
.tabla.auto {
  table-layout: fixed !important;
}

.tabla th,
.tabla td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

/* Permitir que el contenido se ajuste mejor */
.tabla td {
  max-width: 0;
  word-wrap: break-word;
  white-space: normal;
  vertical-align: top;
}

/* Efecto sutil para indicar que las columnas son redimensionables */
.tabla th {
  position: relative;
  transition: background-color 0.2s ease;
}

.tabla th:hover {
  background-color: rgba(53, 126, 221, 0.05);
}

/* Estilos para columnas con ancho específico */
.tabla th.w-50,
.tabla th.w-25,
.tabla th.w-75 {
  position: relative;
}

/* No mostrar resizers en columnas con ancho específico */
.tabla th.w-50 .column-resizer,
.tabla th.w-25 .column-resizer,
.tabla th.w-75 .column-resizer {
  display: none;
}

/* Asegurar que las tablas mantengan su estructura */
.tabla thead tr {
  background-color: #96ccff;
}

.tabla tr {
  border-bottom: 1px solid #cccccc;
}

/* Estilos específicos para el resizer */
.column-resizer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 16px;
  background-color: #e0e0e0;
  border-radius: 0.5px;
  opacity: 0.6;
}

.column-resizer:hover::before {
  background-color: #357edd;
  opacity: 1;
  width: 2px;
  height: 20px;
}

/* Estilos específicos para tablas de contenido de caja */
.pa2.mt3 .tabla th {
  position: relative;
}

.pa2.mt3 .column-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background-color: transparent;
  cursor: col-resize;
  z-index: 10;
  transition: all 0.2s ease;
}

.pa2.mt3 .column-resizer:hover {
  background-color: rgba(53, 126, 221, 0.1);
}

.pa2.mt3 .column-resizer:active {
  background-color: rgba(53, 126, 221, 0.2);
}

/* Hacer los resizers más visibles en las tablas de contenido */
.pa2.mt3 .column-resizer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 18px;
  background-color: #d0d0d0;
  border-radius: 0.5px;
  opacity: 0.7;
}

.pa2.mt3 .column-resizer:hover::before {
  background-color: #357edd;
  opacity: 1;
  width: 2px;
  height: 24px;
}