/* -------------------------------------------------------------------------- */
/*                   Consulta compacta de órdenes de servicio                  */
/* -------------------------------------------------------------------------- */

/* Identidad discreta en el espacio libre de la barra superior (solo escritorio). */
.main-header { position: relative; }
.sir-header-welcome {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 330px));
  min-width: 0;
  height: 42px;
  align-items: center;
  gap: .65rem;
  padding: .32rem .85rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 9px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  pointer-events: none;
}
.sir-header-welcome-icon { font-size: 1.35rem; line-height: 1; opacity: .9; }
.sir-header-welcome-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.12; }
.sir-header-welcome-copy small { font-size: .58rem; font-weight: 800; letter-spacing: .15em; opacity: .78; }
.sir-header-welcome-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 700; }
.main-sidebar .user-panel .info { min-width: 0; }
.sir-sidebar-user-name { max-width: 175px; white-space: normal; overflow-wrap: anywhere; font-size: .81rem; font-weight: 700; line-height: 1.2; }
.sir-app-version[hidden] { display: none !important; }
.sir-app-version .nav-link { display: flex; align-items: center; padding: .55rem .8rem; color: #c8d0d8; cursor: default; }
.sir-app-version .nav-icon { margin-right: .65rem; font-size: .9rem; }
.sir-app-version strong, .sir-app-version small { display: block; font-size: .73rem; line-height: 1.25; }
.sir-app-version small { color: #aab7c4; }
.sir-dashboard-tab-short { display: none; }
.sir-home .content { padding-top: .65rem; }

/* -------------------------------------------------------------------------- */
/*                         Organigrama corporativo                            */
/* -------------------------------------------------------------------------- */
.org-page-header {
  padding: .75rem 0 .55rem;
}

.org-page-header h1 {
  margin: .08rem 0 0;
  color: #343a40;
  font-size: 1.65rem;
  font-style: normal;
  font-weight: 700;
}

.org-page-header p {
  margin: .12rem 0 0;
  color: #7a828a;
  font-size: .8rem;
}

.org-page-kicker {
  color: #b71c1c;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.org-workspace {
  --org-red: #b71c1c;
  --org-red-bright: #d72e38;
  --org-charcoal: #41464b;
  --org-gray: #6c757d;
  --org-border: #e0e3e6;
  --org-surface: #f5f6f7;
  padding-bottom: 1.25rem;
}

.org-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  padding: 1.25rem 1.4rem;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(118deg, #363a3e 0%, #565b60 59%, #a8171e 59.2%, #d72e38 100%);
  box-shadow: 0 10px 25px rgba(52, 58, 64, .18);
}

.org-hero::after {
  content: '';
  width: 180px;
  height: 180px;
  position: absolute;
  right: 12%;
  bottom: -145px;
  border: 25px solid rgba(255,255,255,.065);
  border-radius: 50%;
}

.org-hero > div {
  position: relative;
  z-index: 1;
}

.org-hero > div:first-child > span {
  color: rgba(255,255,255,.76);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.org-hero h2 {
  margin: .22rem 0 .12rem;
  font-size: 1.55rem;
  font-weight: 700;
}

.org-hero p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: .8rem;
}

.org-hero__actions {
  display: flex;
  gap: .55rem;
}

.org-hero__actions .btn {
  min-width: 112px;
  font-weight: 600;
}

.org-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(260px, 1.45fr) minmax(205px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: 1rem 0;
  padding: .85rem 1rem;
  border: 1px solid var(--org-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(52, 58, 64, .06);
}

.org-toolbar__field label {
  display: block;
  margin: 0 0 .25rem;
  color: #59616a;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.org-toolbar__field .form-control,
.org-toolbar__field .input-group-text,
.org-toolbar__field .btn {
  min-height: 34px;
  border-color: #d8dcdf;
  font-size: .75rem;
  font-weight: 600;
}

.org-toolbar__field .input-group-text {
  color: #6c757d;
  background: #f5f6f7;
}

.org-toolbar__controls {
  display: flex;
  align-items: center;
  gap: .28rem;
}

.org-toolbar__controls .btn {
  width: 34px;
  height: 34px;
  padding: 0;
}

#orgChartZoom {
  min-width: 42px;
  color: #606870;
  font-size: .7rem;
  font-weight: 800;
  text-align: center;
}

.org-summary > [class*='col-'] {
  margin-bottom: 1rem;
}

.org-summary__item {
  display: flex;
  align-items: center;
  gap: .7rem;
  height: 100%;
  min-height: 74px;
  padding: .78rem .9rem;
  border: 1px solid var(--org-border);
  border-left: 4px solid var(--org-charcoal);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(52, 58, 64, .055);
}

.org-summary__item > i {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--org-red);
  background: #fff0f1;
}

.org-summary__item strong,
.org-summary__item span {
  display: block;
}

.org-summary__item strong {
  color: #343a40;
  font-size: 1.25rem;
  line-height: 1;
}

.org-summary__item span {
  margin-top: .2rem;
  color: #7a828a;
  font-size: .69rem;
  font-weight: 600;
}

.org-summary__item--vacancy {
  border-left-color: var(--org-red);
}

.org-feedback {
  display: none;
  margin-bottom: .8rem;
  padding: .55rem .8rem;
  font-size: .78rem;
}

.org-feedback.is-visible {
  display: block;
}

.org-feedback--loading.is-visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: #69717a;
}

.org-search-result {
  display: none;
  margin: -.25rem 0 .55rem;
  color: #727a82;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: right;
}

.org-search-result.is-visible {
  display: block;
}

.org-canvas {
  min-height: 560px;
  overflow: auto;
  position: relative;
  border: 1px solid var(--org-border);
  border-radius: 12px;
  background-color: #f6f7f8;
  background-image: radial-gradient(#d9dde1 .75px, transparent .75px);
  background-size: 16px 16px;
  box-shadow: inset 0 1px 3px rgba(52, 58, 64, .04);
}

.org-workspace.is-loading .org-canvas,
.org-workspace.is-loading + .org-canvas,
#orgChartPage.is-loading .org-canvas {
  opacity: .55;
  pointer-events: none;
}

.sir-org-tree {
  display: inline-block;
  min-width: 100%;
  padding: 2rem 1.25rem 3rem;
  transform-origin: top left;
  transition: zoom .16s ease;
}

.sir-org-tree ul {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 34px 0 0;
  position: relative;
  list-style: none;
}

.sir-org-tree > ul {
  padding-top: 0;
}

.sir-org-tree li {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 34px 9px 0;
  position: relative;
  text-align: center;
}

.sir-org-tree > ul > li {
  padding-top: 0;
}

.sir-org-tree li::before,
.sir-org-tree li::after {
  content: '';
  width: 50%;
  height: 34px;
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #aeb4ba;
}

.sir-org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #aeb4ba;
}

.sir-org-tree li:only-child::before,
.sir-org-tree li:only-child::after,
.sir-org-tree > ul > li::before,
.sir-org-tree > ul > li::after {
  display: none;
}

.sir-org-tree li:first-child::before,
.sir-org-tree li:last-child::after {
  border: 0;
}

.sir-org-tree li:last-child::before {
  border-right: 2px solid #aeb4ba;
  border-radius: 0 7px 0 0;
}

.sir-org-tree li:first-child::after {
  border-radius: 7px 0 0 0;
}

.sir-org-tree ul ul::before {
  content: '';
  width: 0;
  height: 34px;
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #aeb4ba;
}

.org-position-card {
  width: 228px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: 1px solid #d8dcdf;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(52, 58, 64, .1);
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.org-position-card:hover {
  transform: translateY(-2px);
  border-color: #c4c9ce;
  box-shadow: 0 9px 21px rgba(52, 58, 64, .15);
}

.org-position-card.is-match {
  border-color: var(--org-red-bright);
  box-shadow: 0 0 0 3px rgba(183, 28, 28, .13), 0 8px 20px rgba(52, 58, 64, .12);
}

.org-position-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: .35rem .55rem;
  color: #fff;
  background: linear-gradient(110deg, #3f4449 0%, #575d62 70%, #b71c1c 70.5%, #d72e38 100%);
}

.org-position-card__top > span {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.org-node-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: .58rem;
}

.org-position-card__body {
  padding: .72rem .72rem .62rem;
}

.org-position-class {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: .35rem;
  padding: .2rem .38rem;
  border-radius: 5px;
  color: #9c1a20;
  background: #fff0f1;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-position-card h3 {
  min-height: 34px;
  margin: 0 0 .55rem;
  color: #343a40;
  font-size: .79rem;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.org-position-card__employees {
  display: grid;
  gap: .32rem;
}

.org-employee {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: center;
  width: 100%;
  padding: .3rem .36rem;
  border: 1px solid #eceeef;
  border-radius: 7px;
  color: #525960;
  background: #f8f9fa;
  font-size: .65rem;
  font-weight: 700;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}

.org-employee:hover,
.org-employee:focus {
  border-color: #d8aeb0;
  color: #8e181e;
  background: #fff5f5;
  outline: 0;
}

.org-employee img {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(52,58,64,.16);
}

.org-employee span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-employee i {
  color: #adb3b8;
  font-size: .55rem;
}

.org-vacancy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  min-height: 36px;
  border: 1px dashed #d3a5a7;
  border-radius: 7px;
  color: #a24b4f;
  background: #fff8f8;
  font-size: .59rem;
  font-weight: 800;
}

.org-position-card footer {
  padding: .34rem .7rem;
  border-top: 1px solid #eceeef;
  color: #81888f;
  background: #fafbfb;
  font-size: .56rem;
  font-weight: 700;
  text-align: right;
}

.sir-org-tree .is-collapsed > ul {
  display: none;
}

.org-empty {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 480px;
  color: #7b838a;
  text-align: center;
}

.org-empty.is-visible {
  display: flex;
}

.org-empty i {
  margin-bottom: .65rem;
  color: #b71c1c;
  font-size: 2rem;
}

.org-empty h3 {
  margin: 0;
  color: #4c5359;
  font-size: 1rem;
  font-weight: 700;
}

.org-empty p {
  margin: .2rem 0 0;
  font-size: .75rem;
}

.org-employee-modal .modal-header,
.org-structure-modal .modal-header {
  color: #fff;
  background: linear-gradient(110deg, #3d4247 0%, #555b60 68%, #b71c1c 68.5%, #d72e38 100%);
  border-bottom: 0;
}

.org-employee-modal .modal-header span,
.org-structure-modal .modal-header span {
  display: block;
  margin-bottom: .15rem;
  color: rgba(255,255,255,.72);
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.org-employee-modal .modal-title,
.org-structure-modal .modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.org-employee-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e5e8;
  border-left: 4px solid #b71c1c;
  border-radius: 9px;
  background: #f8f9fa;
}

.org-employee-profile img {
  width: 78px;
  height: 78px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(52,58,64,.18);
}

.org-employee-profile h3 {
  margin: 0;
  color: #343a40;
  font-size: 1.05rem;
  font-weight: 800;
}

.org-employee-profile p {
  margin: .15rem 0 .3rem;
  color: #5f666d;
  font-size: .77rem;
  font-weight: 600;
}

.org-employee-profile span {
  padding: .22rem .4rem;
  border-radius: 5px;
  color: #97181e;
  background: #fff0f1;
  font-size: .58rem;
  font-weight: 800;
}

.org-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.org-contact-grid > div {
  display: grid;
  grid-template-columns: 26px 1fr;
  padding: .65rem;
  border: 1px solid #e5e7e9;
  border-radius: 8px;
}

.org-contact-grid i {
  grid-row: 1 / 3;
  color: #b71c1c;
}

.org-contact-grid span {
  color: #8a9198;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.org-contact-grid strong {
  overflow-wrap: anywhere;
  color: #4b5258;
  font-size: .7rem;
  font-weight: 600;
}

.org-contact-grid__wide {
  grid-column: 1 / -1;
}

.org-structure-note {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: .75rem .85rem;
  border: 1px solid #e0e3e6;
  border-left: 4px solid #b71c1c;
  border-radius: 8px;
  color: #626a71;
  background: #f7f8f9;
}

.org-structure-note i {
  margin-top: .1rem;
  color: #b71c1c;
}

.org-structure-note p {
  margin: 0;
  font-size: .74rem;
}

.org-structure-modal label {
  color: #555d64;
  font-size: .69rem;
  font-weight: 800;
  text-transform: uppercase;
}

.org-structure-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 62px;
  margin-top: .35rem;
  padding: .8rem;
  border: 1px dashed #cbd0d4;
  border-radius: 8px;
  color: #555d64;
  background: #fafafa;
  font-size: .75rem;
}

.org-structure-preview span,
.org-structure-preview strong {
  max-width: 42%;
  text-align: center;
}

.org-structure-preview i {
  color: #b71c1c;
  font-size: 1.15rem;
}

@media (max-width: 1199.98px) {
  .org-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-toolbar__controls {
    justify-content: flex-end;
  }
}

@media (max-width: 767.98px) {
  .org-page-header p {
    display: none;
  }

  .org-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .org-hero h2 {
    font-size: 1.25rem;
  }

  .org-hero__actions {
    width: 100%;
    margin-top: .8rem;
  }

  .org-hero__actions .btn {
    flex: 1;
    min-width: 0;
  }

  .org-toolbar {
    grid-template-columns: 1fr;
    padding: .75rem;
  }

  .org-toolbar__controls {
    justify-content: center;
  }

  .org-summary__item {
    min-height: 68px;
    padding: .65rem;
  }

  .org-summary__item > i {
    display: none;
  }

  .org-canvas {
    min-height: 460px;
    overflow-x: hidden;
    padding: .35rem;
  }

  .sir-org-tree {
    display: block;
    width: 100%;
    min-width: 0;
    padding: .5rem;
    zoom: 1 !important;
  }

  .sir-org-tree ul,
  .sir-org-tree > ul {
    display: block;
    padding: 0;
  }

  .sir-org-tree ul ul {
    margin: .35rem 0 0 .85rem;
    padding-left: .75rem;
    border-left: 2px solid #c1c6cb;
  }

  .sir-org-tree ul ul::before,
  .sir-org-tree li::before,
  .sir-org-tree li::after {
    display: none;
  }

  .sir-org-tree li,
  .sir-org-tree > ul > li {
    display: block;
    padding: .45rem 0 0;
  }

  .org-position-card {
    width: 100%;
  }

  .org-position-card h3 {
    min-height: 0;
  }

  .org-contact-grid {
    grid-template-columns: 1fr;
  }

  .org-contact-grid__wide {
    grid-column: auto;
  }

  .org-structure-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .org-structure-preview span,
  .org-structure-preview strong {
    max-width: none;
  }

  .org-structure-preview i {
    transform: rotate(90deg);
    text-align: center;
  }
}

/* -------------------------------------------------------------------------- */
/*                    GLOBAL EXECUTIVE / COMPACT LAYOUT                       */
/* -------------------------------------------------------------------------- */
body:not(.login-page) {
  color: #2c3238;
  font-size: .875rem;
  background: #eef1f4;
}

body:not(.login-page) .content-wrapper { background: #f3f5f7; }
body:not(.login-page) .content-header { padding: .75rem .5rem .45rem; }
body:not(.login-page) .content-header h1 { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; }
body:not(.login-page) .content { padding: 0 .5rem .75rem; }
body:not(.login-page) .breadcrumb { margin: 0; padding: .25rem 0; background: transparent; font-size: .78rem; }

body:not(.login-page) .card {
  margin-bottom: .85rem;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(30, 38, 45, .055);
}
body:not(.login-page) .card-header { padding: .7rem .9rem; border-bottom-color: #e7eaed; }
body:not(.login-page) .card-title { font-size: .98rem; }
body:not(.login-page) .card-body { padding: .8rem .9rem; }
body:not(.login-page) .card-footer { padding: .6rem .9rem; }

body:not(.login-page) .table { margin-bottom: .5rem; color: #343a40; font-size: .8rem; }
body:not(.login-page) .table thead th {
  padding: .48rem .55rem;
  border-top: 0;
  border-bottom: 2px solid #d9dee3;
  color: #59616a;
  background: #f7f8f9;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
body:not(.login-page) .table td { padding: .45rem .55rem; vertical-align: middle; }
body:not(.login-page) .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(30, 40, 50, .025); }

body:not(.login-page) .form-group { margin-bottom: .72rem; }
body:not(.login-page) label { margin-bottom: .25rem; color: #555e67; font-size: .72rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
body:not(.login-page) .form-control { height: calc(1.8rem + 2px); padding: .3rem .55rem; border-color: #d6dbe0; border-radius: 5px; font-size: .82rem; }
body:not(.login-page) textarea.form-control { height: auto; min-height: 58px; }
body:not(.login-page) .select2-container--bootstrap4 .select2-selection { min-height: calc(1.8rem + 2px); border-color: #d6dbe0; border-radius: 5px; font-size: .82rem; }
body:not(.login-page) .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { line-height: 1.8rem; }

body:not(.login-page) .btn { border-radius: 5px; font-size: .8rem; font-weight: 600; }
body:not(.login-page) .btn-sm { padding: .25rem .48rem; font-size: .73rem; }
body:not(.login-page) .badge { font-size: .67rem; }

body:not(.login-page) .modal-content { overflow: hidden; border: 0; border-radius: 9px; box-shadow: 0 18px 55px rgba(17, 23, 28, .24); }
body:not(.login-page) .modal-header { padding: .65rem .85rem; border-bottom-color: #e4e7ea; }
body:not(.login-page) .modal-title { font-size: 1rem; font-weight: 700; }
body:not(.login-page) .modal-body { padding: .8rem; }
body:not(.login-page) .modal-footer { padding: .55rem .8rem; border-top-color: #e4e7ea; }

body:not(.login-page) div.dataTables_wrapper div.dataTables_length,
body:not(.login-page) div.dataTables_wrapper div.dataTables_filter,
body:not(.login-page) div.dataTables_wrapper div.dataTables_info,
body:not(.login-page) div.dataTables_wrapper div.dataTables_paginate { font-size: .76rem; }
body:not(.login-page) .page-link { padding: .3rem .52rem; font-size: .76rem; }

.purchase-pdf-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.purchase-list-card .card-title { display: block; float: none; margin: 0; }
.purchase-list-card .card-header small { clear: both; line-height: 1.35; }
#purchaseItemsTable .form-control { min-width: 72px; }
#purchaseItemsTable td { padding: .28rem; }

@media (min-width: 992px) {
  body:not(.login-page) .modal-lg { max-width: 860px; }
  body:not(.login-page) .modal-xl { max-width: min(1180px, calc(100vw - 2rem)); }
}

@media (max-width: 767.98px) {
  body:not(.login-page) .content-header { padding: .55rem .25rem .35rem; }
  body:not(.login-page) .content { padding: 0 .25rem .5rem; }
  body:not(.login-page) .content-header h1 { font-size: 1.18rem; }
  body:not(.login-page) .card-header,
  body:not(.login-page) .card-body { padding: .6rem; }
  body:not(.login-page) .modal-dialog { margin: .3rem; }
  body:not(.login-page) .modal-body { padding: .6rem; }
  .purchase-pdf-actions .btn { flex: 1 1 100%; }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #orgChartPage,
  #orgChartPage * {
    visibility: visible !important;
  }

  #orgChartPage {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
  }

  .org-page-header,
  .org-hero__actions,
  .org-toolbar,
  .org-summary,
  .org-feedback,
  .org-search-result,
  .main-footer {
    display: none !important;
  }

  .org-hero {
    min-height: 82px;
    margin-bottom: .5rem;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .org-canvas {
    min-height: 0;
    overflow: visible;
    border: 0;
    background: #fff;
  }

  .sir-org-tree {
    zoom: .72 !important;
  }

  .org-position-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

#ticketsPage .content-header {
  padding: .55rem 0 .45rem;
}

/* Dashboard de órdenes de servicio */
.service-dashboard {
  --dashboard-red: #b71c1c;
  --dashboard-charcoal: #41464b;
  --dashboard-text: #343a40;
  --dashboard-muted: #667085;
  --dashboard-border: #e5e9f0;
  --dashboard-surface: #f6f8fb;
  color: var(--dashboard-text);
}

.service-dashboard__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 132px;
  margin-bottom: 1rem;
  padding: 1.35rem 1.5rem;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 87% 18%, rgba(255, 255, 255, .2), transparent 25%),
    linear-gradient(118deg, #363a3e 0%, #5a5f64 57%, #a71920 57.2%, #d52b35 100%);
  box-shadow: 0 10px 26px rgba(65, 70, 75, .2);
}

.service-dashboard__hero::after {
  content: '';
  width: 190px;
  height: 190px;
  position: absolute;
  right: 15%;
  bottom: -150px;
  border: 26px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}

.service-dashboard__hero-copy,
.service-dashboard__hero-actions {
  position: relative;
  z-index: 1;
}

.service-dashboard__eyebrow {
  display: block;
  margin-bottom: .35rem;
  color: rgba(255, 255, 255, .72);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.service-dashboard__hero h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.service-dashboard__hero p {
  margin: .32rem 0 0;
  color: rgba(255, 255, 255, .8);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .025em;
}

.service-dashboard__hero-actions {
  display: flex;
  gap: .5rem;
}

.service-dashboard__hero-actions .btn {
  font-weight: 600;
}

.service-dashboard__report-button {
  color: #a71920 !important;
}

.service-dashboard__filters {
  display: grid;
  grid-template-columns: minmax(145px, .8fr) minmax(150px, .8fr) minmax(230px, 1.45fr) minmax(175px, 1fr) auto;
  gap: .8rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--dashboard-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(32, 50, 75, .06);
}

.service-dashboard__filter label {
  display: block;
  margin-bottom: .25rem;
  color: #475467;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.service-dashboard__filter .form-control,
.service-dashboard__filter .input-group-text {
  min-height: 34px;
  border-color: #d8dee8;
  font-size: .79rem;
  font-weight: 600;
}

.service-dashboard__filter .input-group-text {
  color: #667085;
  background: #f7f8fa;
}

.service-dashboard__filter-action .btn {
  min-height: 34px;
  white-space: nowrap;
}

.service-dashboard__loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: -.2rem 0 .8rem;
  padding: .45rem;
  color: #52647e;
  font-size: .78rem;
}

.service-dashboard__loading.is-visible {
  display: flex;
}

.service-dashboard__error {
  display: none;
  margin-bottom: .8rem;
  padding: .55rem .8rem;
  font-size: .8rem;
}

.service-dashboard__error.is-visible {
  display: block;
}

.service-dashboard.is-loading .service-dashboard__kpis,
.service-dashboard.is-loading .service-dashboard-card {
  opacity: .65;
}

.service-dashboard__kpis > [class*='col-'] {
  margin-bottom: 1rem;
}

.service-kpi {
  display: flex;
  align-items: center;
  gap: .85rem;
  height: 100%;
  min-height: 112px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dashboard-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 50, 75, .07);
  transition: transform .18s ease, box-shadow .18s ease;
}

.service-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(32, 50, 75, .11);
}

.service-kpi::before {
  content: '';
  width: 4px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--kpi-color);
}

.service-kpi--total { --kpi-color: #4b5157; --kpi-soft: #eff1f2; }
.service-kpi--pending { --kpi-color: #d93636; --kpi-soft: #fff0ee; }
.service-kpi--finished { --kpi-color: #007bff; --kpi-soft: #eaf4ff; }
.service-kpi--rate { --kpi-color: #737980; --kpi-soft: #f0f1f2; }

.service-kpi__icon {
  display: flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--kpi-color);
  background: var(--kpi-soft);
  font-size: 1.15rem;
}

.service-kpi span,
.service-kpi small {
  display: block;
}

.service-kpi span {
  color: #667085;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.service-kpi strong {
  display: block;
  margin: .05rem 0;
  color: #1d2939;
  font-size: 1.75rem;
  line-height: 1.15;
}

.service-kpi small {
  color: #98a2b3;
  font-size: .7rem;
}

.service-dashboard-card {
  min-height: 100%;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--dashboard-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 50, 75, .065);
  transition: opacity .15s ease;
}

.service-dashboard-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid #edf0f4;
}

.service-dashboard-card h3 {
  margin: 0;
  color: #24344f;
  font-size: 1rem;
  font-weight: 700;
}

.service-dashboard-card header p {
  margin: .18rem 0 0;
  color: #8993a4;
  font-size: .73rem;
}

.service-dashboard-card__tag {
  padding: .3rem .5rem;
  border-radius: 6px;
  color: #52647e;
  background: #f1f4f8;
  font-size: .65rem;
  font-weight: 700;
  white-space: nowrap;
}

.purchase-module-tabs {
  border-bottom: 1px solid #dfe4ea;
}

.purchase-module-tabs .nav-link {
  color: #667085;
  font-size: .82rem;
  font-weight: 700;
}

.purchase-module-tabs .nav-link.active {
  color: #b71c1c;
  border-top: 3px solid #b71c1c;
}

.purchase-dashboard-statuses {
  display: grid;
  gap: .58rem;
}

.purchase-dashboard-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .65rem;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fafbfc;
}

.purchase-dashboard-status-row strong {
  color: #253858;
  font-size: 1rem;
}

.service-dashboard-chart {
  position: relative;
}

.service-dashboard-chart--donut {
  height: 230px;
}

.service-dashboard-chart--bar {
  min-height: 220px;
  transition: height .2s ease;
}

.service-dashboard-chart--trend {
  height: 310px;
}

.service-dashboard-chart--status {
  min-height: 245px;
  transition: height .2s ease;
}

.service-dashboard-legend {
  display: flex;
  justify-content: center;
  gap: .8rem;
  margin-top: .6rem;
}

.service-dashboard-legend--wrap {
  flex-wrap: wrap;
}

.service-dashboard-legend__item {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .32rem .48rem;
  border-radius: 6px;
  color: #667085;
  background: #f7f8fa;
  font-size: .68rem;
  font-weight: 600;
}

.service-dashboard-legend__item strong {
  margin-left: .16rem;
  color: #253858;
  font-size: .78rem;
}

.service-dashboard-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.service-dashboard-muted {
  color: #98a2b3;
  font-size: .72rem;
}

.service-dashboard-card--breakdown {
  min-height: 0;
}

.service-dashboard-table-wrap {
  max-height: 440px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}

.service-dashboard-table {
  margin: 0;
  table-layout: fixed;
}

.service-dashboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .48rem .42rem;
  border-top: 0;
  border-bottom: 1px solid #dde3eb;
  color: #667085;
  background: #f6f8fb;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.service-dashboard-table thead th:first-child {
  width: 52%;
}

.service-dashboard-table tbody td {
  padding: .46rem .42rem;
  border-color: #edf0f4;
  color: #475467;
  font-size: .7rem;
  vertical-align: middle;
}

.service-dashboard-table tbody td:first-child span {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-dashboard-number {
  font-weight: 700;
}

.service-dashboard-number--pending { color: #d83c2e !important; }
.service-dashboard-number--finished { color: #0071e8 !important; }
.service-dashboard-number--total { color: #253858 !important; }

.service-dashboard-table__empty {
  padding: 1.6rem !important;
  color: #98a2b3 !important;
  text-align: center;
}

.service-dashboard__empty {
  display: none;
  align-items: center;
  flex-direction: column;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border: 1px dashed #cdd5df;
  border-radius: 10px;
  color: #667085;
  background: #fafbfc;
  text-align: center;
}

.service-dashboard__empty.is-visible {
  display: flex;
}

.service-dashboard__empty i {
  margin-bottom: .5rem;
  color: #98a2b3;
  font-size: 1.7rem;
}

.service-dashboard__empty h3 {
  margin: 0;
  color: #475467;
  font-size: .95rem;
  font-weight: 700;
}

.service-dashboard__empty p {
  margin: .2rem 0 0;
  font-size: .75rem;
}

@media (max-width: 1199.98px) {
  .service-dashboard__filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-dashboard__filter-action .btn {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .service-dashboard__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-dashboard__filter-action .btn {
    width: 100%;
  }

  .service-dashboard-chart--bar {
    margin-bottom: .8rem;
  }
}

@media (max-width: 575.98px) {
  .service-dashboard,
  .service-dashboard__hero,
  .service-dashboard__filters,
  .service-dashboard-card,
  .service-kpi {
    width: 100%;
    max-width: 100%;
  }

  .service-dashboard__hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 1.05rem;
  }

  .service-dashboard__hero h2 {
    font-size: 1.35rem;
  }

  .service-dashboard__hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: .85rem;
  }

  .service-dashboard__hero-actions .btn {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-right: .35rem;
    padding-left: .35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .service-dashboard__filters {
    grid-template-columns: 1fr;
    gap: .6rem;
    padding: .75rem;
  }

  .service-dashboard__filter,
  .service-dashboard__filter .form-control,
  .service-dashboard__filter-action {
    min-width: 0;
  }

  .service-kpi {
    min-height: 96px;
  }

  .service-dashboard-card {
    padding: .8rem;
  }

  .service-dashboard-card > header {
    align-items: flex-start;
    flex-direction: column;
    gap: .45rem;
  }

  .service-dashboard-chart--donut {
    height: 205px;
  }

  .service-dashboard-chart--trend {
    height: 250px;
  }

  .service-dashboard-legend {
    align-items: stretch;
    flex-direction: column;
    gap: .35rem;
  }

  .service-dashboard-legend__item {
    justify-content: space-between;
  }
}

#ticketsPage .ticket-page-heading,
#ticketsPage .ticket-page-actions,
#ticketTable_wrapper .ticket-table-toolbar,
#ticketTable_wrapper .ticket-table-tools,
#ticketTable_wrapper .ticket-table-footer {
  display: flex;
  align-items: center;
}

#ticketsPage .ticket-page-heading {
  justify-content: space-between;
  gap: .75rem;
}

#ticketsPage .ticket-page-title {
  margin: 0;
  font-size: 1.45rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
}

#ticketsPage .ticket-page-actions {
  justify-content: flex-end;
  gap: .85rem;
}

#ticketsPage .breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: .82rem;
}

#ticketsPage .content {
  padding: 0 .5rem .75rem;
}

#ticketsPage > .content > .row {
  margin-right: 0;
  margin-left: 0;
}

#ticketsPage > .content > .row > .col-12 {
  padding-right: 0;
  padding-left: 0;
}

#ticketsPage .ticket-list-card {
  margin-bottom: 0;
  border-radius: .35rem;
}

#ticketsPage .ticket-new-order-source {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .4rem;
}

#ticketsPage .ticket-table-card-body {
  padding: .6rem;
}

#ticketTable_wrapper .ticket-table-toolbar {
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .45rem;
}

#ticketTable_wrapper .ticket-table-tools {
  flex-wrap: wrap;
  gap: .45rem;
  min-width: 0;
}

#ticketTable_wrapper .ticket-table-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  min-width: 0;
}

#ticketTable_wrapper .ticket-table-search {
  min-width: 0;
}

#ticketTable_wrapper .ticket-table-new {
  flex: 0 0 auto;
}

#ticketTable_wrapper .ticket-table-new .btn {
  height: 32px;
  padding: .25rem .6rem;
  white-space: nowrap;
  font-size: .8rem;
}

#ticketTable_wrapper .dataTables_length,
#ticketTable_wrapper .dataTables_filter,
#ticketTable_wrapper .dt-buttons,
#ticketTable_wrapper .dataTables_info,
#ticketTable_wrapper .dataTables_paginate {
  float: none;
  margin: 0;
  padding: 0;
}

#ticketTable_wrapper .dataTables_length label,
#ticketTable_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 400;
}

#ticketTable_wrapper .dataTables_length select {
  width: auto;
  height: 30px;
  padding: .15rem 1.5rem .15rem .4rem;
  font-size: .8rem;
}

#ticketTable_wrapper .dataTables_filter input {
  width: 220px;
  height: 32px;
  margin: 0;
  padding: .25rem .55rem;
  font-size: .82rem;
}

#ticketTable_wrapper .dt-buttons {
  display: flex;
  flex-wrap: wrap;
}

#ticketTable_wrapper .dt-buttons .btn {
  padding: .26rem .52rem;
  font-size: .78rem;
  line-height: 1.25;
}

#ticketTable_wrapper .ticket-table-footer {
  justify-content: space-between;
  gap: .75rem;
  min-height: 34px;
  padding-top: .45rem;
}

#ticketTable_wrapper .dataTables_info {
  font-size: .78rem;
}

#ticketTable_wrapper .pagination .page-link {
  padding: .25rem .5rem;
  font-size: .78rem;
}

#ticketTable {
  width: 100% !important;
  margin: 0 !important;
}

#ticketTable thead th {
  padding: .45rem .42rem;
  border-top: 0;
  border-bottom-width: 1px;
  vertical-align: middle;
  white-space: nowrap;
  font-size: .72rem;
  line-height: 1.15;
}

#ticketTable tbody td {
  padding: .36rem .42rem;
  vertical-align: middle;
  font-size: .75rem;
  line-height: 1.2;
}

#ticketTable .ticket-row-number {
  width: 34px;
}

#ticketTable .ticket-folio {
  white-space: nowrap;
  font-weight: 600;
}

#ticketTable .ticket-cell-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ticketTable .ticket-cell-service {
  max-width: 300px;
}

#ticketTable .ticket-cell-company {
  max-width: 210px;
}

#ticketTable .ticket-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: .2rem .42rem;
  border-radius: .2rem;
  white-space: nowrap;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1;
}

#ticketTable .ticket-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  padding: 0;
}

#ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
#ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  margin-top: -8px;
}

#ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control {
  padding-left: 1.75rem;
}

#ticketTable_wrapper .dtr-details {
  width: 100%;
  margin: 0;
}

#ticketTable_wrapper .dtr-details > li {
  display: grid;
  grid-template-columns: minmax(105px, 35%) 1fr;
  gap: .5rem;
  padding: .38rem 0;
}

#ticketTable_wrapper .dtr-title {
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/*                    Consulta y actualización de una orden                   */
/* -------------------------------------------------------------------------- */
#modalTicketView .ticket-view-dialog {
  width: 96vw;
  max-width: 1500px;
  margin: .75rem auto;
}

#modalTicketView .ticket-view-modal {
  height: calc(100vh - 1.5rem);
  max-height: 920px;
}

#modalTicketView .modal-header,
#modalTicketView .modal-footer {
  flex: 0 0 auto;
  padding: .55rem .8rem;
}

#modalTicketView .modal-footer .btn {
  padding: .28rem .75rem;
}

#modalTicketView .ticket-primary-action {
  min-height: 42px;
  padding: .55rem 1rem;
  border-radius: .4rem;
  font-weight: 700;
}

#modalTicketView .ticket-view-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: .55rem .65rem;
  overflow: hidden;
}

#modalTicketView .ticket-view-body > .row {
  height: 100%;
  margin-right: -.3rem;
  margin-left: -.3rem;
}

#modalTicketView .ticket-view-column {
  height: 100%;
  padding-right: .3rem;
  padding-left: .3rem;
}

#modalTicketView .ticket-view-column > form {
  height: 100%;
}

#modalTicketView .ticket-detail-card,
#modalTicketView .ticket-update-card {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

#modalTicketView .card-header {
  min-height: 38px;
  padding: .48rem .65rem;
}

#modalTicketView .card-title {
  font-size: .95rem;
  font-weight: 600;
}

#modalTicketView .ticket-detail-scroll,
#modalTicketView .ticket-update-scroll {
  min-height: 0;
  padding: .55rem .65rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#modalTicketView .form-group {
  margin-bottom: .48rem;
}

#modalTicketView .col-form-label {
  display: block;
  margin-bottom: .15rem;
  padding: 0;
  color: #495057;
  font-size: .69rem;
  font-weight: 700;
  line-height: 1.15;
}

#modalTicketView .form-control,
#modalTicketView .custom-file,
#modalTicketView .custom-file-input,
#modalTicketView .custom-file-label {
  min-height: 32px;
  font-size: .78rem;
}

#modalTicketView .form-control {
  height: 32px;
  padding: .28rem .48rem;
}

#modalTicketView textarea.form-control {
  height: auto;
  min-height: 48px;
  line-height: 1.25;
  resize: vertical;
}

#modalTicketView #viewTicketCompany {
  min-height: 32px;
  height: 32px;
  resize: none;
}

#modalTicketView .ticket-update-scroll .row,
#modalTicketView .ticket-detail-scroll .row {
  margin-right: -.3rem;
  margin-left: -.3rem;
}

#modalTicketView .ticket-update-scroll [class*="col-"],
#modalTicketView .ticket-detail-scroll [class*="col-"] {
  padding-right: .3rem;
  padding-left: .3rem;
}

#modalTicketView .ticket-update-scroll .btn {
  padding: .3rem .65rem;
  font-size: .78rem;
}

#modalTicketView .ticket-view-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .65rem;
  background: rgba(255, 255, 255, .92);
  color: #495057;
  font-size: .9rem;
}

#modalTicketView .ticket-view-loading.is-visible {
  display: flex;
}

#modalTicketView .ticket-files-section {
  margin-top: .1rem;
  margin-bottom: .35rem;
}

#modalTicketView .ticket-file-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .42rem;
}

#modalTicketView .ticket-file-group {
  min-width: 0;
  padding: .42rem;
  border: 1px solid #dee2e6;
  border-radius: .3rem;
  background: #f8f9fa;
}

#modalTicketView .ticket-file-group--images {
  grid-column: 1 / -1;
}

#modalTicketView .ticket-file-group-title {
  margin-bottom: .25rem;
  color: #495057;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
}

#modalTicketView .ticket-file-list {
  min-width: 0;
}

#modalTicketView .ticket-file-list--images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: .42rem;
}

#modalTicketView .ticket-image-preview {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  min-width: 0;
	margin: 0;
	position: relative;
}

#modalTicketView .ticket-image-preview__delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 27px;
	height: 27px;
	position: absolute;
	top: -.35rem;
	right: -.15rem;
	z-index: 3;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	color: #fff;
	background: #c62828;
	box-shadow: 0 2px 7px rgba(0, 0, 0, .24);
	font-size: .7rem;
	cursor: pointer;
}

#modalTicketView .ticket-image-preview__delete:hover,
#modalTicketView .ticket-image-preview__delete:focus {
	background: #9f1f1f;
	outline: none;
}

#modalTicketView .ticket-image-preview__link {
  display: block;
  width: 118px;
  height: 82px;
  position: relative;
  overflow: hidden;
  border: 1px solid #d5dbe2;
  border-radius: .3rem;
  background: #e9ecef;
}

#modalTicketView .ticket-image-preview__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#modalTicketView .ticket-image-preview__open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  position: absolute;
  top: .35rem;
  right: .35rem;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 31, 48, .72);
  font-size: .68rem;
}

#modalTicketView .ticket-image-preview__caption {
  min-width: 0;
  max-height: 82px;
  padding: .1rem 0;
  overflow-y: auto;
  color: #495057;
  font-size: .69rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#modalTicketView .ticket-image-preview__caption-label {
  display: block;
  margin-bottom: .15rem;
  color: #8993a4;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .045em;
}

#modalTicketView .ticket-file-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  margin-top: .18rem;
  color: #117a8b;
  font-size: .73rem;
}

#modalTicketView .ticket-file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#modalTicketView .ticket-file-empty {
  padding: .45rem;
  border: 1px dashed #ced4da;
  border-radius: .3rem;
  color: #6c757d;
  font-size: .76rem;
  text-align: center;
}

@media (max-width: 767.98px) {
  #ticketsPage .content-header {
    padding: .45rem 0;
  }

  #ticketsPage .ticket-page-heading,
  #ticketsPage .ticket-page-actions,
  #ticketTable_wrapper .ticket-table-toolbar,
  #ticketTable_wrapper .ticket-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  #ticketsPage .ticket-page-title {
    font-size: 1.2rem;
  }

  #ticketsPage .ticket-page-actions {
    gap: .45rem;
  }

  #ticketsPage .breadcrumb {
    display: none;
  }

  #ticketsPage .content {
    padding-right: .25rem;
    padding-left: .25rem;
  }

  #ticketsPage .ticket-table-card-body {
    padding: .45rem;
  }

  #ticketTable_wrapper .ticket-table-tools,
  #ticketTable_wrapper .ticket-table-right,
  #ticketTable_wrapper .ticket-table-search,
  #ticketTable_wrapper .dataTables_filter,
  #ticketTable_wrapper .dataTables_filter label {
    width: 100%;
  }

  #ticketTable_wrapper .ticket-table-right {
    align-items: center;
    flex-direction: row;
    gap: .4rem;
  }

  #ticketTable_wrapper .ticket-table-new .btn {
    width: auto;
  }

  #ticketTable_wrapper .ticket-table-tools {
    align-items: center;
    justify-content: space-between;
  }

  #ticketTable_wrapper .dataTables_filter input {
    flex: 1 1 auto;
    width: auto;
  }

  #ticketTable_wrapper .dataTables_info,
  #ticketTable_wrapper .dataTables_paginate {
    text-align: center;
  }

  #ticketTable_wrapper .dataTables_paginate .pagination {
    justify-content: center;
  }

  #ticketTable thead th,
  #ticketTable tbody td {
    padding-right: .34rem;
    padding-left: .34rem;
  }

  #modalTicketView .ticket-view-dialog {
    width: auto;
    margin: .35rem;
  }

  #modalTicketView .ticket-view-modal {
    height: calc(100vh - .7rem);
    max-height: none;
  }

  #modalTicketView .ticket-view-body {
    overflow-y: auto;
  }

  #modalTicketView .ticket-view-body > .row,
  #modalTicketView .ticket-view-column,
  #modalTicketView .ticket-view-column > form,
  #modalTicketView .ticket-detail-card,
  #modalTicketView .ticket-update-card {
    height: auto;
  }

  #modalTicketView .ticket-update-column {
    order: 1;
  }

  #modalTicketView .ticket-detail-column {
    order: 2;
    margin-top: .55rem;
  }

  #modalTicketView .ticket-update-column .ticket-update-card {
    border-top: 3px solid #dc3545;
    box-shadow: 0 3px 12px rgba(52, 58, 64, .12);
  }

  #modalTicketView .ticket-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    font-size: .95rem;
  }

  #modalTicketView .ticket-view-column + .ticket-view-column {
    margin-top: 0;
  }

  #modalTicketView .ticket-detail-scroll,
  #modalTicketView .ticket-update-scroll {
    overflow: visible;
  }

  #modalTicketView .ticket-file-groups {
    grid-template-columns: 1fr;
  }

  #modalTicketView .ticket-image-preview {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  #modalTicketView .ticket-image-preview__link {
    width: 132px;
    height: 92px;
  }
}

@media (max-width: 399.98px) {
  #modalTicketView .ticket-file-list--images {
    grid-template-columns: 1fr;
  }

  #modalTicketView .ticket-image-preview {
    grid-template-columns: 1fr;
    gap: .28rem;
  }

  #modalTicketView .ticket-image-preview__link {
    width: 100%;
    height: 150px;
  }

  #modalTicketView .ticket-image-preview__caption {
    max-height: none;
    padding: 0 .05rem .2rem;
  }
}
/* -------------------------------------------------------------------------- */
/*                          Acceso corporativo SIR                            */
/* -------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #111417;
}

.sir-login {
  --login-red: #d71920;
  --login-red-dark: #9f1016;
  display: grid;
  min-height: 100vh;
  width: 100%;
  padding: clamp(.65rem, 1.6vh, 1rem) clamp(1rem, 4vw, 4rem) clamp(1.25rem, 4vh, 2.5rem);
  isolation: isolate;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 88%, rgba(215, 25, 32, .24), transparent 27%),
    radial-gradient(circle at 92% 10%, rgba(215, 25, 32, .18), transparent 24%),
    linear-gradient(135deg, #0d1012 0%, #1b2025 48%, #0b0d0f 100%);
}

.sir-login::before,
.sir-login::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(58vw, 820px);
  height: min(16vw, 220px);
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(90deg, rgba(215, 25, 32, .28), rgba(255, 255, 255, .035));
  box-shadow: 0 0 65px rgba(215, 25, 32, .08);
  transform: rotate(-28deg) skewX(-14deg);
}

.sir-login::before { top: 5%; left: -20%; }
.sir-login::after { right: -19%; bottom: 6%; transform: rotate(-28deg) skewX(-14deg) scaleX(-1); }

.sir-login__grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 75%, transparent);
}

.sir-login__glow {
  width: 22rem;
  height: 22rem;
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(215, 25, 32, .22);
  border-radius: 50%;
}

.sir-login__glow::before,
.sir-login__glow::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: inherit;
  inset: 12%;
}

.sir-login__glow::after { inset: 30%; border-color: rgba(215, 25, 32, .28); }
.sir-login__glow--left { left: -12rem; bottom: -10rem; }
.sir-login__glow--right { top: -12rem; right: -10rem; }

.sir-login__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  width: min(100%, 1240px);
  min-height: min(680px, calc(100dvh - 2.5rem));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: rgba(28, 32, 36, .86);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
  backdrop-filter: blur(18px);
}

.sir-login__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 6rem);
  position: relative;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 54%),
    linear-gradient(135deg, rgba(215, 25, 32, .08), transparent 55%);
}

.sir-login__brand::after {
  content: '';
  width: 2px;
  position: absolute;
  top: 12%;
  right: 0;
  bottom: 12%;
  background: linear-gradient(transparent, var(--login-red), transparent);
  opacity: .6;
}

.sir-login__eyebrow,
.sir-login__access-kicker {
  margin: 0 0 .7rem;
  color: #e13a40;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.sir-login__brand h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.2vw, 3.65rem);
  font-weight: 300;
  line-height: 1.03;
  letter-spacing: -.045em;
}

.sir-login__brand h1 strong { font-weight: 700; }

.sir-login__brand-lockup {
  display: flex;
  width: min(100%, 480px);
  margin: 2.4rem 0 1.6rem;
  flex-direction: column;
  align-items: flex-start;
}

.sir-login__operated-by {
  margin: 0 0 .8rem;
  color: #aeb4ba;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.sir-login__antongas-logo {
  width: min(100%, 455px);
}

.sir-login__antongas-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.sir-login__description {
  max-width: 480px;
  margin: 1.55rem 0 0;
  color: #b7bdc3;
  font-size: clamp(.96rem, 1.5vw, 1.08rem);
  line-height: 1.65;
}

.sir-login__features {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.3rem;
  margin-top: 2rem;
  color: #d7dadd;
  font-size: .83rem;
}

.sir-login__features i { margin-right: .38rem; color: #ef3b42; }

.sir-login__access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.75rem);
  color: #252a2f;
  background: rgba(255, 255, 255, .97);
}

.sir-login__access-head { display: flex; align-items: center; gap: 1rem; }

.sir-login__access-icon {
  display: grid;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ef3a42, #a90f15);
  box-shadow: 0 8px 22px rgba(183, 28, 28, .25);
  place-items: center;
}

.sir-login__access-kicker { margin-bottom: .15rem; font-size: .64rem; }
.sir-login__access h2 { margin: 0; color: #252a2f; font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 400; }
.sir-login__access h2 strong { color: #bd181f; }
.sir-login__message { margin: 1.75rem 0 1.4rem; color: #747c84; font-size: .93rem; }

.sir-login__form label {
  display: block;
  margin: 0 0 .35rem;
  color: #555d65;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.sir-login__control {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid #dce0e3;
  border-radius: 10px;
  background: #f8f9fa;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.sir-login__control:focus-within { border-color: #d52a31; background: #fff; box-shadow: 0 0 0 3px rgba(215, 25, 32, .1); }
.sir-login__control i { width: 46px; color: #a0a6ac; text-align: center; }

.sir-login__control input {
  flex: 1;
  width: 100%;
  height: 46px;
  padding: 0 .8rem 0 0;
  border: 0;
  outline: 0;
  color: #252a2f;
  background: transparent;
  font-size: .95rem;
}

.sir-login__control input::placeholder { color: #a4aab0; }

.sir-login__submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  margin-top: 1.35rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(100deg, #b51219, #df2d34);
  box-shadow: 0 10px 24px rgba(183, 28, 28, .24);
  font-size: .94rem;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease;
}

.sir-login__submit:hover,
.sir-login__submit:focus { color: #fff; box-shadow: 0 13px 28px rgba(183, 28, 28, .34); transform: translateY(-1px); }
.sir-login__footer { margin: 1.6rem 0 0; color: #939aa1; font-size: .72rem; text-align: center; }
.sir-login__footer i { margin-right: .35rem; color: #bd181f; }

.sir-login__brands { margin-top: 1.15rem; padding-top: .85rem; border-top: 1px solid #eceff2; }
.sir-login__brands > p { margin: 0 0 .55rem; color: #8a9299; font-size: .55rem; font-weight: 800; letter-spacing: .13em; text-align: center; }
.sir-login__brands-window { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.sir-login__brands-track { display: flex; width: max-content; align-items: center; gap: .7rem; animation: sirBrands 30s linear infinite; }
.sir-login__brands-track img { width: 138px; height: 50px; padding: .18rem .35rem; border: 1px solid #edf0f2; border-radius: 8px; background: #fff; object-fit: contain; }
@keyframes sirBrands { to { transform: translateX(calc(-50% - .35rem)); } }

@media (min-width: 768px) and (max-height: 760px) {
  .sir-login__shell { min-height: calc(100dvh - 2rem); }
  .sir-login__brand { padding-top: 2rem; padding-bottom: 2rem; }
  .sir-login__brand-lockup { margin-top: 1.35rem; margin-bottom: .8rem; }
  .sir-login__description { margin-top: .75rem; }
  .sir-login__features { margin-top: 1rem; }
  .sir-login__access { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .sir-login__message { margin-top: 1rem; margin-bottom: .85rem; }
  .sir-login__control { margin-bottom: .7rem; }
  .sir-login__submit { margin-top: .75rem; }
  .sir-login__footer { margin-top: .9rem; }
  .sir-login__brands { margin-top: .7rem; padding-top: .55rem; }
  .sir-login__brands-track img { height: 43px; }
}

@media (max-width: 767.98px) {
  .sir-login { padding: .65rem 1rem 1rem; }
  .sir-login__shell { display: block; width: min(100%, 440px); min-height: auto; border-radius: 20px; }
  .sir-login__brand { padding: 1.6rem 1.7rem 1.45rem; }
  .sir-login__brand::after { width: auto; height: 2px; top: auto; right: 8%; bottom: 0; left: 8%; background: linear-gradient(90deg, transparent, var(--login-red), transparent); }
  .sir-login__description,
  .sir-login__features { display: none; }
  .sir-login__eyebrow { margin-bottom: .45rem; font-size: .6rem; }
  .sir-login__brand h1 { font-size: 1.65rem; line-height: 1.08; }
  .sir-login__brand h1 br { display: none; }
  .sir-login__brand-lockup { width: min(100%, 280px); margin: .8rem auto .35rem; align-items: center; }
  .sir-login__operated-by { margin-bottom: .45rem; font-size: .55rem; }
  .sir-login__antongas-logo { width: min(100%, 280px); }
  .sir-login__access { padding: 1.65rem 1.7rem 1.45rem; }
  .sir-login__message { margin: 1.3rem 0 1.15rem; }
  .sir-login__brands { margin-top: .85rem; padding-top: .65rem; }
  .sir-login__brands-track img { width: 112px; height: 42px; }
}

@media (max-width: 374.98px) {
  .sir-login { padding: .65rem; }
  .sir-login__brand,
  .sir-login__access { padding-right: 1.2rem; padding-left: 1.2rem; }
  .sir-login__access-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sir-login__submit,
  .sir-login__control { transition: none; }
  .sir-login__brands-track { animation: none; }
}

/* -------------------------------------------------------------------------- */
/*                         PURCHASE ORDERS MODULE                              */
/* -------------------------------------------------------------------------- */
.purchase-page .content-header { padding: .6rem .5rem; }
.purchase-dashboard .service-dashboard__filters { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.purchase-dashboard .service-dashboard__filter-action { display: flex; flex-wrap: wrap; gap: .35rem; }
.purchase-page .ticket-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; }
.purchase-page .ticket-page-title { margin: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 600; }
.purchase-page .breadcrumb { margin: 0; padding: 0; background: transparent; font-size: .82rem; }
.purchase-list-card { overflow: hidden; border: 0; border-radius: 14px; box-shadow: 0 8px 25px rgba(25, 31, 36, .08); }
.purchase-list-card .card-header { padding: .5rem 1rem; background: linear-gradient(135deg, #fff, #fafbfc); }
.purchase-list-card .purchase-list-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .65rem; }
.purchase-list-card .purchase-list-heading .card-title { float: none; margin: 0; font-size: .95rem; }
.purchase-list-card .card-body { padding: .25rem 1rem 1rem; }
.purchase-field-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; gap: .45rem; align-items: end; margin: .35rem 0 .55rem; padding: .55rem .65rem; border: 1px solid #e3e7eb; border-radius: 8px; background: #f8fafc; }
.purchase-filter-field { min-width: 0; }
.purchase-filter-field label { display: block; margin: 0 0 .15rem; color: #66717b; font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.purchase-filter-field .form-control { width: 100%; height: 31px; min-width: 0; padding: .2rem 1.45rem .2rem .45rem; font-size: .72rem; }
.purchase-filter-clear { height: 31px; white-space: nowrap; }
.ticket-field-filters { display: grid; grid-template-columns: minmax(125px, .7fr) repeat(3, minmax(135px, 1fr)) auto; gap: .35rem; align-items: center; margin: .12rem 0 .38rem; padding: .34rem .45rem; border: 1px solid #e3e7eb; border-radius: 7px; background: #f8fafc; }
.ticket-field-filters .form-control { width: 100%; min-width: 0; height: 29px; padding: .12rem 1.35rem .12rem .38rem; font-size: .69rem; line-height: 1.05; }
.ticket-field-filters input[type="month"] { padding-right: .3rem; }
.ticket-filter-clear { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; height: 29px; padding: .15rem .48rem; font-size: .68rem; white-space: nowrap; }
.purchase-table-search { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.purchase-table-search label { display: flex; align-items: center; gap: .4rem; margin: 0; }
.purchase-table-search .purchase-table-new-order { flex: 0 0 auto; white-space: nowrap; }
.purchase-setup-alert { border: 0; border-radius: 12px; box-shadow: 0 6px 18px rgba(23, 162, 184, .12); }
.purchase-status { display: inline-flex; align-items: center; gap: .22rem; padding: .26rem .42rem; border: 1px solid transparent; border-radius: 999px; color: #394047; background: #e9ecef; font-size: .63rem; font-weight: 700; white-space: nowrap; }
.purchase-status i { width: .7rem; font-size: .62rem; text-align: center; }
.purchase-status--pendiente,
.purchase-status--solicitada { color: #9f1239; background: #ffe4e6; border-color: #fecdd3; }
.purchase-status--cotizada,
.purchase-status--en-cotizacion { color: #9a3412; background: #ffedd5; border-color: #fed7aa; }
.purchase-status--por-autorizar { color: #854d0e; background: #fef9c3; border-color: #fde68a; }
.purchase-status--autorizada { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.purchase-status--orden-emitida { color: #0e7490; background: #cffafe; border-color: #a5f3fc; }
.purchase-status--pagada { color: #5b21b6; background: #ede9fe; border-color: #ddd6fe; }
.purchase-status--facturada { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.purchase-status--completada { color: #166534; background: #dcfce7; border-color: #86efac; }
.purchase-status--cancelada { color: #4b5563; background: #e5e7eb; border-color: #d1d5db; }
.purchase-linked-order { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .55rem; margin-bottom: .35rem; border: 1px solid #dde3e8; border-radius: .4rem; background: #f8fafc; }
.purchase-linked-order a { display: flex; align-items: center; min-width: 0; color: #263238; }
.purchase-linked-order a span { margin-left: .5rem; overflow: hidden; color: #66737d; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.purchase-linked-order .btn { flex: 0 0 auto; padding: .1rem .3rem; }
#purchaseServiceLinkForm .input-group { flex-wrap: nowrap; }
#purchaseServiceLinkForm .select2-container { flex: 1 1 0; width: 0 !important; min-width: 0; }
#purchaseServiceLinkForm .input-group-append { flex: 0 0 auto; }
#modalPurchaseView .purchase-service-select + .select2 .select2-selection__rendered,
#modalPurchaseCreate #purchaseServiceOrder + .select2 .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 25px; font-size: .78rem; }
.purchase-service-dropdown .select2-results > .select2-results__options { max-height: min(240px, 30vh); overflow-y: auto; overscroll-behavior: contain; }
.purchase-service-dropdown .select2-results__option { padding: .45rem .6rem; font-size: .78rem; line-height: 1.2rem; white-space: normal; overflow-wrap: anywhere; }
.purchase-service-dropdown .select2-search__field { font-size: .82rem; }
.purchase-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.purchase-detail-grid > div,
.purchase-detail-wide { padding: .8rem .9rem; border: 1px solid #e5e8eb; border-radius: 10px; background: #fafbfc; }
.purchase-detail-grid strong,
.purchase-detail-wide strong { display: block; margin-bottom: .25rem; color: #707880; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.purchase-detail-grid span { display: block; color: #252a2f; font-weight: 600; text-transform: uppercase; }
.purchase-detail-wide { margin-top: .75rem; }
.purchase-detail-wide p { margin: 0; white-space: pre-wrap; }
.purchase-section-title { padding-bottom: .55rem; border-bottom: 2px solid #d71920; font-weight: 700; text-transform: uppercase; }
.purchase-document { display: flex; align-items: center; gap: .75rem; margin-bottom: .55rem; padding: .7rem; border: 1px solid #e4e7ea; border-radius: 10px; color: #343a40; background: #fff; transition: border-color .18s ease, transform .18s ease; }
.purchase-document-row { display: flex; align-items: center; gap: .35rem; margin-bottom: .55rem; }
.purchase-document-row .purchase-document { flex: 1; min-width: 0; margin-bottom: 0; }
.purchase-document-row .btnPurchaseDocumentDelete { flex: 0 0 auto; }
.purchase-document:hover { border-color: #d71920; color: #b51219; transform: translateY(-1px); }
.purchase-document > i:first-child { width: 32px; color: #d71920; font-size: 1.45rem; text-align: center; }
.purchase-document span { min-width: 0; }
.purchase-document strong,
.purchase-document small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase-document small { color: #7b838b; }
.purchase-photo-heading { display: flex; align-items: center; justify-content: space-between; margin: .8rem 0 .45rem; color: #555d65; font-size: .72rem; letter-spacing: .04em; }
.purchase-photo-heading span { min-width: 24px; padding: .1rem .4rem; border-radius: 999px; color: #fff; background: #d71920; text-align: center; }
.purchase-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.purchase-photo-grid--scroll { max-height: 292px; overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; }
.purchase-photo { display: block; min-width: 0; overflow: hidden; border: 1px solid #e2e5e8; border-radius: 9px; color: #4e555b; background: #f5f6f7; }
.purchase-photo-entry { position: relative; min-width: 0; }
.purchase-photo-entry .btnPurchaseDocumentDelete { position: absolute; top: .3rem; right: .3rem; background: #fff; }
.purchase-photo:hover { border-color: #d71920; color: #b51219; }
.purchase-photo img { display: block; width: 100%; height: 108px; background: #eceff1; object-fit: contain; }
.purchase-photo small { display: block; overflow: hidden; padding: .3rem .4rem; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.purchase-history { margin: 0; padding: 0; list-style: none; }
.purchase-history li { display: flex; gap: .7rem; position: relative; padding: 0 0 1rem .15rem; }
.purchase-history li:not(:last-child)::before { content: ''; width: 2px; position: absolute; top: .65rem; bottom: -.1rem; left: .45rem; background: #e2e5e8; }
.purchase-history-dot { flex: 0 0 10px; height: 10px; margin-top: .3rem; z-index: 1; border-radius: 50%; background: #d71920; box-shadow: 0 0 0 4px #f9dfe0; }
.purchase-history strong,
.purchase-history small { display: block; }
.purchase-history small { color: #80878e; }
.purchase-history p { margin: .2rem 0 0; }
.purchase-history-actions { display: inline-flex; align-items: center; gap: .6rem; }
.purchase-history-actions .btn { line-height: 1; }
.purchase-action-card { margin-top: .85rem; padding: .9rem; border: 1px solid #e4e7ea; border-radius: 10px; }
.purchase-action-card h6 { font-weight: 700; text-transform: uppercase; }
.purchase-inline-supplier { margin: -.2rem 0 .9rem; padding: .85rem; border: 1px dashed #d71920; border-radius: 10px; background: #fffafa; }

/* Las acciones permanecen en la fila, sin saltos ni desplegables en móvil. */
#purchaseTable .purchase-concept-cell,
#purchaseTable .purchase-company-cell { overflow: hidden; font-size: .72rem; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
#purchaseTable .purchase-company-cell { font-size: .68rem; }
#purchaseTable .purchase-status-cell { width: 94px; min-width: 94px; padding-left: 3px; padding-right: 3px; text-align: center; white-space: nowrap; }
#purchaseTable .purchase-actions-cell { width: 96px; min-width: 96px; padding-left: 3px; padding-right: 3px; white-space: nowrap; vertical-align: middle; }
#purchaseTable .purchase-row-actions { display: inline-flex; flex-wrap: nowrap !important; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
#purchaseTable .purchase-row-actions .btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; margin: 0; padding: 0; border-radius: 4px; }
#purchaseTable .purchase-row-actions .btn i { font-size: .72rem; }
@media (max-width: 767.98px) {
  #purchaseTable .purchase-actions-cell { width: 124px; min-width: 124px; padding-left: 4px; padding-right: 4px; }
  #purchaseTable .purchase-row-actions { gap: 4px; }
  #purchaseTable .purchase-row-actions .btn { flex-basis: 36px; width: 36px; height: 36px; }
}

/* En escritorio, mostrar todas las columnas sin desplazamiento horizontal:
   el contenido se distribuye y envuelve dentro del ancho disponible. */
@media (min-width: 992px) {
  #ticketTable_wrapper,
  #purchaseTable_wrapper,
  .purchase-list-card .table-responsive { overflow-x: visible; }

  #ticketTable,
  #purchaseTable { width: 100% !important; min-width: 0; table-layout: fixed; }

  #ticketTable thead th,
  #ticketTable tbody td,
  #purchaseTable thead th,
  #purchaseTable tbody td {
    display: table-cell !important;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  #ticketTable .ticket-cell-ellipsis,
  #purchaseTable .purchase-concept-cell,
  #purchaseTable .purchase-company-cell {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal !important;
  }

  #ticketTable .ticket-status,
  #purchaseTable .purchase-status { max-width: 100%; white-space: nowrap; text-align: center; }

  #ticketTable .ticket-col-number { width: 3% !important; }
  #ticketTable .ticket-col-folio { width: 10% !important; }
  #ticketTable .ticket-col-open,
  #ticketTable .ticket-col-close { width: 9% !important; }
  #ticketTable .ticket-col-service { width: 24% !important; }
  #ticketTable .ticket-col-area { width: 9% !important; }
  #ticketTable .ticket-col-company { width: 15% !important; }
  #ticketTable .ticket-col-type { width: 7% !important; }
  #ticketTable .ticket-col-status { width: 8% !important; }
  #ticketTable .ticket-col-actions { width: 72px !important; }

  #ticketTable .ticket-cell-service,
  #ticketTable .ticket-cell-area,
  #ticketTable .ticket-cell-company,
  #ticketTable .ticket-cell-type {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  #purchaseTable th:nth-child(1) { width: 10%; }
  #purchaseTable th:nth-child(2) { width: 9%; }
  #purchaseTable th:nth-child(3) { width: 22%; }
  #purchaseTable th:nth-child(4) { width: 10%; }
  #purchaseTable th:nth-child(5) { width: 17%; }
  #purchaseTable th:nth-child(6) { width: 9%; }
  #purchaseTable th:nth-child(7) { width: 116px; }
  #purchaseTable th:nth-child(8) { width: 88px; }

  #purchaseTable .purchase-status-cell { width: 116px; min-width: 116px; }
  #purchaseTable .purchase-actions-cell { width: 88px; min-width: 88px; }
  #purchaseTable .purchase-row-actions { display: inline-flex; max-width: none; flex-wrap: nowrap !important; gap: 2px; }
  #purchaseTable .purchase-row-actions .btn { flex-basis: 25px; width: 25px; height: 25px; }

  #ticketTable .ticket-actions { width: 72px; min-width: 72px; white-space: nowrap !important; }
  #ticketTable .ticket-actions .btn-group { display: inline-flex; flex-wrap: nowrap !important; }

  #ticketTable tbody tr.child,
  #purchaseTable tbody tr.child { display: none !important; }

  #ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
  #ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before,
  #purchaseTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
  #purchaseTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before { display: none !important; }

  #ticketTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
  #purchaseTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control { padding-left: .42rem; }
}

/* Dato técnico para ordenar por edición; nunca ocupa espacio en la vista. */
.company-label-short { display: none; }
.order-mobile-company { display: none; }
@media (max-width: 1199.98px) {
  #ticketTable .company-label-full,
  #purchaseTable .company-label-full { display: none; }
  #ticketTable .company-label-short,
  #purchaseTable .company-label-short { display: inline; white-space: nowrap; }
}

#ticketTable thead th.ticket-sort-only,
#ticketTable tbody td.ticket-sort-only { display: none !important; }

@media (max-width: 991.98px) {
  .purchase-field-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-filter-clear { grid-column: span 2; justify-self: end; }
  .ticket-field-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .35rem; }
  .ticket-filter-clear { grid-column: span 2; justify-self: end; }
  #ticketTable .ticket-cell-ellipsis,
  #purchaseTable .purchase-concept-cell,
  #purchaseTable .purchase-company-cell {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #ticketTable .ticket-actions .btn-group,
  #purchaseTable .purchase-row-actions { flex-wrap: nowrap !important; }
}

@media (max-width: 767.98px) {
  #ticketTable .order-mobile-company,
  #purchaseTable .order-mobile-company {
    display: block;
    max-width: 100%;
    margin-top: .14rem;
    overflow: hidden;
    color: #58636f;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .025em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #ticketTable thead th,
  #ticketTable tbody td,
  #purchaseTable thead th,
  #purchaseTable tbody td { padding: .3rem .22rem; }
  #ticketTable .ticket-folio,
  #purchaseTable tbody td:first-child { font-size: .72rem; line-height: 1.1; }
  #ticketTable .ticket-status,
  #purchaseTable .purchase-status { min-height: 22px; padding: .18rem .26rem; font-size: .6rem; }
  #ticketTable .ticket-action-button { width: 30px; height: 30px; }
  #purchaseTable .purchase-actions-cell { width: auto; min-width: 0; padding-left: .1rem; padding-right: .1rem; }
  #purchaseTable .purchase-row-actions { gap: 2px; }
  #purchaseTable .purchase-row-actions .btn { flex-basis: 30px; width: 30px; height: 30px; }
  #purchaseTable_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control { padding-left: 1.35rem !important; }
}

/* Selectores administrativos de responsables: compactos y fáciles de recorrer. */
#modalTicketView .admin-user-select + .select2 .select2-selection--single { min-height: 31px; height: 31px; }
#modalTicketView .admin-user-select + .select2 .select2-selection__rendered { overflow: hidden; padding-right: 24px; font-size: .76rem; line-height: 29px; text-overflow: ellipsis; white-space: nowrap; }
#modalTicketView .admin-user-select + .select2 .select2-selection__arrow { height: 29px; }
#modalTicketView .select2-dropdown .select2-results__option { overflow: hidden; padding: .32rem .5rem; font-size: .76rem; line-height: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }
#modalTicketView .select2-dropdown .select2-search__field { height: 30px; padding: .2rem .45rem; font-size: .78rem; }

@media (max-width: 767.98px) {
  .purchase-list-card .card-body { padding: .2rem .55rem .75rem; }
  .purchase-table-search { width: 100%; margin-top: .45rem; }
  .purchase-table-search label { flex: 1 1 auto; min-width: 0; }
  .purchase-table-search label input { width: 100% !important; min-width: 0; }
  .purchase-field-filters { grid-template-columns: 1fr 1fr; padding: .45rem; }
  .ticket-field-filters { margin-bottom: .3rem; gap: .3rem; padding: .32rem; }
  .ticket-field-filters .form-control { height: 28px; font-size: .65rem; }
  .ticket-filter-clear { width: 29px; padding: 0; }
  .ticket-filter-clear-text { display: none; }
  .purchase-filter-field .form-control { font-size: .68rem; }
  .purchase-detail-grid { grid-template-columns: 1fr; gap: .5rem; }
  #modalPurchaseView .modal-dialog { margin: .35rem; }
  #modalPurchaseView .modal-body { padding: .75rem; }
  .purchase-action-card .form-row > div + div { margin-top: .55rem; }
}
.permission-matrix { width: 100%; table-layout: fixed; font-size: .72rem; }
.permission-matrix th,
.permission-matrix td { vertical-align: middle; padding: .08rem .18rem !important; line-height: 1; height: 26px; }
.permission-matrix thead th { padding: .18rem .2rem !important; line-height: 1; height: 27px; }
.permission-matrix .permission-module-column { width: 145px; }
.permission-matrix .permission-scope-column { width: 105px; }
.permission-matrix .permission-action-column { width: 64px; font-size: .72rem; }
.permission-matrix tbody th { white-space: normal !important; font-size: .7rem; }
.permission-matrix .form-control-sm {
  min-width: 0;
  width: 100%;
  height: 22px;
  min-height: 22px;
  font-size: .68rem;
  line-height: 1;
  padding: 0 .95rem 0 .16rem;
  border-radius: .15rem;
}
.permission-matrix .permission-action { text-align: center; text-align-last: center; font-weight: 700; }
.permission-matrix .border-success { border-width: 2px !important; background: #f0fff5; }
.permission-matrix .border-danger { border-width: 2px !important; background: #fff5f5; }
.permission-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; }
.permission-legend { font-size: .74rem; line-height: 1.25; }
.permission-legend span { display: inline-block; margin-right: .7rem; white-space: nowrap; }
.permission-footer-actions { display: flex; flex: 0 0 auto; }
.permission-user-select + .select2-container .select2-selection--single {
  height: 31px;
  min-height: 31px;
  font-size: .78rem;
}
.permission-user-select + .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 29px;
  padding-left: .55rem;
}
.permission-user-select + .select2-container .select2-selection--single .select2-selection__arrow { height: 29px; }
.permission-user-dropdown { font-size: .76rem; }
.permission-user-dropdown .select2-search--dropdown { padding: .25rem; }
.permission-user-dropdown .select2-search__field { height: 28px; padding: .15rem .4rem; font-size: .76rem; }
.permission-user-dropdown .select2-results__option { padding: .22rem .45rem; line-height: 1.1; min-height: 0; }
.module-visibility-matrix { max-width: 850px; }
.module-visibility-matrix th:first-child { width: 34%; }
.module-visibility-matrix td:nth-child(2) { width: 25%; }
.module-visibility-matrix td:nth-child(3) { width: 41%; }
.module-visibility-matrix .module-visibility-value { min-width: 170px; }
.purchase-request-page .card-header { gap: .5rem; }
.purchase-request-filters { display: flex; align-items: end; gap: .4rem; flex-wrap: wrap; }
.purchase-request-filters .form-group { min-width: 0; flex: 1 1 120px; }
.purchase-request-filters .form-group:nth-child(3) { flex-basis: 155px; }
.purchase-request-filters .form-group:nth-child(4) { flex-basis: 180px; }
.purchase-request-filters .btn { white-space: nowrap; align-self: end; }
@media (min-width: 1200px) { .purchase-request-filters { flex-wrap: nowrap; } }
@media (max-width: 575px) {
  .purchase-request-filters .form-group { flex-basis: calc(50% - .2rem); }
  .purchase-request-filters .form-group:nth-child(4) { flex-basis: 100%; }
  .purchase-request-filters .btn { flex: 1 1 auto; }
}
.purchase-request-item { padding: .34rem 0; border-bottom: 1px solid #e3e7ed; }
.request-item-line { display: grid; grid-template-columns: 2rem 5.5rem minmax(0,1.2fr) minmax(0,1fr) 2rem 1.75rem; gap: .35rem; align-items: center; }
.request-item-line .form-control { width: 100%; min-width: 0; height: 31px; }
.request-item-number { text-align: center; color: #4c5968; font-size: .78rem; }
.request-item-line .request-photo-button { position: relative; overflow: hidden; margin: 0; height: 30px; line-height: 21px; text-align: center; cursor: pointer; }
.request-photo-button input[type="file"] { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.request-item-line .request-remove-item { padding: .2rem; }
.request-item-preview { display: flex; gap: .5rem; align-items: center; padding: .25rem 0 .2rem 2.3rem; font-size: .75rem; color: #637184; }
.request-item-preview[hidden] { display: none; }
.request-assign-company { gap: .35rem; }
.request-photo-preview, .request-detail-photo { display: block; max-width: 180px; max-height: 135px; object-fit: contain; margin-top: .45rem; border: 1px solid #d7dce2; border-radius: .3rem; }
.request-photo-preview[hidden] { display: none; }
.request-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.request-detail-meta > div { border: 1px solid #dce2e9; border-radius: .35rem; padding: .5rem .65rem; }
.request-detail-meta small, .request-detail-meta strong { display: block; }
.request-detail-meta small { color: #687482; font-size: .68rem; font-weight: 700; }
.request-detail-products .table { width: 100%; table-layout: fixed; font-size: .82rem; line-height: 1.2; }
.request-detail-products .table th, .request-detail-products .table td { padding: .3rem .4rem; vertical-align: middle; overflow-wrap: anywhere; }
.request-detail-products .table thead th { color: #586575; background: #f4f6f9; font-size: .72rem; text-transform: uppercase; }
.request-detail-product-col { width: 39%; }
.request-detail-quantity-col { width: 10%; }
.request-detail-notes-col { width: 45%; }
.request-detail-photo-col { width: 6%; }
.request-detail-products .request-detail-photo { width: 34px; height: 34px; max-width: 34px; max-height: 34px; margin: 0 auto; }
.request-detail-products a { display: inline-block; }
.request-justification { white-space: pre-wrap; }
@media (max-width: 575.98px) {
  .request-detail-products .table, .request-detail-products tbody { display: block; }
  .request-detail-products colgroup, .request-detail-products thead { display: none; }
  .request-detail-products tr { display: grid; grid-template-columns: minmax(0,1fr) auto 38px; align-items: center; border-top: 1px solid #e1e5ea; padding: .2rem 0; }
  .request-detail-products .table td { border: 0; padding: .2rem .25rem; }
  .request-detail-products td:nth-child(1) { grid-column: 1; }
  .request-detail-products td:nth-child(2) { grid-column: 2; }
  .request-detail-products td:nth-child(3) { grid-column: 1 / 3; color: #566372; }
  .request-detail-products td:nth-child(4) { grid-column: 3; grid-row: 1 / 3; }
}
body:not(.login-page) .dataTables_wrapper .dataTables_length select {
  min-width: 4rem;
  width: auto;
  padding-right: 1.25rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 767.98px) {
  .sir-home .content { padding-top: .3rem !important; }
  .sir-home .card { margin-bottom: .5rem; }
  .sir-home > .content > .container-fluid > .card > .card-header {
    display: block;
    padding: .35rem .45rem !important;
  }
  .sir-home > .content > .container-fluid > .card > .card-header .card-title { display: none; }
  .sir-home > .content > .container-fluid > .card > .card-header .card-tools {
    float: none;
    margin: 0;
    width: 100%;
  }
  .sir-home .card-header .nav-pills { display: flex; flex-wrap: nowrap; gap: .2rem; overflow: visible; margin: 0 !important; width: 100%; }
  .sir-home .card-header .nav-pills .nav-item { flex: 1 1 0; min-width: 0; }
  .sir-home .card-header .nav-pills .nav-link { display: flex; justify-content: center; align-items: center; min-height: 34px; padding: .3rem .12rem; font-size: .75rem; font-weight: 700; line-height: 1.05; text-align: center; white-space: normal; }
  .sir-dashboard-tab-long { display: none; }
  .sir-dashboard-tab-short { display: inline; }
  .main-header.navbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 .35rem; }
  .main-header .navbar-nav { flex-direction: row; align-items: center; }
  .main-header .navbar-nav.ml-auto { margin-left: auto !important; }
  .main-header .navbar-nav .nav-link { display: flex; align-items: center; justify-content: center; min-width: 42px; height: 44px; padding: .45rem .55rem; }
  .main-header .sir-fullscreen-action { display: none; }
  .main-header .sir-logout-label { margin-left: .3rem; font-size: .8rem; }
  .sir-home > .content > .container-fluid > .card > .card-body { padding: .45rem !important; }
  .request-detail-meta { grid-template-columns: 1fr; }
  .request-item-line { grid-template-columns: 1rem 3.1rem minmax(0,1fr) minmax(0,1fr) 1.9rem 1.2rem; gap: .2rem; }
  .request-item-line .form-control { padding: .2rem .25rem; font-size: .7rem; }
  .request-item-line .request-photo-button { padding: .2rem; }
  .purchase-request-list { font-size: .82rem; }
  .purchase-request-page .card-header .btn { width: 100%; }
  .permission-matrix { min-width: 780px; }
  .permission-matrix .permission-module-column { position: sticky; left: 0; z-index: 2; background: #f4f6f9; }
  .permission-footer { display: block; }
  .permission-footer-actions { justify-content: flex-end; margin-top: .6rem; }
}
