:root {
  --left: 292px;
  --right: 392px;
  --machine: 220px;
  --rowh: 90px;
  --pv-font-scale: 1;
  --pv-fs-8: calc(0.5rem * var(--pv-font-scale));
  --pv-fs-9: calc(0.5625rem * var(--pv-font-scale));
  --pv-fs-9-5: calc(0.59375rem * var(--pv-font-scale));
  --pv-fs-10: calc(0.625rem * var(--pv-font-scale));
  --pv-fs-11: calc(0.6875rem * var(--pv-font-scale));
  --pv-fs-12: calc(0.75rem * var(--pv-font-scale));
  --pv-fs-13: calc(0.8125rem * var(--pv-font-scale));
  --pv-fs-14: calc(0.875rem * var(--pv-font-scale));
  --pv-fs-15: calc(0.9375rem * var(--pv-font-scale));
  --pv-fs-16: calc(1rem * var(--pv-font-scale));
  --pv-fs-17: calc(1.0625rem * var(--pv-font-scale));
  --pv-fs-18: calc(1.125rem * var(--pv-font-scale));
  --pv-fs-21: calc(1.3125rem * var(--pv-font-scale));
  --pv-fs-22: calc(1.375rem * var(--pv-font-scale));
  --pv-fs-24: calc(1.5rem * var(--pv-font-scale));
  --pv-fs-28: calc(1.75rem * var(--pv-font-scale));
  --pv-menu-font-size: var(--pv-fs-12);
  --pv-menu-compact-font-size: var(--pv-fs-12);
  --pv-menu-title-font-size: var(--pv-fs-10);
  --pv-menu-section-font-size: var(--pv-fs-9);
  --line: #d8e0eb;
  --soft: #f4f7fb;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #6d7788;
  --blue: #2458d3;
  --green: #1f9d72;
  --red: #c73d4a;
  --amber: #b78312;
  --nav: #0c1424;
  --shadow: 0 18px 42px rgba(13,25,46,.14);
  --pv-task-border-left: 5px;
  --pv-relation-line-color: #64748b;
  --pv-task-selection-color: #2458d3;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #e8edf5;
  color: var(--ink);
  font-family: Roboto,Arial,sans-serif;
  font-size: var(--pv-fs-13);
  overflow: hidden;
}

.pv-app {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--rail) var(--left) minmax(0,1fr) var(--right);
  grid-template-rows: minmax(0,1fr) 30px;
  transition: grid-template-columns .18s ease;
  overflow: hidden;
}

.pv-app.left-closed {
  grid-template-columns: var(--rail) 0 minmax(0,1fr) var(--right);
}

.pv-app.right-collapsed {
  grid-template-columns: var(--rail) var(--left) minmax(0,1fr) 0;
}

.pv-app.left-closed.right-collapsed {
  grid-template-columns: var(--rail) 0 minmax(0,1fr) 0;
}

.pv-rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.pv-rail-logo {
  border: 0;
  color: #fff;
  font-weight: 900;
}

.pv-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  font-size: var(--pv-fs-10);
  letter-spacing: .01em;
}

.pv-rail-btn span {
  font-size: var(--pv-fs-21);
  line-height: 1;
}

.pv-rail-btn.active, .pv-rail-btn:hover {
  background: #23314a;
  color: #fff;
}

.pv-rail-bottom {
  margin-top: auto;
  color: #77859c;
  font-size: var(--pv-fs-11);
  position: relative;
  bottom: -5px;
}

.pv-left {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  background: #f8fafc;
  border-right: 1px solid #dce4ef;
  box-shadow: 8px 0 26px rgba(27,43,70,.07);
  overflow: hidden;
  transition: opacity .16s ease;
}

.pv-app.left-closed .pv-left {
  opacity: 0;
  pointer-events: none;
}

.pv-left-head, .pv-panel-head {
  height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid #e0e6ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg,#fff,#f8fafc);
}

.pv-left-head h2, .pv-panel-head h2 {
  font-size: var(--pv-fs-16);
  margin: 0;
  font-weight: 900;
}

.pv-eyebrow {
  font-size: var(--pv-fs-10);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8591a4;
  font-weight: 900;
}

.pv-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  color: #596679;
  font-weight: 900;
}

.pv-icon-btn:hover {
  background: #edf3fb;
  color: #1e48b5;
}

.pv-tool-panel {
  display: none;
  padding: 14px 16px;
  height: calc(100% - 64px);
  overflow: auto;
}

.pv-tool-panel.active {
  display: block;
}

.pv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  margin-bottom: 14px;
}

.pv-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #172033;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.pv-brand b {
  display: block;
}

.pv-brand span {
  display: block;
  color: var(--muted);
  font-size: var(--pv-fs-12);
}

.pv-section {
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  padding: 13px;
  margin-bottom: 12px;
}

.pv-section-title, .pv-lane-title {
  font-size: var(--pv-fs-11);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #647084;
  font-weight: 900;
  margin-bottom: 10px;
}

.pv-muted {
  color: #728095;
  margin: 0;
  line-height: 1.45;
}

.pv-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pv-inline-control {
  display: grid;
  grid-template-columns: 92px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.pv-inline-control label {
  font-size: var(--pv-fs-11);
  color: #647084;
  font-weight: 900;
  margin: 0;
}

.pv-inline-control input {
  height: 30px;
  text-align: center;
  font-weight: 800;
}

.pv-inline-control span {
  color: #718096;
  font-weight: 800;
}

.pv-days-control input {
  max-width: 76px;
}

.pv-rowheight-control input {
  max-width: 76px;
}

.pv-nav-btn, .pv-toolbtn {
  border: 1px solid #d8e1ee;
  background: #fff;
  color: #26354d;
  border-radius: 10px;
  height: 30px;
  padding: 0 10px;
  font-weight: 800;
  font-size: var(--pv-fs-12);
}

.pv-nav-btn.active, .pv-toolbtn.active, .pv-toolbtn:hover, .pv-nav-btn:hover {
  background: #eaf1ff;
  border-color: #b8cbff;
  color: #234eaf;
}

.pv-toolbtn-primary {
  background: #172033;
  color: #fff;
  border-color: #172033;
}

.pv-save {
  background: #2458d3;
  color: #fff;
  border-color: #2458d3;
}

.pv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4c596d;
  font-weight: 800;
  margin: 0 0 12px;
}

.pv-daystrip {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(42px,1fr));
  gap: 6px;
  margin-top: 10px;
  max-width: 100%;
  overflow: hidden;
}

.pv-day {
  min-width: 0;
  border: 1px solid #dce4ef;
  background: #fff;
  border-radius: 12px;
  padding: 7px 2px;
  color: #526076;
}

.pv-day span {
  display: block;
  font-size: var(--pv-fs-9);
  font-weight: 900;
}

.pv-day b {
  display: block;
  font-size: var(--pv-fs-14);
}

.pv-day.active {
  border-color: #2458d3;
  color: #2458d3;
}

.pv-day.in-range {
  background: #eef4ff;
}

.pv-machine-filter {
  display: flex;
  flex-direction: column;
}

.pv-machine-filter label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px;
  background: #fbfdff;
}

.pv-machine-filter input {
  grid-row: 1 / span 2;
  margin-top: 3px;
}

.pv-machine-filter b {
  font-size: var(--pv-fs-12);
}

.pv-machine-filter small {
  color: var(--muted);
}

.pv-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pv-shortcuts span {
  background: #f3f6fb;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  padding: 4px;
  color: #5e6b7f;
  font-size: 10px;
}

.pv-shortcuts b {
  color: #172033;
}

.pv-main {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #eef3fa;
}

.pv-desktopbar {
  min-height: 86px;
  background: linear-gradient(180deg,#fbfcfe,#eef3f9);
  border-bottom: 1px solid #d8e1ec;
  display: grid;
  grid-template-columns: minmax(190px,260px) minmax(0,1fr);
  grid-template-rows: 34px 44px;
  align-items: center;
  padding: 5px 12px 6px 14px;
  gap: 0 14px;
}

.pv-window-title {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pv-window-title b {
  font-size: var(--pv-fs-16);
  font-weight: 950;
}

.pv-window-title span {
  font-size: var(--pv-fs-16);
  color: #657286;
}

.pv-top-row {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pv-menu-strip {
  display: flex;
  gap: 4px;
  min-width: 0;
  align-self: end;
  white-space: nowrap;
}

.pv-menu-compact {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 1.9rem;
  padding: .28rem .65rem;
  border: 1px solid #d8e1ee;
  border-radius: .65rem;
  background: #fff;
  color: #334155;
  font-size: var(--pv-menu-compact-font-size);
  font-weight: 850;
  white-space: nowrap;
}

.pv-menu-compact:hover,
.pv-menu-compact[aria-expanded="true"] {
  border-color: #b8caf6;
  background: #eef4ff;
  color: #173b88;
}

.pv-menu-strip button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 5px 9px;
  color: #4e5d72;
  font-size: var(--pv-menu-font-size);
  font-weight: 700;
}

.pv-menu-strip button:hover {
  background: #dde7f4;
  color: #172033;
}

.pv-toolbar {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  padding: 6px 8px;
  box-shadow: 0 8px 22px rgba(16,24,40,.05);
}

.pv-toolbar-left, .pv-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-toolbar-left {
  min-width: 0;
}

.pv-toolbar-right {
  margin-left: auto;
  flex: 0 0 auto;
}

.pv-zoom-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #596679;
  font-weight: 900;
}

.pv-zoom-label input {
  width: 128px;
}

.pv-select-sm {
  height: 30px;
  border: 1px solid #d8e1ee;
  border-radius: 10px;
  background: #fff;
  padding: 0 28px 0 8px;
  font-weight: 800;
  color: #26354d;
}

.pv-board {
  margin: 10px 12px 10px;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d7e0ec;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pv-board-head {
  height: 58px;
  display: flex;
  border-bottom: 1px solid #dce4ef;
  background: #f9fbfe;
}

.pv-machine-col {
  width: var(--machine);
  flex: 0 0 var(--machine);
  border-right: 1px solid #dce4ef;
  display: flex;
  align-items: center;
  padding-left: 16px;
  font-weight: 950;
  color: #536075;
}

.pv-time-clip {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.pv-day-header, .pv-time-header {
  position: absolute;
  left: 0;
  right: auto;
  will-change: transform;
}

.pv-day-header {
  height: 27px;
  top: 0;
}

.pv-time-header {
  height: 30px;
  top: 27px;
}

.pv-day-band {
  position: absolute;
  top: 0;
  height: 27px;
  /*border-right: 1px solid #d7e0eb;*/
  box-shadow: inset 1px 0 0 0 #e3e9f2;
  background: #f6f9fd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #48566a;
  font-weight: 900;
}

.pv-hour {
  display: flex;
  justify-content: center;
  position: absolute;
  top: 0;
  height: 30px;
  border-left: 1px solid #e3e9f2;
  color: #7a8799;
  font-weight: 600;
  font-size: var(--pv-fs-11);
  line-height: 30px;
}

.pv-viewport {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

.pv-row {
  height: var(--rowh);
  display: flex;
  border-bottom: 1px solid #e4eaf2;
}

.pv-machine {
  width: var(--machine);
  flex: 0 0 var(--machine);
  border-right: 1px solid #dce4ef;
  background: linear-gradient(180deg,#fff,#f8fafc);
  padding: .4rem .5rem;
  position: sticky;
  left: 0;
  z-index: 2;
}

.pv-machine b {
  display: block;
  font-size: var(--pv-fs-13);
}

.pv-machine small {
  display: block;
  color: #6f7c90;
  margin-top: 2px;
}

.pv-machine .status {
  display: inline-block;
  margin-top: 6px;
  border-radius: 999px;
  background: #e8f8f1;
  color: #147554;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  padding: 2px 7px;
  text-transform: uppercase;
}

.pv-machine .status.off {
  background: #fff2dd;
  color: #9b6509;
}

.pv-machine-load {
  height: 4px;
  border-radius: 999px;
  background: #edf2f7;
  margin-top: 7px;
  overflow: hidden;
}

.pv-machine-load i {
  display: block;
  height: 100%;
  background: #2458d3;
}

.pv-machine em {
  font-style: normal;
  color: #718096;
  font-size: var(--pv-fs-10);
}

.pv-lane {
  height: 100%;
  flex: 0 0 auto;
  background: linear-gradient(90deg,rgba(226,232,240,.8) 1px,transparent 1px);
  will-change: transform;
}

.pv-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eef2f7;
}

.pv-grid.major {
  background: #d8e0eb;
}

.pv-load {
  position: absolute;
  top: 5px;
  height: 6px;
  border-radius: 999px;
  background: rgba(36,88,211,.18);
}

.pv-task {
  position: absolute;
  top: 18px;
  height: 64px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid #b9c8de;
  box-shadow: 0 8px 18px rgba(21,32,51,.12);
  padding: 8px 10px;
  cursor: grab;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pv-task b {
  display: block;
  font-size: var(--pv-fs-13);
  white-space: nowrap;
  line-height: 17px;
}

.pv-task span {
  display: block;
  font-size: var(--pv-fs-12);
  color: #5e6b7f;
  white-space: nowrap;
  line-height: 16px;
}

.pv-task small {
  display: block;
  font-size: var(--pv-fs-11);
  color: #7a8799;
  white-space: nowrap;
  line-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-task.priority-alta {
  border-left: 5px solid var(--red);
}

.pv-task.priority-media {
  border-left: 5px solid var(--blue);
}

.pv-task.priority-baja {
  border-left: 5px solid var(--green);
}

.pv-task.locked {
  opacity: .75;
}

.pv-task.conflict {
  box-shadow: 0 0 0 2px rgba(199,61,74,.25),0 8px 18px rgba(21,32,51,.12);
}

.pv-lock {
  position: absolute;
  right: 7px;
  top: 6px;
  font-style: normal;
}

.pv-drop-preview {
  position: absolute;
  height: 64px;
  border: 2px dashed #1f9d72;
  background: rgba(31,157,114,.08);
  border-radius: 12px;
  z-index: 8;
  pointer-events: none;
}

.pv-drop-preview.invalid {
  border-color: #c73d4a;
  background: rgba(199,61,74,.08);
}

.pv-drop-preview:after {
  content: attr(data-label);
  position: absolute;
  left: 0;
  top: -24px;
  background: #172033;
  color: #fff;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: var(--pv-fs-11);
  white-space: nowrap;
}

.pv-navigator {
  display: flex;
  align-items: center;
  height: 42px;
  border-top: 1px solid #dce4ef;
  background: #f8fafc;
}

.pv-navigator-label {
  width: var(--machine);
  flex: 0 0 var(--machine);
  border-right: 1px solid #dce4ef;
  padding-left: 16px;
  color: #6d7788;
  font-weight: 900;
  text-transform: uppercase;
  font-size: var(--pv-fs-10);
  letter-spacing: .12em;
}

.pv-minimap {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
}

#pvMinimapContent {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.pv-minimap-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

.pv-mini-line {
  position: absolute;
}

.pv-mini-task {
  position: absolute;
  border-radius: 999px;
  background: #2458d3;
}

.pv-mini-task.priority-alta {
  background: #c73d4a;
}

.pv-mini-task.priority-baja {
  background: #1f9d72;
}


.pv-mini-day-markers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pv-mini-day-boundary {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-left: 1px dashed rgba(15, 23, 42, .28);
}

.pv-mini-day-boundary.is-today {
  border-left-style: solid;
  border-left-color: rgba(36, 88, 211, .55);
}

.pv-mini-day-label {
  position: absolute;
  top: 2px;
  transform: translateX(4px);
  max-width: 38px;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .74);
  color: #64748b;
  font-size: var(--pv-fs-10);
  font-weight: 800;
  line-height: 13px;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(226, 232, 240, .65);
}

#pvMinimapWindow {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border: 2px solid #172033;
  background: rgba(23,32,51,.08);
  border-radius: 8px;
}

.pv-hscroll {
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid #dce4ef;
  background: #f9fbfe;
}

.pv-hscroll::-webkit-scrollbar {
  height: 12px;
}

.pv-hscroll::-webkit-scrollbar-thumb {
  background: #aebbd0;
  border-radius: 999px;
  border: 3px solid #f9fbfe;
}

.pv-hscroll-inner {
  height: 1px;
}

.pv-right {
  grid-column: 4;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  background: #f8fafc;
  border-left: 1px solid #dce4ef;
  box-shadow: -8px 0 26px rgba(27,43,70,.08);
  overflow: hidden;
  transition: opacity .16s ease, transform .18s ease;
  display: flex;
  flex-direction: column;
}

.pv-app.right-collapsed .pv-right {
  opacity: 0;
  pointer-events: none;
}

.pv-backlog-tools {
  display: flex;
  gap: 8px;
  padding: 12px 14px 8px;
}

.pv-right > .pv-panel-head,
.pv-backlog-tools,
.pv-backlog-controls {
  flex: 0 0 auto;
}

.pv-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.pv-backlog-tools input {
  border-radius: 12px;
  border-color: #d8e1ee;
  padding-right: 32px;
}

.pv-search-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6e7b8f;
  opacity: 0;
  pointer-events: none;
}

.pv-search-clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.pv-search-clear:hover {
  background: #eef4ff;
  color: #164cc9;
}

.pv-backlog-controls {
  margin: 0 14px 10px;
  padding: 8px;
  border: 1px solid #dfe8f5;
  border-radius: 14px;
  background: #f8fbff;
}

.pv-backlog-sort {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
}

.pv-backlog-sort label {
  margin: 0;
  color: #617088;
  font-size: var(--pv-fs-10);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.pv-backlog-sort select {
  min-width: 0;
  border-radius: 10px;
  border-color: #d8e1ee;
}

.pv-sort-dir {
  width: 32px;
  height: 32px;
}

.pv-backlog-counter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pv-backlog-counter span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border-radius: 999px;
  background: #eef3f8;
  color: #5d6b80;
  font-size: var(--pv-fs-10);
  font-weight: 850;
  padding: 3px 7px;
}

.pv-backlog-counter span.is-filtered {
  background: #e8f1ff;
  color: #174bb5;
}

.pv-backlog-counter b {
  color: #111827;
}

.pv-backlog-lanes {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: 0 14px 14px;
  overflow: auto;
  overscroll-behavior: contain;
}

.pv-backlog-lane {
  min-height: 100%;
  background: #eef3f8;
  border: 1px solid #dde6f1;
  border-radius: 16px;
  padding: 10px;
}


.pv-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pv-lane-hint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #718096;
  font-size: var(--pv-fs-10);
  font-weight: 800;
}

.pv-pending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.pv-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(21,32,51,.07);
  cursor: grab;
  transition: transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}

.pv-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(21,32,51,.12);
  border-color: #c9d7ea;
}

.pv-card.priority-alta {
  border-left: 5px solid var(--red);
}

.pv-card.priority-media {
  border-left: 5px solid var(--blue);
}

.pv-card.priority-baja {
  border-left: 5px solid var(--green);
}

.pv-card-main {
  flex: 1;
  min-width: 0;
  padding: 11px 5px 11px 12px;
}

.pv-card-code {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-card-code b {
  font-size: var(--pv-fs-13);
}

.pv-card-code em {
  font-style: normal;
  text-transform: uppercase;
  font-size: var(--pv-fs-9);
  letter-spacing: .12em;
  color: #7b8798;
  font-weight: 950;
}

.pv-card-client, .pv-card-product {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-card-client {
  color: #172033;
  font-weight: 800;
  margin-top: 3px;
}

.pv-card-product {
  color: #6d7788;
  font-size: var(--pv-fs-12);
}

.pv-card-meta {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pv-chip {
  font-style: normal;
  border-radius: 999px;
  background: #f1f5f9;
  color: #536075;
  font-weight: 900;
  font-size: var(--pv-fs-10);
  padding: 3px 7px;
}

.pv-card-sort {
  width: 28px;
  border: 0;
  border-left: 1px solid #edf2f7;
  background: transparent;
  color: #9aa6b7;
  cursor: ns-resize;
  border-radius: 0 14px 14px 0;
  font-weight: 900;
  font-size: var(--pv-fs-16);
}

.pv-card-sort:hover {
  background: #f1f5f9;
  color: #526174;
}

.pv-pending-list.is-auto-sorted .pv-card-sort {
  opacity: .32;
  cursor: not-allowed;
}

.pv-pending-list.is-auto-sorted .pv-card-sort:hover {
  background: transparent;
  color: #9aa6b7;
}

.pv-card.dragging-card {
  opacity: .45;
}

.pv-card.sorting {
  box-shadow: 0 18px 34px rgba(36,88,211,.18);
}

.ui-sortable-placeholder {
  height: 74px;
  border: 1px dashed #7e9ce5;
  border-radius: 15px;
  background: rgba(36,88,211,.08);
  visibility: visible !important;
}

.pv-drag-helper {
  height: 36px;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 900;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  z-index: 10000;
}

.drop-return {
  background: #eafaf3 !important;
}

.drop-ok {
  background: #f6fbff;
}

.pv-statusbar {
  grid-column: 2 / span 3;
  grid-row: 2;
  height: 30px;
  background: #111827;
  color: #cbd5e1;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  font-size: var(--pv-fs-11);
  white-space: nowrap;
  overflow: hidden;
}

.pv-app.left-closed .pv-statusbar {
  grid-column: 2 / span 3;
}

.pv-statusbar span:first-child {
  color: #fff;
  font-weight: 900;
}

.pv-statusbar span:nth-child(2) {
  color: #93c5fd;
}

.pv-statusbar .pv-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 850;
  color: #e5e7eb;
  background: rgba(148,163,184,.16);
  border: 1px solid rgba(148,163,184,.22);
}

.pv-statusbar .pv-status-chip b {
  font-size: var(--pv-fs-11);
  color: #fff;
}

.pv-statusbar .pv-status-chip.neutral {
  background: rgba(59,130,246,.18);
  border-color: rgba(59,130,246,.35);
}

.pv-statusbar .pv-status-chip.ok {
  background: rgba(34,197,94,.16);
  border-color: rgba(34,197,94,.32);
}

.pv-statusbar .pv-status-chip.warn {
  background: rgba(245,158,11,.16);
  border-color: rgba(245,158,11,.34);
}

.pv-statusbar .pv-status-chip.danger {
  background: rgba(239,68,68,.17);
  border-color: rgba(239,68,68,.36);
}

.pv-statusbar .pv-status-chip.is-empty {
  background: rgba(148,163,184,.10);
  border-color: rgba(148,163,184,.18);
  color: #94a3b8;
}

.pv-statusbar .pv-status-chip.is-empty b {
  color: #cbd5e1;
}

.pv-statusbar #pvStatusHint {
  margin-left: auto;
  color: #94a3b8;
}

.pv-toast {
  position: fixed;
  right: 18px;
  bottom: 44px;
  width: min(420px, calc(100vw - 36px));
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: .55rem;
  z-index: 30000;
  pointer-events: none;
}

.pv-toast-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: start;
  border: 1px solid rgba(15,23,42,.12);
  background: #172033;
  color: #fff;
  border-radius: 12px;
  padding: .7rem .75rem;
  box-shadow: 0 18px 38px rgba(0,0,0,.22);
  pointer-events: auto;
}

.pv-toast-item > i {
  margin-top: .12rem;
}

.pv-toast-item span {
  min-width: 0;
  font-size: var(--pv-fs-13);
  font-weight: 400;
  line-height: 1.3;
}

.pv-toast-item button {
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
}

.pv-toast-item button:hover {
  background: rgba(255,255,255,.24);
}

.pv-toast-item.success {
  background: #167455;
}

.pv-toast-item.warning {
  background: #9a5b08;
}

.pv-toast-item.danger {
  background: #a12938;
}

.pv-toast-item.info {
  background: #172033;
}

.pv-is-panning, .pv-is-panning * {
  cursor: grabbing !important;
}

@media (max-width:1200px) {
  :root {
    --right: 340px;
    --left: 260px;
    --machine: 190px;
  }

  .pv-desktopbar {
    grid-template-columns: 210px 1fr;
  }

  .pv-toolbar {
    grid-column: 2;
  }
}

/* v3.7 — líneas temporales, predicción y configuración persistente */

.pv-snap-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}

.pv-snap-box .pv-check {
  margin-bottom: 8px;
}

.pv-snap-control input {
  max-width: 76px;
}

.pv-row.pv-machine-disabled .pv-machine {
  opacity: 1;
  filter: none;
  background-color: #fff !important;
}

.pv-row.pv-machine-disabled .pv-machine > * {
  opacity: .45;
  filter: saturate(.35);
}

.pv-row.pv-machine-disabled .pv-lane {
  background-color: rgba(203,213,225,.28);
}

.pv-row.pv-machine-disabled .pv-lane:after {
  content: "Máquina no válida";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(255,255,255,.86);
  color: #64748b;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: var(--pv-fs-11);
  font-weight: 900;
  pointer-events: none;
}

.pv-row.pv-machine-enabled .pv-lane {
  box-shadow: inset 0 0 0 1px rgba(31,157,114,.18);
}

.pv-now-line, .pv-drag-line, .pv-predict-line {
  position: absolute;
  display: none;
  top: 0;
  width: 0;
  z-index: 9;
  pointer-events: none;
}

.pv-now-line {
  border-left: 2px dashed #ef4444;
}

.pv-drag-line {
  border-left: 1px solid rgba(23, 32, 51, .48);
}

.pv-predict-line {
  border-left: 1px dashed rgba(36, 88, 211, .48);
}

.pv-now-line span, .pv-drag-line span, .pv-predict-line span {
  position: absolute;
  top: 4px;
  left: 1px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: var(--pv-fs-10);
  line-height: 16px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(15,23,42,.16);
}

.pv-drag-line span {
  background: rgba(23, 32, 51, .92);
  color: #fff;
}

.pv-predict-line span {
  background: #eaf1ff;
  color: #1e48b5;
  border: 1px solid #bdd0ff;
}

.pv-drop-preview {
  display: block;
  opacity: 0;
  transition: opacity .08s ease;
}

.pv-drop-preview[style*="display: block"] {
  opacity: 1;
}

.pv-drop-preview:before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg,rgba(255,255,255,.75),rgba(255,255,255,.22));
}

.pv-drag-helper, .ui-draggable-dragging.pv-task {
  opacity: .94 !important;
  pointer-events: none !important;
}

.pv-task.ui-draggable-dragging {
  box-shadow: 0 22px 48px rgba(15,23,42,.28);
}

/* v3.8 — reordenación persistente de máquinas y etiquetas de predicción acotadas */

.pv-machine-filter {
  gap: 7px;
}

.pv-machine-filter label.pv-machine-filter-item {
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  position: relative;
}

.pv-machine-filter label.pv-machine-filter-item input {
  grid-row: 1 / span 2;
  grid-column: 2;
  margin: 3px 0 0;
}

.pv-machine-filter label.pv-machine-filter-item b {
  grid-column: 3;
}

.pv-machine-filter label.pv-machine-filter-item small {
  grid-column: 3;
}

.pv-machine-sort {
  grid-row: 1 / span 2;
  grid-column: 1;
  color: #9aa6b7;
  cursor: ns-resize;
  font-weight: 900;
  font-size: var(--pv-fs-15);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.pv-machine-filter-item:hover .pv-machine-sort {
  color: #526174;
}

.pv-machine-filter-item.sorting {
  box-shadow: 0 14px 28px rgba(36,88,211,.16);
  border-color: #b8cbff;
}

.pv-machine-sort-placeholder {
  height: 48px;
  border: 1px dashed #7e9ce5;
  border-radius: 12px;
  background: rgba(36,88,211,.08);
  visibility: visible !important;
}

.pv-predict-line span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-row.pv-machine-disabled .pv-lane:after {
  left: calc(var(--machine) + 16px);
}

/* v3.9: el viewport vertical solo muestra scroll si las filas no caben realmente */

.pv-viewport.pv-no-y-scroll {
  overflow-y: hidden;
}

.pv-viewport.pv-can-y-scroll {
  overflow-y: auto;
}

/* v4.0 — Hito 3 Inteligencia: minimapa real, dependencias, carga visual y optimización */

.pv-dependency-svg {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 7;
  pointer-events: none;
  overflow: visible;
}

.pv-dependency-svg marker path {
  fill: var(--pv-relation-line-color);
}

.pv-dep-line {
  fill: none;
  stroke: var(--pv-relation-line-color);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: square;
  stroke-dasharray: none;
  opacity: .82;
  pointer-events: stroke;
  cursor: pointer;
}

.pv-dep-line.invalid {
  stroke: #c73d4a;
  stroke-width: 2.5;
  opacity: .9;
}

.pv-dependency-svg .pv-dep-line.invalid + marker path {
  fill: #c73d4a;
}

.pv-task.has-deps {
  box-shadow: 0 8px 18px rgba(21,32,51,.12),0 0 0 1px rgba(36,88,211,.12);
}

.pv-task.dep-invalid {
  box-shadow: 0 0 0 2px rgba(199,61,74,.35),0 12px 24px rgba(199,61,74,.12);
}

.pv-dep-badge {
  position: absolute;
  right: 7px;
  bottom: 6px;
  font-style: normal;
  font-size: var(--pv-fs-10);
  font-weight: 950;
  border-radius: 999px;
  padding: 1px 6px;
  color: #1e48b5;
  background: #eaf1ff;
  border: 1px solid #bfd2ff;
}

.pv-task.dep-invalid .pv-dep-badge {
  color: #a12938;
  background: #fff0f1;
  border-color: #f3bac1;
}

.pv-dependency-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.pv-dependency-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 5px;
  align-items: center;
  border: 1px solid #dfe7f1;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
}

.pv-dependency-item b {
  font-size: var(--pv-fs-11);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-dependency-item span {
  font-weight: 950;
  color: #64748b;
}

.pv-dependency-item small {
  grid-column: 1 / -1;
  color: #6d7788;
  font-size: var(--pv-fs-10);
  line-height: 14px;
}

.pv-dependency-item.ok {
  border-color: rgba(31,157,114,.28);
  background: rgba(31,157,114,.04);
}

.pv-dependency-item.invalid {
  border-color: rgba(199,61,74,.35);
  background: rgba(199,61,74,.055);
}

.pv-dependency-item.pending {
  opacity: .72;
}

.pv-row.load-low .pv-machine-load i {
  background: #1f9d72;
}

.pv-row.load-medium .pv-machine-load i {
  background: #2458d3;
}

.pv-row.load-high .pv-machine-load i {
  background: #f59e0b;
}

.pv-row.load-critical .pv-machine-load i {
  background: #c73d4a;
}

.pv-row.load-high .pv-machine, .pv-row.load-critical .pv-machine {
  background: linear-gradient(90deg,rgba(245,158,11,.055),transparent 72%);
}

.pv-row.load-critical .pv-machine {
  background: linear-gradient(90deg,rgba(199,61,74,.07),transparent 72%);
}

.pv-minimap {
  height: 100%;
  background: linear-gradient(180deg,#f8fbff,#eef4fb);
}

.pv-mini-line {
  height: 2px;
  border-radius: 999px;
  background: #d5dfec;
}

.pv-mini-line.load-low {
  background: rgba(31,157,114,.22);
}

.pv-mini-line.load-medium {
  background: rgba(36,88,211,.24);
}

.pv-mini-line.load-high {
  background: rgba(245,158,11,.30);
}

.pv-mini-line.load-critical {
  background: rgba(199,61,74,.34);
}

.pv-mini-task {
  height: 5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.65);
}

.pv-mini-task.dep-invalid {
  box-shadow: 0 0 0 1px #c73d4a,0 0 0 3px rgba(199,61,74,.12);
}

.pv-predict-path {
  position: absolute;
  display: none;
  z-index: 6;
  pointer-events: none;
  border-top: 2px dotted #2458d3;
  top: 0;
  opacity: .65;
}

.pv-predict-path:after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2458d3;
}

.pv-drop-preview.invalid:after {
  background: #a12938;
}

.pv-drop-preview:not(.invalid):after {
  background: #167455;
}

.pv-section .w-100 {
  width: 100%;
}

/* v4.1 — ajuste Hito 3: calendario profesional, scroll infinito hacia atrás y configuración general */

.pv-calendar-widget {
  position: relative;
  margin-bottom: 10px;
}

.pv-calendar-widget:before {
  content: "▦";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #7b8798;
  font-size: var(--pv-fs-12);
}

.pv-calendar-widget #pvDatepicker {
  padding-left: 30px;
  font-weight: 800;
  border-radius: 10px;
  background: #fff;
}

.ui-datepicker {
  z-index: 50000 !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 16px !important;
  padding: 10px !important;
  background: #fff !important;
  box-shadow: 0 24px 60px rgba(15,23,42,.18) !important;
  font-family: inherit !important;
  width: 272px !important;
}

.ui-datepicker .ui-datepicker-header {
  border: 0 !important;
  background: linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  border-radius: 12px !important;
  padding: 8px 34px !important;
}

.ui-datepicker .ui-datepicker-title {
  font-size: var(--pv-fs-13) !important;
  color: #172033 !important;
  letter-spacing: .02em;
}

.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
  top: 8px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  border: 1px solid #dbe6f3 !important;
  background: #fff !important;
  cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev {
  left: 8px !important;
}

.ui-datepicker .ui-datepicker-next {
  right: 8px !important;
}

.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span {
  display: none !important;
}

.ui-datepicker .ui-datepicker-prev:after, .ui-datepicker .ui-datepicker-next:after {
  display: block;
  text-align: center;
  line-height: 24px;
  font-size: var(--pv-fs-16);
  font-weight: 900;
  color: #516073;
}

.ui-datepicker .ui-datepicker-prev:after {
  content: "‹";
}

.ui-datepicker .ui-datepicker-next:after {
  content: "›";
}

.ui-datepicker table {
  margin: 10px 0 0 !important;
}

.ui-datepicker th {
  font-size: var(--pv-fs-10) !important;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7b8798 !important;
  padding: 6px 2px !important;
}

.ui-datepicker td {
  padding: 2px !important;
}

.ui-datepicker td span, .ui-datepicker td a {
  border: 1px solid #e4ebf5 !important;
  background: #f8fbff !important;
  color: #233047 !important;
  border-radius: 9px !important;
  text-align: center !important;
  font-size: var(--pv-fs-12) !important;
  padding: 6px 0 !important;
}

.ui-datepicker td a:hover {
  background: #eaf1ff !important;
  border-color: #b8cbff !important;
  color: #1e48b5 !important;
}

.ui-datepicker .ui-state-active {
  background: #2458d3 !important;
  border-color: #2458d3 !important;
  color: #fff !important;
}

.ui-datepicker .ui-datepicker-other-month a, .ui-datepicker .ui-datepicker-other-month span {
  opacity: .38 !important;
}

.ui-datepicker-today a {
  box-shadow: 0 0 0 2px rgba(36,88,211,.16) !important;
}

.pv-field-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pv-field-stack label {
  font-size: var(--pv-fs-11);
  font-weight: 950;
  color: #526174;
}

.pv-field-stack select {
  border-radius: 10px;
  font-weight: 800;
}

.pv-left .pv-section .pv-check.mt-3 {
  margin-top: 12px;
}

.pv-drag-line span {
  display: none !important;
}

.pv-now-line span {
  background: #eb4344;
  color: #fff;
}

.pv-app.pv-no-animations * {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

.pv-app.pv-density-compact .pv-card-main {
  padding-top: 8px;
  padding-bottom: 8px;
}

.pv-app.pv-density-compact .pv-section {
  padding: 12px;
}

.pv-app.pv-density-comfortable .pv-section {
  padding: 18px;
}

.pv-app.pv-density-comfortable .pv-card-main {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* v4.2 — normalización tipográfica, calendario dd-mm-yyyy y control de navegación */

body, input, button, select, textarea, .form-control, .form-select, .pv-toolbtn, .pv-nav-btn, .pv-select-sm {
  font-weight: 400 !important;
}

.pv-left-head h2, .pv-panel-head h2, .pv-app-title, .pv-section-title, .pv-section-subtitle, .pv-lane-title, .pv-eyebrow, .pv-machine-col, .pv-brand-title, .pv-machine-name, .pv-task-code, .pv-card-op, .pv-dep-code, .pv-day-label, .pv-chip-value {
  font-weight: 700 !important;
}

.pv-rail-logo {
  font-weight: 700 !important;
}

.pv-rail-btn {
  font-weight: 400 !important;
}

.pv-rail-icon {
  font-size: var(--pv-fs-21);
  line-height: 1;
}

.pv-rail-label {
  font-size: var(--pv-fs-10);
  font-weight: 400;
}

.pv-brand-title {
  display: block;
  color: #172033;
  font-size: var(--pv-fs-13);
}

.pv-brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: var(--pv-fs-12);
}

.pv-key {
  color: #172033;
  font-weight: 600;
}

.pv-day-name {
  display: block;
  font-size: var(--pv-fs-9);
  font-weight: 500;
}

.pv-day-num {
  display: block;
  font-size: var(--pv-fs-14);
  font-weight: 600;
}

.pv-machine-filter-name {
  grid-column: 3;
  font-size: var(--pv-fs-12);
  font-weight: 500;
}

.pv-machine-name {
  display: block;
  font-size: var(--pv-fs-13);
}

.pv-task-code {
  display: block;
  font-size: var(--pv-fs-13);
  white-space: nowrap;
  line-height: 17px;
}

.pv-card-op {
  font-size: var(--pv-fs-13);
  font-weight: 600;
}

.pv-dep-code {
  font-size: var(--pv-fs-11);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-chip-value {
  font-size: var(--pv-fs-11);
  color: #fff;
}

.pv-statusbar .pv-status-chip.is-empty .pv-chip-value {
  color: #cbd5e1;
}

.pv-visible-hours {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}

.pv-section-subtitle {
  font-size: var(--pv-fs-10);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #647084;
  margin-bottom: 8px;
}

.pv-time-grid {
  display: grid;
  grid-template-columns: auto 68px auto 68px auto;
  gap: 7px;
  align-items: center;
}

.pv-time-grid label {
  font-size: var(--pv-fs-11);
  color: #647084;
  margin: 0;
}

.pv-time-grid input {
  height: 30px;
  text-align: center;
}

.pv-time-grid .pv-toolbtn {
  height: 30px;
  padding: 0 9px;
}

.ui-datepicker .ui-datepicker-title {
  font-weight: 600 !important;
}

.ui-datepicker th {
  font-weight: 500 !important;
}

.ui-datepicker td span, .ui-datepicker td a {
  font-weight: 400 !important;
}

.pv-nav-btn.active, .pv-toolbtn.active {
  font-weight: 600 !important;
}

.pv-window-title .pv-app-title {
  font-size: var(--pv-fs-16) !important;
  color: #172033 !important;
  line-height: 18px;
}

.pv-task .pv-task-code {
  font-size: var(--pv-fs-13) !important;
  color: #172033 !important;
  font-weight: 700 !important;
  line-height: 17px;
}

.pv-day .pv-day-name {
  font-size: var(--pv-fs-9) !important;
  font-weight: 500 !important;
}

.pv-day .pv-day-num {
  font-size: var(--pv-fs-14) !important;
  font-weight: 600 !important;
}

.pv-dependency-item .pv-dep-code {
  font-size: var(--pv-fs-11) !important;
  color: #172033 !important;
  font-weight: 600 !important;
}

.pv-statusbar .pv-status-chip .pv-chip-value {
  font-size: var(--pv-fs-11);
  color: #fff;
  font-weight: 700 !important;
}

.pv-machine-filter-item .pv-machine-filter-name {
  font-size: var(--pv-fs-12);
  color: #172033;
  font-weight: 500 !important;
}

.pv-machine .pv-machine-name {
  font-size: var(--pv-fs-13);
  color: #172033;
  font-weight: 700 !important;
}

.pv-card-code .pv-card-op {
  font-size: var(--pv-fs-13);
  color: #172033;
  font-weight: 600 !important;
}

/* v4.3 — rail profesional, horario compacto y ventana temporal deslizante */

:root {
  --rail: 76px;
}

.pv-rail {
  padding: 14px 9px 12px;
  gap: 8px;
  background: radial-gradient(circle at 50% 0%,rgba(74,119,255,.16),transparent 34%),
    linear-gradient(180deg,#081120 0%,#0d182b 58%,#0a1323 100%);
  border-right: 1px solid rgba(148,163,184,.16);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.03);
}

.pv-rail-logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg,#35b7ff 0%,#5b74ff 46%,#7f54f2 100%);
  font-size: var(--pv-fs-15);
  letter-spacing: .02em;
  box-shadow: 0 14px 34px rgba(37,99,235,.36), inset 0 1px 0 rgba(255,255,255,.28);
}

.pv-rail-btn {
  width: 58px;
  height: 58px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 6px 4px 5px;
  gap: 4px;
  color: #aebbd0;
  background: transparent;
  transition: background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;
}

.pv-rail-btn .pv-rail-icon {
  width: 30px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: var(--pv-fs-17) !important;
  color: #c7d2e6;
  line-height: 1;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.045);
}

.pv-rail-btn .pv-rail-label {
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--pv-fs-9-5) !important;
  line-height: 12px;
  color: inherit;
  letter-spacing: .01em;
}

.pv-rail-btn:hover {
  color: #fff;
  background: rgba(148,163,184,.12);
  border-color: rgba(203,213,225,.10);
  transform: translateY(-1px);
}

.pv-rail-btn:hover .pv-rail-icon {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.pv-rail-btn.active {
  color: #fff;
  background: linear-gradient(180deg,rgba(59,130,246,.24),rgba(30,41,59,.58));
  border-color: rgba(147,197,253,.20);
  box-shadow: 0 12px 28px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.08);
}

.pv-rail-btn.active .pv-rail-icon {
  color: #fff;
  background: linear-gradient(135deg,#2f6df6,#1c3f9f);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 7px 16px rgba(37,99,235,.30);
}

.pv-rail-bottom small {
  font-size: var(--pv-fs-10);
  color: #728095;
}

.pv-time-grid {
  grid-template-columns: auto 54px auto 54px 32px !important;
  gap: 6px !important;
}

.pv-time-grid .pv-time-apply, .pv-time-grid #pvTimeApply {
  width: 32px !important;
  min-width: 32px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 10px;
  font-size: var(--pv-fs-14);
  line-height: 28px;
  color: #1f4fbf;
  background: #eef4ff;
  border-color: #c7d8ff;
}

.pv-time-grid .pv-time-apply:hover, .pv-time-grid #pvTimeApply:hover {
  background: #2458d3;
  color: #fff;
  border-color: #2458d3;
}

.pv-calendar-widget #pvDatepicker {
  font-weight: 400 !important;
}

.pv-tool-panel {
  scrollbar-gutter: stable;
}

/* v4.4 — línea de hora actual no invasiva y minimapa con ventana arrastrable real */

.pv-now-line {
  z-index: 1 !important;
  opacity: .9;
}

.pv-now-line span {
  z-index: 7 !important;
}

.pv-dependency-svg {
  z-index: 3 !important;
}

#pvMinimapWindow {
  cursor: grab;
  z-index: 3;
}

#pvMinimapWindow:active {
  cursor: grabbing;
}

/* v4.5 — protección de columna de máquinas y navegación solo por minimapa/gestos */

.pv-board-head {
  position: relative;
  z-index: 40;
}

.pv-machine-col {
  position: relative;
  z-index: 45;
  background: linear-gradient(180deg,#fff,#f8fafc);
  box-shadow: 8px 0 16px rgba(15,23,42,.045);
}

.pv-row {
  position: relative;
  isolation: isolate;
}

.pv-machine {
  z-index: 35 !important;
  background: linear-gradient(180deg,#fff,#f8fafc) !important;
  box-shadow: 8px 0 14px rgba(15,23,42,.055);
}

.pv-lane {
  z-index: 1;
}

.pv-task {
  z-index: 4;
}

.pv-hscroll {
  height: 0 !important;
  min-height: 0 !important;
  border-top: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.pv-hscroll::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}

#pvHScrollInner {
  height: 0 !important;
}

/* v4.6 — columna de máquinas opaca también en estados de carga */

.pv-machine, .pv-row.load-low .pv-machine, .pv-row.load-medium .pv-machine, .pv-row.load-high .pv-machine, .pv-row.load-critical .pv-machine {
  position: sticky !important;
  left: 0 !important;
  z-index: 60 !important;
  background-color: #fff !important;
  background-image: linear-gradient(180deg,#ffffff,#f8fafc) !important;
  box-shadow: 8px 0 14px rgba(15,23,42,.07) !important;
}

.pv-row.load-high .pv-machine {
  background-image: linear-gradient(90deg,rgba(245,158,11,.075),rgba(245,158,11,0) 72%),
    linear-gradient(180deg,#ffffff,#f8fafc) !important;
}

.pv-row.load-critical .pv-machine {
  background-image: linear-gradient(90deg,rgba(199,61,74,.085),rgba(199,61,74,0) 72%),
    linear-gradient(180deg,#ffffff,#f8fafc) !important;
}

.pv-machine::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: #dce4ef;
  pointer-events: none;
}

.pv-lane {
  position: relative;
  z-index: 0 !important;
}

.pv-task {
  z-index: 5 !important;
}

.pv-data-mode {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #475569;
  font-size: var(--pv-fs-11);
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* PV 4.3.1: selector de fecha estable */

.pv-calendar-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-calendar-widget:before {
  display: none !important;
}

.pv-calendar-widget #pvDatepicker {
  padding-left: 12px !important;
}

.pv-datepicker-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: #fff;
  color: #26364f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pv-fs-15);
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  cursor: pointer;
}

.pv-datepicker-btn:hover {
  background: #eef5ff;
  border-color: #b8cbff;
  color: #2458d3;
}

/* Fase 3: modal profesional de resolución de conflictos */

/* Fase 3.1 — preferencia por máquina en resolución de conflictos */

/* Fase 3.2 — modal refinado: acciones agrupadas y configuración por máquina */

.pv-machine-overlap-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-machine-overlap-item {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.pv-machine-overlap-item:hover {
  border-color: #b8cbff;
  background: #f8fbff;
}

.pv-machine-overlap-item input {
  accent-color: #1d6fe8;
}

.pv-machine-overlap-item span {
  font-weight: 800;
  color: #26364f;
  font-size: var(--pv-fs-13);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-machine-overlap-item small {
  color: #64748b;
  font-size: var(--pv-fs-11);
}

/* mantiene compatibilidad con reglas existentes */

.pv-task:has(.pv-task-code)::after {
  pointer-events: none;
}

.pv-task .pv-task-code + span + small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-task.split-virtual {
  outline: 2px dashed rgba(29,111,232,.35);
  outline-offset: -4px;
}

/* Fase 3.2 — refinado de conflicto, editor de tareas y características de máquina */

.pv-editor-modal .modal-dialog {
  margin: 1rem auto;
}

.pv-editor-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.pv-editor-grid .pv-field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pv-editor-grid .pv-span-2 {
  grid-column: 1 / -1;
}

.pv-check-tight {
  margin: 0;
  min-height: 31px;
  align-items: center;
  font-weight: 600;
}

.pv-valid-machine-list {
  display: flex;
  flex-wrap: wrap;
  min-height: 31px;
}

.pv-valid-machine-list .pv-chip {
  display: inline-flex;
  align-items: center;
}

.pv-editor-note {
  line-height: 1.4;
}

.pv-editor-footer {
  border-top: 1px solid #e4eaf2;
}

.pv-editor-footer .btn {
  min-width: 110px;
}

.pv-machine {
  cursor: default;
}

@media (max-width: 760px) {
  .pv-editor-grid {
    grid-template-columns: 1fr;
  }

  .pv-editor-modal .modal-dialog {
    max-width: calc(100vw - 20px);
  }
}

/* Fase 3.3 — correcciones visuales finales */

.pv-editor-modal .modal-dialog {
  max-width: min(860px,calc(100vw - 48px));
}

.pv-editor-header {
  padding: 16px 18px;
  border-bottom: 1px solid #e6ebf3;
  background: linear-gradient(180deg,#ffffff,#f6f9fd);
}

.pv-editor-header .pv-eyebrow {
  margin-bottom: 3px;
}

.pv-editor-header .modal-title {
  font-size: var(--pv-fs-18);
  font-weight: 800;
  color: #172033;
}

.pv-task-editor-kpi span {
  display: block;
  font-size: var(--pv-fs-10);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7b879a;
  font-weight: 800;
  margin-bottom: 4px;
}

.pv-editor-grid {
  gap: 14px;
}

.pv-editor-grid .pv-field-stack {
  padding: 12px;
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,.03);
}

.pv-editor-grid .pv-field-stack label:first-child {
  font-size: var(--pv-fs-11);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 800;
}

.pv-editor-grid .form-control, .pv-editor-grid .form-select, .pv-editor-grid .input-group-text {
  border-color: #d6dfeb;
}

.pv-editor-grid .form-control:focus, .pv-editor-grid .form-select:focus {
  border-color: #94b6ff;
  box-shadow: 0 0 0 .18rem rgba(36,88,211,.12);
}

.pv-check-tight {
  font-size: var(--pv-fs-13);
  color: #334155;
}

.pv-valid-machine-list {
  gap: 8px;
}

.pv-valid-machine-list .pv-chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #cdddff;
  color: #2458d3;
  font-size: var(--pv-fs-12);
  font-weight: 800;
}

.pv-valid-machine-list .pv-chip.invalid {
  background: #f8fafc;
  border-color: #dbe3ef;
  color: #64748b;
}

.pv-editor-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7fbff;
  border: 1px solid #d8e7fb;
  color: #24405f;
  font-size: var(--pv-fs-12);
}

.pv-editor-footer {
  padding: 14px 18px;
  background: #fbfdff;
}

@media (max-width: 900px) {
  }

@media (max-width: 640px) {
  }

/* Fase 3.4 — modo preguntar y selección no accidental de textos */

.pv-app, .pv-app *, .modal-content, .modal-content *, .pv-toast, .ui-datepicker, .ui-datepicker * {
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select, option, .form-control, .form-select, [contenteditable="true"], [contenteditable="true"] * {
  -webkit-user-select: text;
  user-select: text;
}

/* Fase 3.5 consolidada — modal de conflictos saneado */
.pv-conflict-modal .modal-dialog {
  max-width: min(920px, calc(100vw - 48px));
  margin: 1rem auto;
}

.pv-conflict-modal .modal-content {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  overflow: hidden;
}

.pv-conflict-header {
  padding: 16px 18px;
  border-bottom: 1px solid #e4eaf2;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.pv-conflict-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pv-conflict-title-wrap h5 {
  color: #0f172a;
  font-size: var(--pv-fs-17);
  font-weight: 950;
}

.pv-conflict-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  background: #fff7ed;
  color: #f59e0b;
  font-size: var(--pv-fs-24);
  font-weight: 950;
  line-height: 1;
}

.pv-conflict-body {
  padding: 16px 18px;
  background: #fff;
}

.pv-conflict-summary-pro {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.pv-conflict-summary-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  color: #7a8799;
  font-size: var(--pv-fs-28);
}

.pv-conflict-summary-pro dl {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px 18px;
  margin: 0;
}

.pv-conflict-summary-pro dl > div {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 8px;
  align-items: start;
}

.pv-conflict-summary-pro dt {
  color: #475569;
  font-weight: 800;
}

.pv-conflict-summary-pro dd {
  margin: 0;
  color: #0f172a;
}

.pv-conflict-summary-pro dd strong {
  display: block;
  font-weight: 950;
}

.pv-conflict-summary-pro dd small {
  display: block;
  color: #334155;
}

.pv-conflict-range {
  color: #0f55b8;
  font-weight: 900;
}

.pv-conflict-range-alt {
  color: #4c1d95 !important;
  font-weight: 800;
}

.pv-conflict-section-title {
  margin: 2px 0 10px;
  color: #0f172a;
  font-size: var(--pv-fs-16);
  font-weight: 950;
}

.pv-conflict-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pv-conflict-option {
  min-height: 226px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  box-shadow: none;
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.pv-conflict-option:hover {
  border-color: #9fb3d1;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.pv-conflict-option > input[data-pv-conflict-action] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pv-conflict-radio {
  width: 19px;
  height: 19px;
  position: absolute;
  top: 18px;
  left: 14px;
  display: block;
  border: 2px solid #b8c4d3;
  border-radius: 999px;
  background: #fff;
}

.pv-conflict-option > input[data-pv-conflict-action]:checked + .pv-conflict-radio,
.pv-conflict-option:has(> input[data-pv-conflict-action]:checked) .pv-conflict-radio {
  border-color: #1d6fe8;
}

.pv-conflict-option > input[data-pv-conflict-action]:checked + .pv-conflict-radio::after,
.pv-conflict-option:has(> input[data-pv-conflict-action]:checked) .pv-conflict-radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #1d6fe8;
}

.pv-conflict-option:has(> input[data-pv-conflict-action]:checked) {
  border-color: #1d6fe8;
  box-shadow: 0 0 0 1px #1d6fe8, 0 10px 20px rgba(29, 111, 232, .12);
}

.pv-conflict-option strong {
  min-height: 0;
  padding-left: 30px;
  color: #0f172a;
  font-size: var(--pv-fs-15);
  font-weight: 950;
  line-height: 18px;
}

.pv-conflict-option small {
  display: block;
  color: #1f2937;
  font-size: var(--pv-fs-12);
  line-height: 1.35;
}

.pv-conflict-option em,
.pv-conflict-note em {
  margin-top: 0;
  color: #b45309;
  font-size: var(--pv-fs-12);
  font-style: normal;
  line-height: 1.35;
}

.pv-conflict-option.is-disabled,
.pv-conflict-option:has(input:disabled) {
  opacity: .52;
  cursor: not-allowed;
}

.pv-conflict-option.is-disabled:hover,
.pv-conflict-option:has(input:disabled):hover {
  border-color: #dbe3ef;
  box-shadow: none;
  transform: none;
}

.pv-conflict-modifier {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #e7edf5;
}

.pv-conflict-modifier label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #26364f;
  font-size: var(--pv-fs-12);
  font-weight: 700;
  cursor: pointer;
}

.pv-conflict-modifier input {
  width: 14px;
  height: 14px;
  position: static !important;
  margin: 0;
  opacity: 1 !important;
  pointer-events: auto !important;
  accent-color: #1d6fe8;
}

.pv-conflict-diagram {
  height: 54px;
  position: relative;
  display: block;
  margin: 4px 0 0;
}

.pv-conflict-diagram b {
  position: absolute;
  top: 18px;
  height: 26px;
  border: 1px solid rgba(15, 23, 42, .25);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.pv-conflict-diagram b:nth-child(1) {
  background: #2f7de1;
}

.pv-conflict-diagram b:nth-child(2) {
  background: #5fc56f;
}

.pv-conflict-diagram b:nth-child(3) {
  background: #f87171;
}

.pv-diagram-nearest b:nth-child(1),
.pv-diagram-nearest b:nth-child(2),
.pv-diagram-nearest b:nth-child(3),
.pv-diagram-nearest b:nth-child(4),
.pv-diagram-push b:nth-child(1),
.pv-diagram-push b:nth-child(2),
.pv-diagram-push b:nth-child(3),
.pv-diagram-split b:nth-child(1),
.pv-diagram-split b:nth-child(2),
.pv-diagram-split b:nth-child(3),
.pv-diagram-overload b:nth-child(1),
.pv-diagram-overload b:nth-child(2),
.pv-diagram-overload b:nth-child(3) {
  top: 18px;
}

.pv-diagram-nearest b:nth-child(1),
.pv-diagram-nearest b:nth-child(2),
.pv-diagram-nearest b:nth-child(4) {
  width: 26px;
}

.pv-diagram-nearest b:nth-child(3) {
  width: 38px;
  border: 2px dashed #2458d3;
  background: #fff !important;
}

.pv-diagram-nearest.is-before b:nth-child(1) {
  left: 8px;
}

.pv-diagram-nearest.is-before b:nth-child(2) {
  left: 38px;
}

.pv-diagram-nearest.is-before b:nth-child(3) {
  left: 68px;
}

.pv-diagram-nearest.is-before b:nth-child(4) {
  right: 8px;
}

.pv-diagram-nearest.is-after b:nth-child(1) {
  left: 8px;
  width: 38px;
  border: 2px dashed #2458d3;
  background: #fff !important;
}

.pv-diagram-nearest.is-after b:nth-child(2) {
  left: 52px;
  background: #2f7de1;
}

.pv-diagram-nearest.is-after b:nth-child(3) {
  left: 82px;
  width: 26px;
  border: 1px solid rgba(15, 23, 42, .25);
  background: #5fc56f !important;
}

.pv-diagram-nearest.is-after b:nth-child(4) {
  right: 8px;
}

.pv-diagram-push b:nth-child(1),
.pv-diagram-push b:nth-child(2),
.pv-diagram-push b:nth-child(3) {
  height: 25px;
}

.pv-diagram-push b:nth-child(2) {
  width: 34px;
  border: 2px dashed #94a3b8;
  background: rgba(226, 232, 240, .55) !important;
  box-shadow: none;
}

.pv-diagram-push::after {
  position: absolute;
  top: 17px;
  color: #24405f;
  font-size: var(--pv-fs-22);
  line-height: 1;
}

.pv-diagram-push.is-after b:nth-child(1) {
  left: 8px;
  width: 32px;
  background: #2f7de1 !important;
}

.pv-diagram-push.is-after b:nth-child(2) {
  left: 58px;
}

.pv-diagram-push.is-after b:nth-child(3) {
  right: 8px;
  width: 54px;
  border-style: dashed;
  background: repeating-linear-gradient(90deg, #cbd5e1 0 24px, #e2e8f0 24px 28px) !important;
}

.pv-diagram-push.is-after::after {
  content: '→';
  left: 98px;
}

.pv-diagram-push.is-before b:nth-child(1) {
  left: 8px;
  width: 54px;
  border-style: dashed;
  background: repeating-linear-gradient(90deg, #cbd5e1 0 24px, #e2e8f0 24px 28px) !important;
}

.pv-diagram-push.is-before b:nth-child(2) {
  left: 82px;
}

.pv-diagram-push.is-before b:nth-child(3) {
  right: 8px;
  width: 32px;
  background: #2f7de1 !important;
}

.pv-diagram-push.is-before::after {
  content: '←';
  left: 64px;
}

.pv-diagram-split::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 31px;
  z-index: 0;
  border-top: 2px dashed #cbd5e1;
}

.pv-diagram-split::after {
  content: '';
  position: absolute;
  left: 51px;
  top: 13px;
  width: 58px;
  height: 34px;
  z-index: 1;
  border-left: 2px dashed #94a3b8;
  border-right: 2px dashed #94a3b8;
  pointer-events: none;
}

.pv-diagram-split b:nth-child(1) {
  left: 8px;
  width: 36px;
  z-index: 2;
  border-style: dashed;
  background: #5fc56f !important;
}

.pv-diagram-split b:nth-child(2) {
  left: 58px;
  width: 44px;
  z-index: 2;
  background: #2f7de1 !important;
}

.pv-diagram-split b:nth-child(3) {
  right: 8px;
  width: 36px;
  z-index: 2;
  border-style: dashed;
  background: #5fc56f !important;
}

.pv-diagram-overload b:nth-child(1) {
  left: 16px;
  width: 54px;
  opacity: .85;
}

.pv-diagram-overload b:nth-child(2) {
  left: 48px;
  width: 54px;
  opacity: .75;
}

.pv-diagram-overload b:nth-child(3) {
  left: 72px;
  top: 34px;
  width: 62px;
  opacity: .65;
}

.pv-conflict-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fbff;
  color: #24405f;
  font-size: var(--pv-fs-13);
}

.pv-conflict-list-pro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pv-conflict-list-pro li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #fff;
}

.pv-conflict-list-pro strong {
  display: block;
}

.pv-conflict-list-pro small {
  display: block;
  color: #64748b;
}

.pv-conflict-list-pro em {
  color: #475569;
  font-size: var(--pv-fs-12);
  font-style: normal;
  text-align: right;
}

.pv-conflict-footer {
  padding: 12px 18px;
  border-top: 1px solid #e4eaf2;
  background: #fbfdff;
}

.pv-conflict-footer .btn {
  min-width: 110px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .pv-conflict-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pv-conflict-summary-pro dl {
    grid-template-columns: 1fr;
  }

  .pv-conflict-list-pro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .pv-conflict-modal .modal-dialog {
    max-width: calc(100vw - 20px);
  }

  .pv-conflict-summary-pro,
  .pv-conflict-option-grid {
    grid-template-columns: 1fr;
  }

  .pv-conflict-summary-pro dl > div {
    grid-template-columns: 1fr;
  }
}

/* Fase 3.6 consolidada — características de máquina y Font Awesome */
.pv-rail-icon,
.pv-icon-btn,
.pv-datepicker-btn,
.pv-time-apply,
.pv-machine-flag,
.pv-machine-overlap-indicator,
.pv-dep-badge,
.pv-lock {
  line-height: 1 !important;
}

.pv-rail-icon i,
.pv-icon-btn i,
.pv-datepicker-btn i,
.pv-time-apply i,
.pv-machine-overlap-indicator i {
  pointer-events: none;
}

.pv-rail-icon {
  display: grid !important;
  place-items: center !important;
}

.pv-machine-settings {
  display: flex;
  flex-direction: column;
  gap: 9px !important;
}

.pv-machine-setting-item {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: flex-start !important;
  padding: 10px 11px !important;
  border: 1px solid #e2e8f0;
  border-radius: 13px !important;
  background: linear-gradient(180deg, #fff, #fbfdff) !important;
}

.pv-machine-setting-item:hover {
  border-color: #bfd2ff;
  background: #f8fbff;
}

.pv-machine-setting-item.is-hidden {
  opacity: .64;
}

.pv-machine-setting-item.is-target {
  border-color: #2458d3;
  box-shadow: 0 0 0 1px #2458d3, 0 10px 20px rgba(36, 88, 211, .12);
}

.pv-machine-setting-item.is-overlap-allowed {
  border-left: 3px solid #1d6fe8;
}

.pv-machine-setting-item.is-overlap-blocked {
  border-left: 3px solid #d7e0ec;
}

.pv-machine-setting-item .pv-machine-sort {
  grid-column: 1 !important;
  grid-row: 1 / span 4 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 34px !important;
  position: relative;
  left: -.6rem;
  display: grid !important;
  place-items: center !important;
  color: #9aabc0 !important;
  cursor: grab !important;
}

.pv-machine-setting-item.sorting .pv-machine-sort,
.pv-machine-setting-item .pv-machine-sort:active {
  cursor: grabbing !important;
}

.pv-machine-setting-main {
  grid-column: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
}

.pv-machine-setting-title {
  display: block !important;
  min-width: 10rem !important;
}

.pv-machine-setting-main strong {
  display: block !important;
  max-width: 100% !important;
  color: #172033 !important;
  font-size: var(--pv-fs-14) !important;
  line-height: 1.22 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.pv-machine-setting-meta {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0 5px !important;
  min-width: 0 !important;
  color: #43546d !important;
  font-size: var(--pv-fs-11) !important;
  line-height: 1.25 !important;
}

.pv-machine-setting-type {
  display: inline !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #43546d !important;
  font-size: var(--pv-fs-11) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.pv-machine-setting-sep {
  color: #94a3b8 !important;
}

.pv-machine-setting-shift {
  color: #43546d !important;
  font-size: var(--pv-fs-11) !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.pv-machine-setting-status-row {
  display: flex !important;
  align-items: center !important;
  min-height: 19px !important;
}

.pv-machine-setting-state {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 18px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  font-size: var(--pv-fs-10) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.pv-machine-setting-state::before {
  content: none !important;
  display: none !important;
}

.pv-machine-setting-state.is-active {
  background: #e8f8f1 !important;
  color: #147554 !important;
}

.pv-machine-setting-state.is-maintenance {
  background: #fff2dd !important;
  color: #9b6509 !important;
}

.pv-machine-setting-state.is-off {
  background: #eef2f7 !important;
  color: #64748b !important;
}

.pv-machine-setting-main > small {
  display: none !important;
}

.pv-machine-setting-flags {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  align-self: flex-end !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 1px !important;
  padding-top: 3px !important;
}

.pv-machine-flag {
  position: relative !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #d7e0ec !important;
  border-radius: 9px !important;
  background: #fff !important;
}

.pv-machine-flag:hover {
  border-color: #aac0e8 !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .08) !important;
}

.pv-machine-flag input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.pv-machine-flag-icon {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  background: none !important;
  font-size: var(--pv-fs-13) !important;
  line-height: 1 !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.pv-machine-flag-icon::before,
.pv-machine-flag-icon::after {
  content: none !important;
  display: none !important;
}

.pv-machine-flag-label {
  display: none !important;
}

.pv-machine-flag.is-on {
  border-color: #bcd0ff !important;
  background: #eef4ff !important;
  color: #2458d3 !important;
}

.pv-machine-flag.is-off {
  border-color: #dfe7f2 !important;
  background: #fff !important;
  color: #94a3b8 !important;
}

.pv-machine-overlap-indicator {
  position: absolute !important;
  top: .4rem;
  right: .2rem;
  width: 19px !important;
  height: 19px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  background-image: none !important;
  font-size: var(--pv-fs-10) !important;
}

.pv-machine-overlap-indicator::before,
.pv-machine-overlap-indicator::after {
  content: none !important;
  display: none !important;
}

.pv-machine-overlap-indicator.is-overlap-allowed {
  border-color: #bcd0ff !important;
  background: #eef4ff !important;
  color: #2458d3 !important;
}

.pv-machine-overlap-indicator.is-overlap-blocked {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
  color: #94a3b8 !important;
}

.pv-machine-overlap-item {
  grid-template-columns: 20px 1fr auto !important;
}

.pv-machine-overlap-item > i {
  grid-column: 1;
  justify-self: center;
  color: #2458d3;
}

.pv-dep-arrow {
  display: inline-grid;
  place-items: center;
  color: #64748b;
}

@media (max-width: 640px) {
  .pv-machine-setting-item {
    grid-template-columns: 18px minmax(0, 1fr) !important;
  }

  .pv-machine-setting-flags {
    flex-direction: row !important;
    gap: 6px !important;
  }
}

/* Fase 3.11 — selector rápido de días en una sola fila, sin rail invasivo */
.pv-daystrip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
  padding: 2px 0 0;
  overflow: hidden;
}

.pv-daystrip::before {
  content: none !important;
  display: none !important;
}

.pv-day {
  position: relative;
  min-width: 0;
  height: 42px;
  padding: 5px 0 4px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  background: #fff;
  color: #526076;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
  transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}

.pv-day::after {
  content: none !important;
  display: none !important;
}

.pv-day:hover {
  border-color: #b8cbff;
  color: #2458d3;
  box-shadow: 0 6px 14px rgba(36, 88, 211, .10);
}

.pv-day .pv-day-name,
.pv-day span:first-child {
  display: block;
  font-size: var(--pv-fs-8) !important;
  line-height: 11px;
  font-weight: 700 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7a90;
}

.pv-day .pv-day-num,
.pv-day span:last-child,
.pv-day b {
  display: block;
  margin-top: 1px;
  font-size: var(--pv-fs-13) !important;
  line-height: 16px;
  font-weight: 800 !important;
  color: #24324a;
}

.pv-day.is-prev {
  background: #f8fafc;
  color: #64748b;
}

.pv-day.in-range:not(.active) {
  background: #f3f7ff;
  border-color: #cbdcff;
}

.pv-day.active {
  border-color: #2458d3;
  background: linear-gradient(180deg, #eef4ff, #ffffff);
  color: #2458d3;
  box-shadow: inset 0 -3px 0 #2458d3, 0 0 0 1px rgba(36, 88, 211, .22);
}

.pv-day.active .pv-day-name,
.pv-day.active span:first-child,
.pv-day.active .pv-day-num,
.pv-day.active span:last-child,
.pv-day.active b {
  color: #2458d3 !important;
}

/* Fase 3.10 — editor de tarea compacto y listado escalable de máquinas válidas */
.pv-editor-modal .modal-dialog {
  max-width: min(820px,calc(100vw - 40px));
}

.pv-editor-header {
  padding: 13px 16px;
  cursor: move;
}

.pv-editor-header .modal-title {
  font-size: var(--pv-fs-17);
}

.pv-task-editor-kpi span {
  font-size: var(--pv-fs-9);
  margin-bottom: 2px;
}

.pv-editor-grid {
  gap: 9px 12px;
}

.pv-editor-grid .pv-field-stack {
  gap: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: none;
}

.pv-editor-grid .pv-field-stack label:first-child {
  font-size: var(--pv-fs-10);
}

.pv-editor-grid .form-control,
.pv-editor-grid .form-select,
.pv-editor-grid .input-group-text {
  min-height: 30px;
  font-size: var(--pv-fs-12);
}

.pv-check-tight {
  min-height: 30px;
  font-size: var(--pv-fs-12);
}

.pv-valid-machine-field {
  padding-bottom: 10px;
}

.pv-valid-machine-list {
  display: block;
  min-height: 0;
}

.pv-valid-machines-box {
  border: 1px solid #dbe5f3;
  border-radius: 10px;
  background: #f8fbff;
  overflow: hidden;
}

.pv-valid-machines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border-bottom: 1px solid #e2eaf5;
  background: #fff;
}

.pv-valid-machines-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172033;
  font-size: var(--pv-fs-12);
  font-weight: 800;
}

.pv-valid-machines-head span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: var(--pv-fs-11);
  font-weight: 700;
}

.pv-valid-machine-search {
  width: calc(100% - 16px);
  margin: 8px 8px 0;
}

.pv-valid-machine-scroll {
  max-height: 118px;
  overflow: auto;
  padding: 6px 8px 8px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
}

.pv-valid-machine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #d9e5f5;
  border-radius: 8px;
  background: #fff;
}

.pv-valid-machine-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e3557;
  font-size: var(--pv-fs-12);
  font-weight: 750;
}

.pv-valid-machine-row em {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: var(--pv-fs-10);
  font-style: normal;
  font-weight: 700;
}

.pv-valid-machine-empty {
  grid-column: 1 / -1;
  padding: 8px;
  color: #64748b;
  font-size: var(--pv-fs-12);
}

.pv-editor-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: var(--pv-fs-11);
}

.pv-editor-footer {
  padding: 12px 16px;
}

@media (max-width: 760px) {
  .pv-valid-machine-scroll {
    grid-template-columns: 1fr;
  }
}

/* Fase 3.11: KPI de intervalo del editor de tarea.
   El intervalo se muestra como inicio/fin en líneas propias para evitar cortes entre fecha y hora. */
.pv-task-editor-kpi--interval {
  min-width: 0;
}
.pv-task-editor-kpi--interval span{
  min-width: 2rem;
}
.pv-task-editor-interval {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pv-task-editor-interval em {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-style: normal;
  line-height: 1.2;
}

.pv-task-editor-interval em span {
  display: inline;
  flex: 0 0 auto;
  margin: 0;
  font-size: var(--pv-fs-8);
  line-height: 1;
  letter-spacing: .07em;
  color: #8b96a8;
}

.pv-task-editor-interval em b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.2;
  color: #132034;
}

.pv-task-editor-interval.is-empty {
  white-space: nowrap;
}

@media (max-width: 900px) {
  }

/* v4.8.1 — tiradores visibles para cambio de duración */
:root {
  --pv-resize-handle-size: 1.05rem;
  --pv-resize-handle-width: .52rem;
  --pv-resize-handle-hit: .9rem;
  --pv-resize-handle-bg: rgba(255, 255, 255, .82);
  --pv-resize-handle-border: rgba(100, 116, 139, .45);
  --pv-resize-handle-shadow: 0 .12rem .35rem rgba(15, 23, 42, .14);
}

.pv-task {
  overflow: visible;
}

.pv-task .ui-resizable-handle {
  position: absolute;
  top: 50%;
  width: var(--pv-resize-handle-hit);
  height: calc(var(--pv-resize-handle-size) + .35rem);
  margin-top: calc((var(--pv-resize-handle-size) + .35rem) / -2);
  background: transparent;
  opacity: 0;
  z-index: 30;
  transition: opacity .12s ease, transform .12s ease;
}

.pv-task .ui-resizable-e {
  right: calc(var(--pv-resize-handle-hit) / -4);
  cursor: ew-resize;
}

.pv-task .ui-resizable-w {
  left: calc(var(--pv-resize-handle-hit) / -4);
  cursor: ew-resize;
}

.pv-task .ui-resizable-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--pv-resize-handle-width);
  height: var(--pv-resize-handle-size);
  transform: translate(-50%, -50%);
  border: 1px solid var(--pv-resize-handle-border);
  border-radius: 999px;
  background: var(--pv-resize-handle-bg);
  box-shadow: var(--pv-resize-handle-shadow);
}

.pv-task .ui-resizable-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .12rem;
  height: .48rem;
  transform: translate(-50%, -50%);
  border-left: 1px solid rgba(100, 116, 139, .5);
  border-right: 1px solid rgba(100, 116, 139, .5);
}

.pv-task:hover .ui-resizable-handle {
  opacity: .72;
}

.pv-task.ui-resizable-resizing .ui-resizable-handle {
  opacity: 1;
  transform: scale(1.04);
}

.pv-task.ui-resizable-resizing {
  z-index: 80 !important;
  cursor: ew-resize;
}

.pv-task > .pv-task-code,
.pv-task > span,
.pv-task > small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Fase 4.4: login, configuración centralizada y multiusuario --- */
.pv-user-badge,
.pv-presence-badge {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  min-height: 1.7rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  font-weight: 800;
  font-size: var(--pv-fs-11);
  white-space: nowrap;
}

.pv-user-badge.is-readonly {
  color: #7c5600;
  background: #fff7df;
  border-color: #f2d58c;
}

.pv-presence-badge {
  min-width: 2.2rem;
  justify-content: center;
}

.pv-presence-badge.is-warning {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}


.pv-user-menu {
  position: fixed;
  z-index: 2500;
  min-width: 14.5rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: #fff;
  box-shadow: var(--shadow);
  padding: .45rem;
  display: none;
}

.pv-user-menu.is-open {
  display: block;
}

.pv-user-menu-head {
  padding: .55rem .65rem .6rem;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: .3rem;
}

.pv-user-menu-head strong,
.pv-user-menu-head small {
  display: block;
}

.pv-user-menu-head strong {
  font-size: var(--pv-fs-13);
  font-weight: 900;
  color: var(--ink);
}

.pv-user-menu-head small {
  margin-top: .15rem;
  color: var(--muted);
  font-size: var(--pv-fs-11);
  font-weight: 800;
}

.pv-user-menu button {
  width: 100%;
  border: 0;
  border-radius: .7rem;
  background: transparent;
  color: var(--ink);
  padding: .55rem .65rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--pv-fs-12);
  font-weight: 800;
  text-align: left;
}

.pv-user-menu button:hover {
  background: #f1f5fb;
}

.pv-user-menu button i {
  width: 1rem;
  color: var(--muted);
  text-align: center;
}

.pv-login-modal .modal-dialog {
  max-width: 28rem;
}

.pv-login-note {
  border: 1px solid #dbeafe;
  border-radius: .85rem;
  background: #eff6ff;
  padding: .75rem .85rem;
  font-size: var(--pv-fs-12);
  color: #1e3a8a;
  margin-bottom: .9rem;
}

.pv-login-error {
  min-height: 1.2rem;
  margin-top: .6rem;
  color: #be123c;
  font-weight: 800;
  font-size: var(--pv-fs-12);
}

.pv-auth-readonly .pv-save,
.pv-auth-readonly #pvSave {
  opacity: .55;
  cursor: not-allowed;
}

.pv-task-readonly,
.pv-card-readonly {
  cursor: default !important;
  filter: saturate(.65);
}


.pv-perm-badge,
.pv-machine-presence {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-left: auto;
}

.pv-perm-badge {
  padding: .08rem .38rem;
  border-radius: 999px;
  font-size: var(--pv-fs-9);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid transparent;
}

.pv-perm-badge.can-plan {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.pv-perm-badge.readonly {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.pv-perm-badge.no-access {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.pv-machine-readonly .pv-machine,
.pv-machine-no-access .pv-machine {
  background: linear-gradient(180deg,#f8fafc,#eef2f7);
}

.pv-machine-remote-changed .pv-machine {
  box-shadow: inset .2rem 0 0 #f59e0b;
}

.pv-presence-dot {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pv-fs-8);
  font-weight: 900;
}

.pv-remote-chip {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pv-fs-8);
}

.pv-machine-perm-inline {
  margin-left: .45rem;
  font-style: normal;
  font-size: var(--pv-fs-10);
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.pv-machine-setting-item.is-no-access,
.pv-machine-setting-item.is-readonly {
  opacity: .82;
}

.pv-machine-flag.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pv-config-modal .modal-dialog {
  max-width: min(74rem, calc(100vw - 2rem));
}

.pv-config-modal .modal-content {
  min-height: min(48rem, calc(100vh - 2rem));
}

.pv-config-body {
  padding: 0;
}

.pv-config-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0,1fr);
  min-height: 38rem;
}

.pv-config-tabs {
  border-right: 1px solid var(--line);
  background: #f8fafc;
  padding: .8rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.pv-config-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  border-radius: .75rem;
  padding: .58rem .65rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 900;
  text-align: left;
  font-size: var(--pv-fs-12);
}

.pv-config-tabs button.active,
.pv-config-tabs button:hover {
  background: #fff;
  color: var(--blue);
  border-color: #dbeafe;
  box-shadow: 0 .5rem 1.2rem rgba(15,23,42,.06);
}

.pv-config-panels {
  padding: 1rem;
  overflow: auto;
  max-height: min(42rem, calc(100vh - 9rem));
}

.pv-config-panel {
  display: none;
}

.pv-config-panel.active {
  display: block;
}

.pv-config-panel h6 {
  margin: 0 0 .85rem;
  font-size: var(--pv-fs-14);
  font-weight: 1000;
  color: #1e293b;
}

.pv-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.pv-config-grid label,
.pv-config-panel label:not(.pv-check) {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  font-size: var(--pv-fs-11);
  font-weight: 900;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pv-config-machine-list,
.pv-config-user-list,
.pv-session-list {
  display: grid;
  gap: .45rem;
}

.pv-config-machine-row {
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #fff;
  padding: .65rem .75rem;
  display: grid;
  grid-template-columns: minmax(0,1fr) 7rem 7rem;
  align-items: center;
  gap: .6rem;
}

.pv-config-machine-row strong,
.pv-session-item strong {
  font-size: var(--pv-fs-13);
  color: #0f172a;
}

.pv-config-machine-row small,
.pv-session-item small {
  display: block;
  color: #64748b;
  font-size: var(--pv-fs-11);
}

.pv-config-users-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0,1fr);
  gap: 1rem;
}

.pv-config-user-list button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: .8rem;
  padding: .65rem .75rem;
  text-align: left;
}

.pv-config-user-list button.active {
  border-color: #93c5fd;
  box-shadow: inset .22rem 0 0 var(--blue);
}

.pv-config-user-list strong {
  display: block;
  font-size: var(--pv-fs-13);
}

.pv-config-user-list small {
  color: #64748b;
  font-size: var(--pv-fs-11);
}

.pv-user-perm-toolbar,
.pv-config-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .8rem 0;
}

.pv-user-perm-scroll {
  max-height: 20rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .85rem;
}

.pv-user-perm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: var(--pv-fs-12);
}

.pv-user-perm-table th,
.pv-user-perm-table td {
  padding: .55rem .65rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.pv-user-perm-table th {
  background: #f8fafc;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--pv-fs-10);
}

.pv-user-perm-table td:not(:first-child),
.pv-user-perm-table th:not(:first-child) {
  text-align: center;
  width: 6rem;
}

/* v4.4.1 — permisos de usuario: buscador y cabecera fija del listado de máquinas */
.pv-user-perm-search {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .55rem;
  padding: .35rem .55rem;
  border: 1px solid #dbe4f0;
  border-radius: .75rem;
  background: #fff;
  color: #64748b;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: var(--pv-fs-12) !important;
  font-weight: 700 !important;
}

.pv-user-perm-search i {
  flex: 0 0 auto;
  color: #64748b;
  font-size: var(--pv-fs-12);
}

.pv-user-perm-search input {
  min-height: 1.8rem;
  padding: .18rem .2rem;
  border: 0;
  box-shadow: none;
  background: transparent;
  font-size: var(--pv-fs-12);
}

.pv-user-perm-search input:focus {
  box-shadow: none;
  background: transparent;
}

.pv-user-perm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 #edf2f7;
}

.pv-user-perm-table thead th:first-child {
  z-index: 3;
}

.pv-user-perm-table tbody tr.is-filtered-out {
  display: none;
}

.pv-user-perm-empty {
  margin-top: .5rem;
}

.pv-session-item {
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fff;
  padding: .55rem .7rem;
}

.pv-session-item.is-me {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.pv-session-item span {
  display: inline-flex;
  margin-left: .4rem;
  color: #475569;
  font-size: var(--pv-fs-11);
  font-weight: 900;
  text-transform: uppercase;
}

.pv-config-debug {
  margin-top: .8rem;
  max-height: 20rem;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: .85rem;
  padding: .85rem;
  font-size: var(--pv-fs-11);
}

@media (max-width: 62rem) {
  .pv-config-layout,
  .pv-config-users-layout {
    grid-template-columns: 1fr;
  }

  .pv-config-tabs {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    overflow-x: auto;
  }
}

/* --- Centro de avisos --- */
.pv-notice-badge {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999rem;
  min-width: 2rem;
  min-height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .55rem;
  font-size: var(--pv-fs-12);
  font-weight: 900;
  white-space: nowrap;
}

.pv-notice-badge:hover,
.pv-notice-badge.has-unread {
  color: #0f3fae;
  border-color: #b8caf6;
  background: #f4f7ff;
}

.pv-notice-badge-count {
  position: absolute;
  top: -.42rem;
  right: -.38rem;
  min-width: 1.05rem;
  height: 1.05rem;
  border-radius: 999rem;
  padding: 0 .25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c73d4a;
  color: #fff;
  font-size: var(--pv-fs-9);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 .25rem .55rem rgba(199,61,74,.28);
}

.pv-notice-modal .modal-dialog {
  max-width: 46rem;
}

.pv-notice-modal .modal-content {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pv-notice-header {
  background: linear-gradient(180deg,#fff,#f8fafc);
  border-bottom: 1px solid #e0e7f0;
}

.pv-notice-body {
  background: #f6f8fb;
  padding: 1rem;
}

.pv-notice-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid #dbe5f2;
  border-radius: .9rem;
  background: #fff;
  padding: .8rem .9rem;
  margin-bottom: .8rem;
}

.pv-notice-toolbar strong,
.pv-notice-toolbar small {
  display: block;
}

.pv-notice-toolbar strong {
  font-size: var(--pv-fs-13);
  font-weight: 900;
  color: var(--ink);
}

.pv-notice-toolbar small {
  margin-top: .12rem;
  font-size: var(--pv-fs-11);
  color: var(--muted);
  font-weight: 700;
}

.pv-notice-actions {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pv-toolbtn-danger-soft {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff1f2;
}

.pv-toolbtn-danger-soft:hover {
  color: #fff;
  background: #be123c;
  border-color: #be123c;
}

.pv-notice-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.pv-notice-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.1rem minmax(0,1fr);
  gap: .7rem;
  border: 1px solid #dfe8f4;
  border-radius: .9rem;
  background: #fff;
  padding: .75rem .8rem;
}

.pv-notice-item.is-read {
  opacity: .72;
  background: #f9fbfe;
}

.pv-notice-item.is-unread {
  border-color: #7ea2f3;
  box-shadow: 0 .5rem 1.2rem rgba(37,88,211,.12);
}

.pv-notice-item.is-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: .75rem;
  bottom: .75rem;
  width: .22rem;
  border-radius: 0 999rem 999rem 0;
  background: #2458d3;
}

.pv-notice-item-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #2458d3;
}

.pv-notice-danger .pv-notice-item-icon {
  background: #fff1f2;
  color: #c73d4a;
}

.pv-notice-success .pv-notice-item-icon {
  background: #ecfdf5;
  color: #1f9d72;
}

.pv-notice-warning .pv-notice-item-icon {
  background: #fffbeb;
  color: #b78312;
}

.pv-notice-item-body {
  min-width: 0;
}

.pv-notice-item-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
}

.pv-notice-item-head strong {
  color: var(--ink);
  font-size: var(--pv-fs-12);
  font-weight: 900;
}

.pv-notice-item-head span {
  color: var(--muted);
  font-size: var(--pv-fs-10);
  font-weight: 800;
  white-space: nowrap;
}

.pv-notice-item p {
  margin: .22rem 0 .35rem;
  color: #263349;
  font-size: var(--pv-fs-12);
  line-height: 1.35;
}

.pv-notice-repeat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .35rem;
  padding: .04rem .35rem;
  border-radius: 999rem;
  background: #e8eef7;
  color: #475569;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-notice-item-meta {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}

.pv-notice-item-meta span,
.pv-notice-read-btn {
  border-radius: 999rem;
  background: #eef2f7;
  color: #536178;
  padding: .1rem .45rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-notice-item-meta .pv-notice-unread-state {
  background: #dbeafe;
  color: #1d4ed8;
}

.pv-notice-item-meta .pv-notice-read-state {
  background: #f1f5f9;
  color: #64748b;
}

.pv-notice-read-btn {
  border: 1px solid #c7d7f7;
  background: #fff;
  color: #2458d3;
  cursor: pointer;
  line-height: 1.15;
}

.pv-notice-read-btn:hover {
  background: #2458d3;
  border-color: #2458d3;
  color: #fff;
}

.pv-notice-debug {
  margin-top: .45rem;
}

.pv-notice-debug summary {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #536178;
  cursor: pointer;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  user-select: none;
}

.pv-notice-debug summary:hover {
  color: #2458d3;
}

.pv-notice-debug pre {
  margin: .45rem 0 0;
  max-height: 9rem;
  overflow: auto;
  border-radius: .65rem;
  background: #0f172a;
  color: #e2e8f0;
  padding: .55rem .65rem;
  font-size: var(--pv-fs-10);
}

.pv-notice-empty {
  min-height: 12rem;
  border: 1px dashed #cad6e8;
  border-radius: 1rem;
  background: #fff;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  text-align: center;
}

.pv-notice-empty i {
  font-size: var(--pv-fs-28);
  color: #94a3b8;
}

.pv-notice-empty strong {
  color: var(--ink);
  font-size: var(--pv-fs-14);
}

.pv-notice-empty span {
  font-size: var(--pv-fs-12);
  font-weight: 700;
}

/* v4.4.1 — branding Dana, indicadores de máquina y barra superior estable */
.pv-rail-logo {
  width: 2.9rem;
  height: 2.9rem;
  margin: .9rem 0 .55rem;
  padding: .35rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .95rem;
  background: rgba(255,255,255,.06);
  display: grid;
  place-items: center;
}

.pv-rail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pv-brand-mark {
  background: #fff;
  border: 1px solid #e1e7f0;
  overflow: hidden;
}

.pv-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pv-desktopbar {
  position: relative;
}

.pv-top-indicators {
  position: static;
  z-index: 40;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .38rem;
  pointer-events: auto;
}

.pv-top-indicators .pv-user-badge span {
  max-width: 13.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-top-indicators .pv-data-mode {
  height: 1.7rem;
  background: rgba(255,255,255,.92);
}

.pv-machine {
  position: relative;
}

.pv-row > .pv-machine {
  padding-bottom: 1.65rem;
}

.pv-row > .pv-machine .pv-machine-load {
  margin-right: 4.8rem;
}

.pv-row > .pv-machine em {
  display: block;
  padding-right: 4.8rem;
  line-height: 1.15;
}

.pv-machine-indicators {
  position: absolute;
  right: .5rem;
  bottom: .22rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
  z-index: 8;
}

.pv-machine-indicators:empty {
  display: none;
}

.pv-machine-indicators .pv-perm-badge,
.pv-machine-indicators .pv-machine-presence {
  margin-left: 0;
}

.pv-perm-badge {
  min-width: 1.35rem;
  min-height: 1.05rem;
  justify-content: center;
  text-align: center;
  padding: .08rem .32rem;
}

.pv-remote-chip {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  cursor: pointer;
}

.pv-remote-chip:focus-visible {
  outline: 2px solid #2458d3;
  outline-offset: 2px;
}

.pv-remote-detail-popover {
  position: fixed;
  z-index: 3600;
  width: min(20rem, calc(100vw - 1rem));
  max-height: min(24rem, calc(100vh - 1rem));
  overflow: auto;
  display: none;
  border: 1px solid #d8e0eb;
  border-radius: .9rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(13,25,46,.18);
  padding: .75rem;
  font-size: var(--pv-fs-11);
}

.pv-remote-detail-popover.is-open {
  display: block;
}

.pv-remote-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}

.pv-remote-detail-head strong {
  font-size: var(--pv-fs-13);
  font-weight: 950;
}

.pv-remote-detail-head button {
  border: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999rem;
  background: #eef2f7;
  color: #475569;
  font-weight: 900;
  line-height: 1;
}

.pv-remote-detail-popover dl {
  display: grid;
  grid-template-columns: 4.6rem minmax(0,1fr);
  gap: .25rem .55rem;
  margin: 0 0 .55rem;
}

.pv-remote-detail-popover dt {
  color: #64748b;
  font-weight: 900;
}

.pv-remote-detail-popover dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.pv-remote-detail-popover ul {
  list-style: none;
  margin: .55rem 0 0;
  padding: .45rem 0 0;
  border-top: 1px solid #e2e8f0;
}

.pv-remote-detail-popover li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .22rem 0;
}

.pv-remote-detail-popover li span {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.pv-remote-detail-popover li em {
  flex: 0 0 auto;
  font-style: normal;
  color: #64748b;
  font-weight: 800;
}

.pv-remote-detail-popover small {
  display: block;
  color: #64748b;
  font-weight: 750;
}

@media (max-width: 1200px) {
  .pv-top-indicators .pv-user-badge span {
    max-width: 8rem;
  }
}

/* v4.5 — rendimiento: carga progresiva, preloaders y helper de arrastre estable */
.pv-board {
  position: relative;
}

.pv-board.is-loading::after {
  content: "Cargando timeline…";
  position: absolute;
  left: calc(var(--machine) + 18px);
  top: 78px;
  z-index: 25;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d6e2f2;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 24px rgba(21,32,51,.10);
  color: #526277;
  font-weight: 800;
  font-size: var(--pv-fs-12);
}

.pv-board.is-loading #pvRows,
.pv-board.is-loading #pvMinimapContent {
  opacity: .52;
}

.pv-right.is-loading .pv-backlog-controls {
  opacity: .65;
}

.pv-skeleton-card {
  height: 86px;
  border-radius: 15px;
  border: 1px solid #dfe7f1;
  background:
    linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.65), rgba(255,255,255,0)),
    linear-gradient(180deg, #f4f7fb, #edf3f9);
  background-size: 200% 100%, 100% 100%;
  animation: pvSkeleton 1.05s linear infinite;
}

@keyframes pvSkeleton {
  from { background-position: 200% 0, 0 0; }
  to { background-position: -200% 0, 0 0; }
}

.pv-load-more,
.pv-empty-list {
  border: 1px dashed #c7d4e6;
  border-radius: 13px;
  background: #f8fbff;
  color: #526277;
  font-weight: 800;
  font-size: var(--pv-fs-12);
  padding: 10px 12px;
  text-align: center;
}

.pv-load-more {
  cursor: pointer;
}

.pv-load-more:hover {
  background: #eef4ff;
  color: #1f3d73;
}

.pv-save.is-saving {
  opacity: .75;
  cursor: wait;
}

.pv-drag-helper,
.ui-draggable-dragging {
  pointer-events: none !important;
}

.pv-drop-preview:after {
  max-width: min(280px, calc(100vw - 40px));
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v4.5 — rendimiento: rejilla por CSS, no por miles de nodos DOM */
.pv-lane {
  background-image:
    linear-gradient(to right, rgba(197,210,229,.9) 1px, transparent 1px),
    linear-gradient(to right, rgba(226,232,240,.85) 1px, transparent 1px);
  background-size: var(--pv-grid-major, 66px) 100%, var(--pv-grid-minor, 16px) 100%;
  background-position: 0 0, 0 0;
}

.pv-grid {
  display: none !important;
}

/* v4.6 — rejilla del timeline precisa por capa visible.
   Evita background-size repetido por fila, que con zooms fraccionarios generaba
   líneas dobles/desalineadas por redondeo acumulado. */
#pvRows {
  position: relative;
  z-index: 1;
}

.pv-grid-layer {
  position: absolute;
  left: var(--machine);
  top: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.pv-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-.5px);
}

.pv-grid-line.minor {
  background: rgba(226,232,240,.9);
}

.pv-grid-line.major {
  background: rgba(197,210,229,.95);
}

.pv-lane {
  background: transparent !important;
  background-image: none !important;
}

/* --- Configuración: revisión de usabilidad 2026-07-07 --- */
.pv-config-modal .modal-dialog {
  max-width: min(82rem, calc(100vw - 1.4rem));
}

.pv-config-modal .modal-content {
  height: min(52rem, calc(100vh - 1.4rem));
  min-height: min(42rem, calc(100vh - 1.4rem));
  overflow: hidden;
}

.pv-config-modal .modal-body {
  min-height: 0;
}

.pv-config-body,
.pv-config-layout,
.pv-config-panels,
.pv-config-panel.active {
  min-height: 0;
}

.pv-config-layout {
  height: 100%;
  min-height: 0;
  grid-template-columns: 13.5rem minmax(0,1fr);
}

.pv-config-panels {
  max-height: none;
  overflow: auto;
  padding: 1rem;
}

.pv-config-panel.active {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.pv-config-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  position: sticky;
  top: -1rem;
  z-index: 4;
  background: linear-gradient(180deg,#fff 0%,rgba(255,255,255,.94) 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0 .75rem;
  margin-top: -1rem;
}

.pv-config-section-head h6 {
  margin-bottom: .25rem;
}

.pv-config-summary {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 19rem;
}

.pv-config-summary span {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: .85rem;
  padding: .45rem .65rem;
  min-width: 5.6rem;
  text-align: right;
}

.pv-config-summary strong {
  display: block;
  font-size: var(--pv-fs-15);
  line-height: 1;
  color: #0f172a;
}

.pv-config-summary em {
  display: block;
  margin-top: .18rem;
  font-style: normal;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-config-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem,1fr) minmax(10rem,.45fr) minmax(9rem,.36fr);
  gap: .55rem;
  align-items: center;
}

.pv-config-search {
  position: relative;
  display: block !important;
}

.pv-config-search i {
  position: absolute;
  left: .72rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 2;
  font-size: var(--pv-fs-12);
}

.pv-config-search input {
  padding-left: 2.1rem;
}

.pv-config-bulkbar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .55rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: .9rem;
}

.pv-config-machine-table {
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}

.pv-config-machine-head,
.pv-config-machine-row {
  display: grid;
  grid-template-columns: minmax(13rem,1.3fr) minmax(9rem,.8fr) 6.5rem 6.5rem;
  gap: .7rem;
  align-items: center;
}

.pv-config-machine-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9;
  color: #64748b;
  border-bottom: 1px solid #dbe3ef;
  padding: .55rem .75rem;
  font-size: var(--pv-fs-10);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pv-config-machine-list {
  display: block;
  max-height: min(29rem, calc(100vh - 21rem));
  overflow: auto;
}

.pv-config-machine-row {
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  box-shadow: none;
  padding: .65rem .75rem;
  min-height: 3.65rem;
}

.pv-config-machine-row:nth-child(even) {
  background: #fbfdff;
}

.pv-config-machine-row:hover {
  background: #f8fbff;
}

.pv-config-machine-row.is-filtered-out {
  display: none;
}

.pv-config-machine-row.is-hidden-machine {
  opacity: .62;
}

.pv-config-machine-row.has-overlap .pv-config-machine-main strong::after {
  content: 'Solapes';
  margin-left: .45rem;
  display: inline-flex;
  border-radius: 999rem;
  padding: .05rem .36rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: var(--pv-fs-9);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

.pv-config-machine-main strong {
  display: block;
  color: #0f172a;
  font-size: var(--pv-fs-13);
  line-height: 1.18;
}

.pv-config-machine-main small,
.pv-config-machine-type span {
  display: block;
  color: #64748b;
  font-size: var(--pv-fs-11);
  line-height: 1.2;
}

.pv-config-machine-type span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-switch {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: .45rem !important;
  color: #334155 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: var(--pv-fs-11) !important;
}

.pv-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pv-switch span {
  width: 2.25rem;
  height: 1.22rem;
  border-radius: 999rem;
  background: #cbd5e1;
  border: 1px solid #cbd5e1;
  position: relative;
  flex: 0 0 auto;
  transition: background .16s ease, border-color .16s ease;
}

.pv-switch span::after {
  content: '';
  position: absolute;
  width: .9rem;
  height: .9rem;
  left: .15rem;
  top: .12rem;
  border-radius: 999rem;
  background: #fff;
  box-shadow: 0 .08rem .2rem rgba(15,23,42,.28);
  transition: transform .16s ease;
}

.pv-switch input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
}

.pv-switch input:checked + span::after {
  transform: translateX(1.02rem);
}

.pv-switch em {
  min-width: 1.25rem;
  font-style: normal;
  color: #475569;
  font-weight: 900;
}

.pv-config-empty {
  padding: 1.3rem;
  text-align: center;
  color: #64748b;
  font-weight: 800;
  background: #f8fafc;
}

@media (max-width: 70rem) {
  .pv-config-section-head,
  .pv-config-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .pv-config-summary {
    justify-content: flex-start;
    min-width: 0;
  }

  .pv-config-machine-head,
  .pv-config-machine-row {
    grid-template-columns: minmax(10rem,1fr) 7rem 5.6rem 5.6rem;
  }
}

/* --- Configuración: evitar doble scroll en modal de máquinas 2026-07-07 --- */
.pv-config-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 1.4rem);
}

.pv-config-modal .modal-header,
.pv-config-modal .modal-footer {
  flex: 0 0 auto;
}

.pv-config-modal .modal-body,
.pv-config-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pv-config-layout {
  height: 100%;
  min-height: 0;
}

.pv-config-panels {
  min-height: 0;
  overflow: hidden;
}

.pv-config-panel.active {
  min-height: 0;
  overflow: auto;
}

.pv-config-panel[data-pv-config-panel="machines"].active {
  overflow: hidden;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-section-head {
  position: static;
  top: auto;
  margin-top: 0;
  padding-top: 0;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-machine-table {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-machine-head {
  flex: 0 0 auto;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-machine-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

/* --- Configuración: scroll interno real en lista de máquinas 2026-07-07 --- */
.pv-config-modal .modal-body {
  display: flex;
  flex-direction: column;
}

.pv-config-body {
  display: flex;
  flex-direction: column;
}

.pv-config-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.pv-config-tabs,
.pv-config-panels {
  min-height: 0;
}

.pv-config-panels {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pv-config-panel.active {
  flex: 1 1 auto;
  min-height: 0;
}

.pv-config-panel[data-pv-config-panel="machines"].active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-toolbar,
.pv-config-panel[data-pv-config-panel="machines"] .pv-config-bulkbar,
.pv-config-panel[data-pv-config-panel="machines"] .pv-config-section-head {
  flex: 0 0 auto;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-machine-table {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pv-config-panel[data-pv-config-panel="machines"] .pv-config-machine-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* --- Configuración 2026-07-08: modal sólo general/usuarios/diagnóstico --- */
.pv-config-layout-slim {
  grid-template-columns: 12.5rem minmax(0, 1fr);
}

.pv-config-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .9rem;
}

.pv-config-subsection {
  margin-top: 1rem;
  padding: .9rem;
  border: 1px solid #e2e8f0;
  border-radius: .95rem;
  background: #f8fafc;
}

.pv-config-subsection h6 {
  margin-bottom: .75rem;
}

.pv-role-help,
.pv-role-admin-note {
  margin: .75rem 0;
  padding: .6rem .75rem;
  border-radius: .8rem;
  background: #f8fafc;
  color: #475569;
  font-size: var(--pv-fs-12);
  font-weight: 700;
}

.pv-role-admin-note {
  display: none;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.pv-config-user-editor.is-admin-role .pv-role-help {
  display: none;
}

.pv-user-machine-title {
  display: block;
  min-width: 0;
}

.pv-user-machine-title strong {
  display: block;
  line-height: 1.18;
  color: #1e293b;
  font-size: var(--pv-fs-12);
}

.pv-user-machine-title small {
  display: block;
  margin-top: .15rem;
  line-height: 1.15;
  color: #64748b;
  font-size: var(--pv-fs-11);
}

.pv-user-perm-table td:first-child {
  min-width: 13rem;
}

.pv-user-perm-table td:not(:first-child),
.pv-user-perm-table th:not(:first-child) {
  width: 5.5rem;
}

.pv-rail-btn.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.pv-auth-nonadmin .pv-rail-btn[data-tool="settings"] {
  opacity: .42;
}

@media (max-width: 70rem) {
  .pv-config-check-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Configuración: feedback visual al aplicar cambios 2026-07-08 --- */
#pvCfgApply.pv-btn-saving {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  cursor: progress;
  opacity: .94;
  box-shadow: 0 0 0 .18rem rgba(37, 99, 235, .15);
}

#pvCfgApply .pv-btn-spinner {
  width: .9rem;
  height: .9rem;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pvCfgApplySpin .75s linear infinite;
}

@keyframes pvCfgApplySpin {
  to {
    transform: rotate(360deg);
  }
}

/* v4.10 — color visual de tarea, split en cola y tamaño local de cola */
.pv-task.has-custom-color {
  border-left-color: var(--pv-task-color) !important;
  border-color: color-mix(in srgb, var(--pv-task-color) 38%, #b9c8de);
  background: linear-gradient(90deg, var(--pv-task-color-soft), #fff 42%);
  box-shadow: 0 8px 18px rgba(21,32,51,.12), inset 0 0 0 1px var(--pv-task-color-glow);
}


.pv-mini-task.has-custom-color {
  background: var(--pv-task-color) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.72), 0 0 0 2px var(--pv-task-color-glow);
}

.pv-card.has-custom-color {
  border-left-color: var(--pv-task-color) !important;
  border-left-width: var(--pv-task-border-left) !important;
  /*background: linear-gradient(90deg, var(--pv-task-color-soft), #fff 48%);*/
}

.pv-card.has-custom-color:hover {
  border-color: color-mix(in srgb, var(--pv-task-color) 32%, #c9d7ea);
}

.pv-card.split-virtual {
  border-style: dashed;
  outline: 1px dashed rgba(29,111,232,.35);
  outline-offset: -5px;
  /*background-image: repeating-linear-gradient(135deg, rgba(29,111,232,.055) 0, rgba(29,111,232,.055) 6px, transparent 6px, transparent 12px);*/
}

.pv-card.has-custom-color.split-virtual {
  /*background-image:
    linear-gradient(90deg, var(--pv-task-color-soft), rgba(255,255,255,.96) 52%),
    repeating-linear-gradient(135deg, rgba(29,111,232,.055) 0, rgba(29,111,232,.055) 6px, transparent 6px, transparent 12px);*/
}

.pv-split-chip {
  background: #eef5ff;
  color: #2458d3;
}

.pv-backlog-limit {
  display: grid;
  grid-template-columns: auto minmax(64px, 88px) auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pv-backlog-limit label,
.pv-backlog-limit span {
  margin: 0;
  color: #617088;
  font-size: var(--pv-fs-10);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.pv-backlog-limit select {
  min-width: 0;
  border-radius: 10px;
  border-color: #d8e1ee;
}

.pv-color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-color-input-wrap .form-control-color {
  width: 48px;
  height: 31px;
  padding: 3px;
  border-radius: 10px;
  border-color: #d8e1ee;
}

.pv-color-input-wrap .btn {
  white-space: nowrap;
  border-radius: 10px;
}

.pv-task-editor-color-preview {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}

.pv-task-editor-color-preview i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15,23,42,.12);
}

#pvTaskEditClearColor.active {
  background: #eef3f8;
  border-color: #cdd8e6;
  color: #334155;
}

/* v4.11 — detalle de tarea compacto, color legacy visible y preparación/tirada */
.pv-editor-modal .modal-dialog {
  max-width: min(940px, calc(100vw - 36px));
  max-height: calc(100vh - 24px);
}

.pv-editor-modal .modal-header,
.pv-editor-modal .modal-footer {
  flex: 0 0 auto;
}

.pv-task-editor-kpi small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: var(--pv-fs-10);
  font-weight: 750;
  line-height: 1.15;
}

.pv-task-editor-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 3px;
  border: 1px solid #dce6f3;
  border-radius: 999px;
  background: #f5f8fc;
}

.pv-task-editor-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #526174;
  padding: 5px 12px;
  font-size: var(--pv-fs-12);
  font-weight: 850;
}

.pv-task-editor-tabs button.active {
  background: #fff;
  color: #1d6fe8;
  box-shadow: 0 1px 4px rgba(15,23,42,.12);
}

.pv-task-editor-panes {
  min-height: 0;
}

.pv-task-editor-pane.active {
  display: block;
}

.pv-editor-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pv-editor-grid-compact .pv-field-stack {
  padding: 7px 8px;
  gap: 4px;
}

.pv-task-color-help {
  color: #64748b;
  font-size: var(--pv-fs-11);
  font-weight: 700;
}

.pv-task-color-help code {
  color: #334155;
  background: #eef4ff;
  border-radius: 5px;
  padding: 1px 4px;
}

.pv-valid-machines-details {
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.pv-valid-machines-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 9px 11px;
  background: #fff;
  list-style: none;
}

.pv-valid-machines-details summary::-webkit-details-marker {
  display: none;
}

.pv-valid-machines-details summary:after {
  content: "⌄";
  color: #64748b;
  font-weight: 950;
}

.pv-valid-machines-details[open] summary:after {
  transform: rotate(180deg);
}

.pv-valid-machines-details summary span {
  color: #172033;
  font-size: var(--pv-fs-13);
  font-weight: 900;
}

.pv-valid-machines-details summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: var(--pv-fs-11);
  font-style: normal;
  font-weight: 750;
}

.pv-valid-machines-details .pv-valid-machine-list {
  padding: 8px;
}

.pv-editor-note-compact {
  margin-top: 8px;
}

.pv-task.has-custom-color {
  color: var(--pv-task-color-text);
  border-left-color: var(--pv-task-color) !important;
  border-color: var(--pv-task-color);
  background: linear-gradient(180deg, var(--pv-task-color-fill), var(--pv-task-color-strong));
  box-shadow: 0 8px 18px rgba(21,32,51,.16), inset 0 0 0 1px rgba(255,255,255,.28);
}

.pv-task.has-custom-color > .pv-task-code,
.pv-task.has-custom-color > span,
.pv-task.has-custom-color > small {
  position: relative;
  z-index: 2;
  color: var(--pv-task-color-text);
  text-shadow: 0 1px 2px rgba(0,0,0,.22);
}

.pv-task.has-custom-color > small {
  opacity: .92;
}

.pv-task-duration-strip {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 5px;
  z-index: 3;
  display: flex;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 0 0 1px rgba(15,23,42,.15);
  pointer-events: none;
}

.pv-task-duration-strip i {
  display: block;
  min-width: 0;
  height: 100%;
}

.pv-task-duration-mr {
  background: repeating-linear-gradient(135deg, rgba(15,23,42,.55) 0, rgba(15,23,42,.55) 3px, rgba(255,255,255,.68) 3px, rgba(255,255,255,.68) 6px);
}

.pv-task-duration-run {
  background: rgba(255,255,255,.86);
}

.pv-task:not(.has-custom-color) .pv-task-duration-mr {
  background: repeating-linear-gradient(135deg, rgba(36,88,211,.55) 0, rgba(36,88,211,.55) 3px, rgba(255,255,255,.75) 3px, rgba(255,255,255,.75) 6px);
}

.pv-task:not(.has-custom-color) .pv-task-duration-run {
  background: rgba(36,88,211,.28);
}

.pv-card.has-custom-color {
  /*background: linear-gradient(90deg, var(--pv-task-color-soft), rgba(255,255,255,.98) 62%);*/
}

@media (max-width: 1000px) {
  .pv-editor-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .pv-task-editor-summary,
  .pv-editor-grid-compact {
    grid-template-columns: 1fr;
  }

  }

/* v4.11.1 — ajuste detalle tarea: alto fijo por modal */

.pv-editor-modal .modal-dialog {
  max-width: min(940px, calc(100vw - 36px));
}

.pv-task-editor-summary,
.pv-task-editor-tabs {
  flex: 0 0 auto;
}

.pv-task-editor-panes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* v4.12 — detalle de tarea editable en PL_Tareas */
.pv-task-editor-color-preview small {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

#pvTaskEditClearColor.active {
  background: #eef6ff;
  border-color: #9fc5ff;
  color: #1d4ed8;
}


/* v4.12.1 — Recursos: lista de máquinas válidas desplegada sin scroll interno.
   El scroll, si hace falta, lo controla la pestaña del modal, no la lista. */
.pv-task-editor-pane[data-pv-task-pane="resources"] .pv-valid-machines-details {
  overflow: visible;
}

.pv-task-editor-pane[data-pv-task-pane="resources"] .pv-valid-machines-details summary {
  cursor: default;
}

.pv-task-editor-pane[data-pv-task-pane="resources"] .pv-valid-machines-details summary:after {
  content: none;
}

.pv-task-editor-pane[data-pv-task-pane="resources"] .pv-valid-machines-box {
  overflow: visible;
}

.pv-task-editor-pane[data-pv-task-pane="resources"] .pv-valid-machine-scroll {
  max-height: none;
  overflow: visible;
}

/* v4.12 — minimapa agregado por carriles y ventana vertical */
#pvMinimapYWindow {
  position: absolute;
  left: 0;
  right: 0;
  display: none;
  pointer-events: none;
  z-index: 2;
  background: rgba(37, 99, 235, .08);
  border-top: 1px solid rgba(37, 99, 235, .28);
  border-bottom: 1px solid rgba(37, 99, 235, .28);
}

.pv-minimap-content .pv-mini-line {
  opacity: .82;
}

.pv-minimap-content .pv-mini-task {
  min-height: 2px;
}

/* V4.8.35 RC — administración de usuarios: tabla escalable + editor dedicado */
.pv-config-panel[data-pv-config-panel="users"].active {
  overflow: hidden;
  gap: 0;
}

.pv-config-users-manager,
.pv-users-list-view,
.pv-users-editor-view {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.pv-config-users-manager,
.pv-users-list-view,
.pv-users-editor-view {
  display: flex;
  flex-direction: column;
}

.pv-users-section-head,
.pv-user-editor-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pv-users-section-head {
  padding: .1rem .1rem .85rem;
}

.pv-users-section-head .pv-eyebrow,
.pv-user-editor-head .pv-eyebrow {
  margin-bottom: .22rem;
  color: #8290a6;
  font-size: var(--pv-fs-9);
  font-weight: 1000;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pv-users-section-head h6,
.pv-user-editor-head h6 {
  margin: 0 0 .18rem;
  font-size: var(--pv-fs-15);
}

.pv-users-add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 2.15rem;
  padding-inline: .9rem;
  border-radius: .72rem;
  font-weight: 900;
}

.pv-users-toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 10.5rem 10.5rem;
  gap: .55rem;
  margin-bottom: .65rem;
}

.pv-users-search {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  margin: 0;
  padding: .28rem .55rem;
  border: 1px solid #d7e1ee;
  border-radius: .72rem;
  background: #fff;
  color: #64748b;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.pv-users-search i {
  flex: 0 0 auto;
  font-size: var(--pv-fs-11);
}

.pv-users-search input {
  min-width: 0;
  min-height: 1.65rem;
  padding: .12rem .1rem;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: var(--pv-fs-12);
}

.pv-users-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #dce5f0;
  border-radius: .82rem;
  background: #fff;
}

.pv-users-table {
  width: 100%;
  min-width: 48rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: var(--pv-fs-12);
}

.pv-users-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 2.35rem;
  padding: .45rem .65rem;
  border-bottom: 1px solid #dce5f0;
  background: #f7f9fc;
  color: #65748b;
  font-size: var(--pv-fs-9);
  font-weight: 1000;
  letter-spacing: .065em;
  text-transform: uppercase;
  vertical-align: middle;
}

.pv-users-table thead th:nth-child(1) { width: 24%; }
.pv-users-table thead th:nth-child(2) { width: 17%; }
.pv-users-table thead th:nth-child(3) { width: 16%; }
.pv-users-table thead th:nth-child(4) { width: 13%; }
.pv-users-table thead th:nth-child(5) { width: 24%; }
.pv-users-table thead th:nth-child(6) { width: 5.5rem; }

.pv-users-table thead button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.pv-users-table thead button:hover,
.pv-users-table thead button.is-active {
  color: var(--blue);
}

.pv-users-table thead button i {
  font-size: .58rem;
  opacity: .72;
}

.pv-users-table tbody td {
  height: 3.4rem;
  padding: .52rem .65rem;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  vertical-align: middle;
}

.pv-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.pv-users-table tbody tr:not(.is-deleted):hover td {
  background: #f8fbff;
}

.pv-users-table tbody tr.is-inactive td {
  background: #fbfcfe;
}

.pv-users-table tbody tr.is-deleted td {
  background: #fff8f8;
  color: #8b5960;
}

.pv-users-table tbody tr.is-deleted strong,
.pv-users-table tbody tr.is-deleted code,
.pv-users-table tbody tr.is-deleted .pv-user-permission-summary {
  opacity: .66;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.pv-users-table code {
  padding: .14rem .36rem;
  border: 1px solid #e2e8f0;
  border-radius: .4rem;
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--pv-fs-10);
}

.pv-users-name {
  min-width: 0;
}

.pv-users-name strong {
  display: block;
  overflow: hidden;
  color: #172033;
  font-size: var(--pv-fs-12);
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-users-name > span {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .22rem;
}

.pv-user-self,
.pv-user-change-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
  padding: .08rem .32rem;
  border-radius: 999px;
  font-size: .54rem;
  font-weight: 1000;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
}

.pv-user-self {
  background: #eef2ff;
  color: #4f46e5;
}

.pv-user-change-badge.is-new {
  background: #ecfdf5;
  color: #047857;
}

.pv-user-change-badge.is-modified {
  background: #eff6ff;
  color: #1d4ed8;
}

.pv-user-change-badge.is-deleted {
  background: #fff1f2;
  color: #be123c;
}

.pv-user-role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: .18rem .48rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  white-space: nowrap;
}

.pv-user-role-pill.is-admin {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.pv-user-role-pill.is-planner {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.pv-user-status {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  color: #475569;
  font-size: var(--pv-fs-10);
  font-weight: 850;
  white-space: nowrap;
}

.pv-user-status i {
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.12);
}

.pv-user-status.is-on i {
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34,160,107,.12);
}

.pv-user-permission-summary {
  display: block;
  overflow: hidden;
  color: #5d6b7f;
  font-size: var(--pv-fs-10);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-users-actions-head,
.pv-users-actions {
  text-align: right;
}

.pv-users-actions {
  white-space: nowrap;
}

.pv-user-action-btn {
  width: 1.85rem;
  height: 1.85rem;
  margin-left: .18rem;
  border: 1px solid #dbe4ef;
  border-radius: .52rem;
  background: #fff;
  color: #526277;
  font-size: var(--pv-fs-10);
}

.pv-user-action-btn:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.pv-user-action-btn.is-danger:hover {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #dc2626;
}

.pv-users-empty {
  margin: 1rem;
}

.pv-users-list-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: 2.2rem;
  padding: .45rem .15rem 0;
  color: #728197;
  font-size: var(--pv-fs-10);
  font-weight: 750;
}

.pv-users-draft-summary:not(:empty) {
  color: #2458d3;
}

/* Editor de usuario */
.pv-user-editor-head {
  padding: .05rem .1rem .72rem;
  border-bottom: 1px solid #e8edf4;
}

.pv-user-editor-head > div {
  flex: 1 1 auto;
}

.pv-user-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .08rem;
  padding: .35rem .5rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: #526277;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-user-back:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.pv-user-editor-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: .78rem .12rem .25rem;
}

.pv-user-editor-card {
  margin-bottom: .75rem;
  padding: .8rem .9rem;
  border: 1px solid #e1e8f1;
  border-radius: .85rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.025);
}

.pv-user-editor-card-head {
  display: flex;
  align-items: flex-start;
  gap: .62rem;
  margin-bottom: .72rem;
}

.pv-user-editor-card-head > i {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: .55rem;
  background: #eff6ff;
  color: #2563eb;
  font-size: var(--pv-fs-10);
}

.pv-user-editor-card-head strong {
  display: block;
  color: #1f2a3d;
  font-size: var(--pv-fs-12);
  font-weight: 1000;
}

.pv-user-editor-card-head small {
  display: block;
  margin-top: .1rem;
  color: #728197;
  font-size: var(--pv-fs-10);
  line-height: 1.3;
}

.pv-user-editor-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.pv-user-editor-fields label,
.pv-user-static-field {
  min-width: 0;
}
#pvCfgChangePassword{
	display: flex;
    gap: .38rem;
    justify-content: center;
    align-items: center;
}
.pv-user-editor-fields label > span:first-child,
.pv-user-static-field > span:first-child,
.pv-user-password-fields label > span:first-child {
  display: block;
  margin-bottom: .28rem;
  color: #64748b;
  font-size: var(--pv-fs-9);
  font-weight: 1000;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.pv-user-editor-fields .form-control,
.pv-user-password-fields .form-control {
  min-height: 2.1rem;
  border-color: #d9e2ed;
  border-radius: .62rem;
  font-size: var(--pv-fs-12);
}

.pv-user-static-field > strong {
  display: flex;
  align-items: center;
  min-height: 2.1rem;
  padding: .35rem .62rem;
  border: 1px solid #e5eaf1;
  border-radius: .62rem;
  background: #f8fafc;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--pv-fs-11);
}

.pv-field-help,
.pv-user-static-field small {
  display: block;
  margin-top: .25rem;
  color: #8290a3;
  font-size: var(--pv-fs-9);
  font-weight: 650;
  line-height: 1.25;
}

.pv-user-active-toggle {
  display: flex !important;
  align-items: center;
  min-height: 2.1rem;
  margin: 0;
  padding: .35rem .6rem;
  border: 1px solid #d9e2ed;
  border-radius: .62rem;
  background: #fff;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
}

.pv-user-active-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pv-user-active-toggle > span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #5a687b;
  font-size: var(--pv-fs-11);
  font-weight: 850;
}

.pv-user-active-toggle i {
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  background: #94a3b8;
}

.pv-user-active-toggle input:checked + span i {
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34,160,107,.12);
}

.pv-user-role-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.pv-user-role-card {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-height: 5rem;
  padding: .72rem;
  border: 1px solid #dce4ee;
  border-radius: .75rem;
  background: #fff;
  color: #334155;
  text-align: left;
}

.pv-user-role-card:hover {
  border-color: #b9c9dc;
  background: #fafcff;
}

.pv-user-role-card.is-selected {
  border-color: #7aa8ff;
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}

.pv-role-radio {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
  margin-top: .1rem;
  border: 1.5px solid #a9b5c5;
  border-radius: 50%;
  background: #fff;
}

.pv-user-role-card.is-selected .pv-role-radio {
  border-color: #2563eb;
}

.pv-role-radio i {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: transparent;
}

.pv-user-role-card.is-selected .pv-role-radio i {
  background: #2563eb;
}

.pv-user-role-card strong {
  display: block;
  color: #1f2937;
  font-size: var(--pv-fs-11);
  font-weight: 1000;
}

.pv-user-role-card small {
  display: block;
  margin-top: .24rem;
  color: #718096;
  font-size: var(--pv-fs-9);
  font-weight: 650;
  line-height: 1.35;
}

.pv-role-admin-note {
  display: none;
  align-items: center;
  gap: .5rem;
  margin: .65rem 0 0;
  padding: .55rem .65rem;
  border: 1px solid #bbf7d0;
  border-radius: .68rem;
  background: #f0fdf4;
  color: #166534;
  font-size: var(--pv-fs-10);
  font-weight: 800;
}

.pv-role-admin-note i {
  color: #16a34a;
}

.pv-user-perm-heading {
  margin-bottom: .55rem;
}

.pv-user-perm-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pv-user-perm-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.pv-user-perm-controls .pv-user-perm-toolbar {
  flex: 0 0 auto;
  margin: 0;
}

.pv-user-perm-controls .pv-user-perm-search {
  flex: 1 1 14rem;
  min-width: 10rem;
  margin: 0;
  padding: .25rem .5rem;
}

.pv-user-perm-scroll {
  max-height: 17.5rem;
  overflow: auto;
  border-radius: .72rem;
}

.pv-user-perm-table th,
.pv-user-perm-table td {
  padding: .42rem .55rem;
}

.pv-user-perm-table td:not(:first-child),
.pv-user-perm-table th:not(:first-child) {
  width: 6rem;
  text-align: center;
}

.pv-user-perm-check {
  position: relative;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  margin: 0;
  text-transform: none !important;
}

.pv-user-perm-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pv-user-perm-check > span {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border: 1px solid #c6d1df;
  border-radius: .34rem;
  background: #fff;
  color: transparent;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}

.pv-user-perm-check input:checked + span {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
}

.pv-user-perm-check i {
  font-size: .58rem;
}

.pv-user-perm-empty {
  margin-top: .5rem;
}

.pv-user-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.pv-user-password-fields[hidden],
.pv-user-password-closed[hidden] {
  display: none !important;
}

.pv-user-password-fields > small {
  grid-column: 1 / -1;
  color: #8290a3;
  font-size: var(--pv-fs-9);
  font-weight: 650;
}

.pv-user-editor-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .1rem .05rem;
  border-top: 1px solid #e8edf4;
}

.pv-user-editor-footer > div:last-child {
  display: flex;
  gap: .45rem;
}

.pv-user-editor-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 2rem;
  border-radius: .62rem;
  font-weight: 850;
}

@media (max-width: 1040px) {
  .pv-users-toolbar {
    grid-template-columns: minmax(12rem, 1fr) 9rem 9rem;
  }
  .pv-user-editor-fields,
  .pv-user-role-cards {
    grid-template-columns: 1fr;
  }
  .pv-user-role-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .pv-users-toolbar {
    grid-template-columns: 1fr;
  }
  .pv-users-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .pv-users-add {
    align-self: flex-start;
  }
  .pv-user-perm-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .pv-user-perm-controls .pv-user-perm-toolbar,
  .pv-user-perm-controls .pv-user-perm-search {
    width: 100%;
  }
  .pv-user-password-fields {
    grid-template-columns: 1fr;
  }
}

/* --- Mensajería multiusuario --- */
.pv-message-modal .modal-content {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pv-message-modal textarea {
  resize: vertical;
  min-height: 7rem;
}

/* 2026-07-09 - Mensajería persistente por usuario */
.pv-notice-box-actions .pv-toolbtn.is-active {
  background: #eaf1ff;
  border-color: #7aa7ff;
  color: #1d4ed8;
}

.pv-notice-delete-btn {
  border: 1px solid #fecaca;
  border-radius: 999rem;
  background: #fff;
  color: #b91c1c;
  padding: .1rem .45rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  cursor: pointer;
  line-height: 1.15;
}

.pv-notice-delete-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.pv-notice-item.is-sent {
  border-left-color: #64748b;
  background: #f8fafc;
}

.pv-msg-context {
  margin-bottom: .75rem;
  padding: .55rem .7rem;
  border: 1px solid #dbe7fb;
  border-radius: .75rem;
  background: #f8fbff;
  color: #475569;
  font-size: var(--pv-fs-12);
  font-weight: 700;
}

.pv-toast-item .pv-toast-read-btn {
  width: auto;
  min-width: 0;
  height: 1.35rem;
  padding: 0 .55rem;
  border-radius: 999rem;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  white-space: nowrap;
}

.pv-toast-item .pv-toast-read-btn:hover {
  background: rgba(255,255,255,.32);
}


/* 2026-07-09 - Revisión visual del centro de avisos */
.pv-notice-toolbar {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: .75rem 1rem;
  align-items: center;
}

.pv-notice-toolbar-right {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
}

.pv-notice-segmented,
.pv-notice-commandbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.pv-notice-segmented {
  overflow: hidden;
  border: 1px solid #cfdced;
  border-radius: .75rem;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}

.pv-notice-tab {
  border: 0;
  border-right: 1px solid #dbe5f2;
  background: transparent;
  color: #516078;
  padding: .38rem .62rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--pv-fs-11);
  font-weight: 900;
  white-space: nowrap;
}

.pv-notice-tab:last-child {
  border-right: 0;
}

.pv-notice-tab:hover {
  background: #eef4ff;
  color: #2458d3;
}

.pv-notice-tab.is-active {
  background: #2458d3;
  color: #fff;
  box-shadow: 0 .45rem .9rem rgba(37,88,211,.20);
}

.pv-notice-commandbar {
  gap: .4rem;
  flex-wrap: wrap;
}

.pv-notice-command {
  border: 1px solid #cfdbeb;
  border-radius: .7rem;
  background: #fff;
  color: #334155;
  min-height: 2rem;
  padding: .36rem .62rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--pv-fs-11);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 .35rem .7rem rgba(15,23,42,.05);
}

.pv-notice-command:hover {
  background: #f8fbff;
  border-color: #aebfe0;
  color: #1e3a8a;
}

.pv-notice-command-primary {
  border-color: #b8caf6;
  background: #eff5ff;
  color: #2458d3;
}

.pv-notice-command-primary:hover {
  background: #2458d3;
  border-color: #2458d3;
  color: #fff;
}

.pv-notice-command-danger {
  border-color: #fecdd3;
  background: #fff7f8;
  color: #be123c;
}

.pv-notice-command-danger:hover {
  background: #be123c;
  border-color: #be123c;
  color: #fff;
}

.pv-notice-command-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.pv-notice-command-warning:hover {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.pv-notice-command-warning.is-loading {
  opacity: .72;
  cursor: progress;
}

.pv-notice-item.is-sent {
  border-color: #cbd5e1;
  background: linear-gradient(180deg,#f8fafc,#fff);
}

.pv-notice-item.is-received {
  background: #fff;
}

.pv-notice-titleline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.pv-notice-item-head time {
  color: var(--muted);
  font-size: var(--pv-fs-10);
  font-weight: 800;
  white-space: nowrap;
}

.pv-notice-direction {
  border-radius: 999rem;
  padding: .12rem .45rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: var(--pv-fs-9);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.pv-notice-direction.is-sent {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #dbe3ee;
}

.pv-notice-direction.is-received {
  background: #eaf1ff;
  color: #1d4ed8;
  border: 1px solid #c7d7f7;
}

.pv-notice-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: .35rem;
}

.pv-notice-tags,
.pv-notice-row-actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.pv-notice-level,
.pv-notice-state {
  border-radius: 999rem;
  padding: .12rem .5rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  line-height: 1.15;
  cursor: default;
}

.pv-notice-level-info {
  background: #eaf1ff;
  color: #1d4ed8;
}

.pv-notice-level-success {
  background: #ecfdf5;
  color: #047857;
}

.pv-notice-level-warning {
  background: #fff7ed;
  color: #b45309;
}

.pv-notice-level-danger {
  background: #fff1f2;
  color: #be123c;
}

.pv-notice-state.is-unread {
  background: #dbeafe;
  color: #1e40af;
}

.pv-notice-state.is-read {
  background: #f1f5f9;
  color: #64748b;
}

.pv-notice-action-btn {
  border: 1px solid #cbdaf3;
  border-radius: .6rem;
  background: #fff;
  color: #2458d3;
  padding: .22rem .48rem;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
}

.pv-notice-action-btn:hover {
  background: #2458d3;
  border-color: #2458d3;
  color: #fff;
}

.pv-notice-action-danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.pv-notice-action-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

@media (max-width: 860px) {
  .pv-notice-toolbar {
    grid-template-columns: 1fr;
  }
  .pv-notice-toolbar-right {
    align-items: stretch;
  }
  .pv-notice-segmented,
  .pv-notice-commandbar {
    justify-content: flex-start;
  }
}

/* 2026-07-09 - Ajustes de hilo y toast de mensajería */
.pv-toast-item {
  position: relative;
}

.pv-toast-item.has-read-action {
  grid-template-columns: auto 1fr;
  padding-right: 2.65rem;
}

.pv-toast-item.has-read-action > button[aria-label="Cerrar aviso"] {
  position: absolute;
  top: .55rem;
  right: .55rem;
}

.pv-toast-item.has-read-action .pv-toast-read-btn {
  grid-column: 2;
  justify-self: flex-start;
  margin-top: .15rem;
}

.pv-toast-item .pv-toast-read-btn i {
  margin-right: .3rem;
}

.pv-notice-message-meta {
  margin-top: .3rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  color: #64748b;
  font-size: var(--pv-fs-11);
  font-weight: 800;
}

.pv-notice-thread {
  border: 1px solid #dbeafe;
  border-radius: 999rem;
  background: #eff6ff;
  color: #1d4ed8;
  padding: .1rem .42rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-notice-subject {
  margin-top: .22rem;
  margin-bottom: .18rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  color: #1f2937;
  font-size: var(--pv-fs-12);
  line-height: 1.25;
}

.pv-notice-subject.is-empty {
  color: #94a3b8;
  font-style: italic;
}

.pv-message-modal label.is-readonly select {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}


/* Avisos remotos: detalle por clic y resumen operativo. */
.pv-remote-detail-popover {
  width: min(31rem, calc(100vw - 1rem));
  max-height: min(34rem, calc(100vh - 1rem));
  padding: .85rem;
}

.pv-remote-detail-head {
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: .55rem;
}

.pv-remote-detail-head > div {
  min-width: 0;
}

.pv-remote-detail-head strong {
  display: block;
  font-size: var(--pv-fs-14);
  line-height: 1.2;
}

.pv-remote-detail-head small {
  display: block;
  margin-top: .12rem;
}

.pv-remote-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  padding: .55rem .65rem;
  margin-top: .65rem !important;
}

.pv-remote-change-list {
  display: grid;
  gap: .55rem;
  margin-top: .65rem !important;
  padding-top: .65rem !important;
}

.pv-remote-detail-popover .pv-remote-change-item {
  display: block;
  padding: .6rem .65rem;
  border: 1px solid #dbeafe;
  border-radius: .8rem;
  background: #fff;
}

.pv-remote-change-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
}

.pv-remote-change-title span {
  font-weight: 950;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.pv-remote-change-title em {
  flex: 0 0 auto;
  padding: .12rem .42rem;
  border-radius: 999rem;
  background: #eef2ff;
  color: #1d4ed8;
  font-style: normal;
  font-weight: 900;
  font-size: var(--pv-fs-9);
  white-space: nowrap;
}

.pv-remote-change-subject {
  margin-top: .18rem;
  color: #475569;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pv-remote-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem .75rem;
  margin-top: .5rem;
}

.pv-remote-change-grid span {
  display: flex;
  flex-direction: column;
  gap: .05rem;
  min-width: 0;
}

.pv-remote-change-grid b {
  color: #64748b;
  font-size: var(--pv-fs-9);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pv-remote-change-grid i {
  color: #0f172a;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pv-remote-color {
  display: inline-flex;
  align-items: center;
  flex-direction: row !important;
  gap: .35rem;
}

.pv-remote-color u {
  width: .8rem;
  height: .8rem;
  display: inline-block;
  border-radius: .2rem;
  border: 1px solid rgba(15, 23, 42, .18);
  text-decoration: none;
}

@media (max-width: 700px) {
  .pv-remote-change-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-09 - Avisos de cambios remotos: resumen, máquina destacada y popup draggable. */
.pv-machine-remote-changed .pv-machine {
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%) !important;
  box-shadow: inset .28rem 0 0 #f59e0b, 0 0 0 1px rgba(245, 158, 11, .35), 0 12px 24px rgba(146, 64, 14, .08);
}

.pv-machine-remote-changed .pv-machine-head::after {
  content: "Cambios";
  margin-left: .35rem;
  padding: .08rem .34rem;
  border-radius: 999rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  font-size: var(--pv-fs-8);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pv-machine-remote-changed .pv-remote-chip {
  width: 1.28rem;
  height: 1.28rem;
  background: #f59e0b;
  border-color: #b45309;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
  position: relative;
}

.pv-machine-remote-changed .pv-remote-chip:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.pv-remote-chip b {
  position: absolute;
  top: -.55rem;
  right: -.5rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 .2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999rem;
  background: #b91c1c;
  color: #fff;
  border: 1px solid #fff;
  font-size: var(--pv-fs-8);
  font-weight: 950;
  line-height: 1;
}

.pv-notice-remote-summary {
  margin-top: .45rem;
  padding: .5rem .6rem;
  border: 1px solid #fde68a;
  border-radius: .7rem;
  background: #fffbeb;
  color: #713f12;
  font-size: var(--pv-fs-11);
  font-weight: 750;
}

.pv-notice-remote-summary > div + div {
  margin-top: .18rem;
}

.pv-notice-remote-summary strong {
  font-weight: 950;
}

.pv-notice-remote-changes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .35rem !important;
}

.pv-notice-remote-changes span,
.pv-notice-remote-changes em {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border-radius: 999rem;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
  padding: .14rem .42rem;
  font-style: normal;
  font-size: var(--pv-fs-10);
  font-weight: 850;
}

.pv-notice-remote-changes span b {
  color: #9a3412;
  font-weight: 950;
}

.pv-notice-remote-changes span i,
.pv-notice-remote-changes span small {
  font-style: normal;
  font-weight: 800;
}

.pv-remote-detail-popover {
  width: min(36rem, calc(100vw - 1rem));
  max-height: min(36rem, calc(100vh - 1rem));
  padding: 0;
  overflow: hidden;
}

.pv-remote-detail-popover.is-open {
  display: flex;
  flex-direction: column;
}

.pv-remote-detail-head {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: .75rem;
  margin: 0;
  padding: .8rem .9rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  cursor: move;
  user-select: none;
}

.pv-remote-detail-head button {
  cursor: pointer;
}

.pv-remote-detail-body {
  min-height: 0;
  overflow: auto;
  padding: .75rem .9rem .9rem;
}

.pv-remote-detail-body .pv-remote-summary {
  margin-top: 0 !important;
  margin-bottom: .7rem !important;
}

.pv-remote-commit-section {
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  background: #fff;
  overflow: hidden;
}

.pv-remote-commit-section + .pv-remote-commit-section {
  margin-top: .7rem;
}

.pv-remote-commit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pv-remote-commit-head strong {
  display: block;
  color: #0f172a;
  font-size: var(--pv-fs-12);
  font-weight: 950;
}

.pv-remote-commit-head small {
  display: block;
  margin-top: .08rem;
  color: #64748b;
  font-weight: 800;
}

.pv-remote-commit-head span {
  flex: 0 0 auto;
  border-radius: 999rem;
  background: #eef2ff;
  color: #1d4ed8;
  padding: .12rem .45rem;
  font-size: var(--pv-fs-9);
  font-weight: 950;
}

.pv-remote-commit-section .pv-remote-change-list {
  border-top: 0;
  margin: 0 !important;
  padding: .55rem !important;
}

@media (max-width: 700px) {
  .pv-remote-detail-popover {
    width: min(31rem, calc(100vw - 1rem));
  }
}

/* 2026-07-09 - Ajuste avisos remotos: drag estable y resumen no repetitivo. */
.pv-remote-detail-drag {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999rem;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  margin-top: .05rem;
}

.pv-remote-detail-head.ui-draggable-dragging,
.pv-remote-detail-popover.ui-draggable-dragging .pv-remote-detail-head {
  cursor: grabbing;
}

.pv-notice-remote-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.pv-notice-remote-headline strong {
  color: #713f12;
  overflow-wrap: anywhere;
}

.pv-notice-remote-headline span {
  flex: 0 0 auto;
  padding: .08rem .38rem;
  border-radius: 999rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: var(--pv-fs-9);
  font-weight: 950;
  white-space: nowrap;
}

.pv-notice-remote-summary > small {
  display: block;
  margin-top: .35rem;
  color: #92400e;
  font-weight: 800;
}

/* 2026-07-09 - Toast remoto legible y coherencia de detalle. */
.pv-toast-item.pv-toast-remote {
  gap: .55rem .65rem;
  align-items: flex-start;
}

.pv-toast-item.pv-toast-remote > span {
  display: block;
  width: 100%;
}

.pv-toast-remote-body {
  display: grid;
  gap: .22rem;
  min-width: 0;
}

.pv-toast-remote-body strong {
  display: block;
  color: #fff;
  font-size: var(--pv-fs-13);
  font-weight: 950;
  line-height: 1.2;
}

.pv-toast-remote-body small {
  display: block;
  color: rgba(255,255,255,.88);
  font-size: var(--pv-fs-11);
  font-weight: 850;
  line-height: 1.25;
}

.pv-toast-remote-body ul {
  list-style: none;
  margin: .22rem 0 0;
  padding: .35rem 0 0;
  display: grid;
  gap: .18rem;
  border-top: 1px solid rgba(255,255,255,.22);
}

.pv-toast-remote-body li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .35rem;
  align-items: baseline;
  min-width: 0;
  font-size: var(--pv-fs-11);
  line-height: 1.25;
}

.pv-toast-remote-body li b {
  color: #fff;
  font-weight: 950;
  white-space: nowrap;
}

.pv-toast-remote-body li span {
  color: rgba(255,255,255,.9);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 2026-07-09 - Resolución de cambios remotos por máquina. */
.pv-notice-action-btn.pv-notice-action-primary {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.pv-notice-action-btn.pv-notice-action-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.pv-toast-item .pv-toast-sync-btn {
  grid-column: 2 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  margin-top: .28rem;
  border: 0;
  border-radius: 999rem;
  background: rgba(255,255,255,.18);
  color: #fff;
  padding: .22rem .55rem;
  font-size: var(--pv-fs-10);
  font-weight: 900;
}

.pv-toast-item .pv-toast-sync-btn:hover {
  background: rgba(255,255,255,.28);
}

.pv-toast-item.pv-toast-remote .pv-toast-read-btn {
  margin-top: .18rem;
}

.pv-remote-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fffdf7;
}

.pv-remote-detail-actions button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: .55rem;
  border: 1px solid #cbd5e1;
  padding: .38rem .65rem;
  font-size: var(--pv-fs-11);
  font-weight: 900;
}

.pv-remote-action-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb !important;
}

.pv-remote-action-secondary {
  background: #fff;
  color: #0f172a;
}

.pv-remote-detail-actions small {
  flex: 1 1 100%;
  color: #64748b;
  font-weight: 750;
}

.pv-remote-resolve-modal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.pv-remote-resolve-body {
  display: grid;
  gap: .75rem;
}

.pv-remote-resolve-loading,
.pv-remote-resolve-error,
.pv-remote-resolve-empty,
.pv-remote-resolve-intro {
  border: 1px solid #dbeafe;
  border-radius: .85rem;
  background: #eff6ff;
  color: #1e3a8a;
  padding: .75rem .9rem;
  font-weight: 850;
}

.pv-remote-resolve-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.pv-remote-resolve-empty span,
.pv-remote-resolve-intro span {
  display: block;
  margin-top: .15rem;
  color: #475569;
  font-weight: 750;
}

.pv-remote-resolve-list {
  display: grid;
  gap: .7rem;
}

.pv-remote-resolve-item {
  border: 1px solid #e2e8f0;
  border-radius: .9rem;
  background: #fff;
  padding: .7rem;
}

.pv-remote-resolve-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .55rem;
}

.pv-remote-resolve-item-head strong {
  color: #0f172a;
  font-size: var(--pv-fs-14);
  font-weight: 950;
}

.pv-remote-resolve-item-head span {
  border-radius: 999rem;
  background: #eef2ff;
  color: #1d4ed8;
  padding: .12rem .48rem;
  font-size: var(--pv-fs-10);
  font-weight: 950;
  white-space: nowrap;
}

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

.pv-conflict-version {
  border: 1px solid #dbeafe;
  border-radius: .7rem;
  background: #f8fbff;
  padding: .55rem .6rem;
  min-width: 0;
}

.pv-conflict-version.is-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.pv-conflict-version strong,
.pv-conflict-version b,
.pv-conflict-version span,
.pv-conflict-version small {
  display: block;
}

.pv-conflict-version strong {
  color: #64748b;
  font-size: var(--pv-fs-10);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 950;
}

.pv-conflict-version b {
  margin-top: .2rem;
  color: #0f172a;
  font-size: var(--pv-fs-12);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.pv-conflict-version span,
.pv-conflict-version small {
  margin-top: .15rem;
  color: #334155;
  font-size: var(--pv-fs-11);
  font-weight: 750;
}

.pv-conflict-color {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: .22rem;
  border: 1px solid rgba(15, 23, 42, .18);
  vertical-align: -0.12rem;
  margin-right: .25rem;
}

.pv-conflict-choice {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-top: .6rem;
}

.pv-conflict-choice label {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border: 1px solid #e2e8f0;
  border-radius: 999rem;
  background: #fff;
  padding: .22rem .55rem;
  color: #0f172a;
  font-size: var(--pv-fs-11);
  font-weight: 850;
}

.pv-conflict-choice label.is-disabled {
  opacity: .45;
}

.pv-conflict-before {
  margin-top: .45rem;
  color: #64748b;
  font-size: var(--pv-fs-11);
  font-weight: 750;
}

.pv-remote-resolve-footer {
  gap: .5rem;
}

@media (max-width: 760px) {
  .pv-conflict-versions {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-09 - Ajuste visual de acciones en toast remoto. */
.pv-toast-item.pv-toast-remote .pv-toast-sync-btn {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 1.65rem;
  padding: .32rem .72rem;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.16);
  border-radius: .55rem;
  white-space: nowrap;
  line-height: 1.1;
}

.pv-toast-item.pv-toast-remote .pv-toast-sync-btn:hover {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.42);
}


/* 2026-07-09 - Autor visible en avisos de cambios remotos. */
.pv-notice-remote-author {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .65rem;
  margin-top: .32rem !important;
  color: #854d0e;
  font-size: var(--pv-fs-10);
  font-weight: 800;
}

.pv-notice-remote-author span {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
}

.pv-notice-remote-author b {
  color: #713f12;
  font-weight: 950;
}

/* v4.6 — acción sutil para actualizar máquinas con cambios remotos desde el panel principal */
.pv-machine-col {
  justify-content: space-between;
  gap: .45rem;
  padding-right: .65rem;
}

.pv-machine-col-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-board-remote-update {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  min-width: 2rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid #f2bd47;
  background: #fff7df;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .22rem;
  padding: 0 .42rem;
  font-size: var(--pv-fs-10);
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(146,64,14,.08);
}

.pv-board-remote-update[hidden] {
  display: none !important;
}

.pv-board-remote-update:hover {
  background: #ffefc2;
  border-color: #e59b11;
  color: #78350f;
}

.pv-board-remote-update:focus-visible {
  outline: 2px solid #2458d3;
  outline-offset: 2px;
}

.pv-board-remote-update.is-loading i {
  animation: pvSpin .85s linear infinite;
}

.pv-board-remote-update-count {
  font-size: var(--pv-fs-9);
  min-width: .7rem;
}

@keyframes pvSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Capa profesional: menús superiores, menú contextual y selección múltiple */
.pv-top-menu,
.pv-context-menu {
  position: fixed;
  z-index: 2100;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 16px));
  padding: .42rem;
  border: 1px solid rgba(16, 24, 40, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 48px rgba(15,23,42,.20), 0 3px 12px rgba(15,23,42,.10);
  backdrop-filter: blur(12px);
}

.pv-top-menu[hidden],
.pv-context-menu[hidden],
.pv-selection-box[hidden] {
  display: none !important;
}

.pv-menu-title {
  padding: .42rem .58rem .5rem;
  color: #475467;
  font-size: var(--pv-menu-title-font-size);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pv-menu-section {
  padding: .54rem .58rem .22rem;
  color: #667085;
  font-size: var(--pv-menu-section-font-size);
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pv-menu-section:first-of-type {
  padding-top: .22rem;
}

.pv-menu-submenu-wrap {
  position: relative;
}

.pv-menu-submenu {
  position: absolute;
  z-index: 2;
  left: calc(100% - .16rem);
  top: 0;
  min-width: 250px;
  max-width: min(360px, calc(100vw - 16px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  padding: .42rem;
  border: 1px solid rgba(16, 24, 40, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 18px 48px rgba(15,23,42,.20), 0 3px 12px rgba(15,23,42,.10);
  backdrop-filter: blur(12px);
}

.pv-menu-submenu[hidden] {
  display: none !important;
}

.pv-menu-submenu.is-left {
  right: calc(100% - .16rem);
  left: auto;
}

.pv-menu-parent[aria-expanded="true"] {
  background: #eef4ff;
  color: #173b88;
}

.pv-menu-chevron {
  color: #98a2b3;
  font-size: var(--pv-fs-9);
}

.pv-menu-submenu-wrap.is-disabled > .pv-menu-submenu {
  display: none !important;
}

.pv-menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: .48rem;
  padding: .52rem .58rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #172033;
  font-size: var(--pv-menu-font-size);
  font-weight: 750;
  text-align: left;
}

.pv-menu-item:hover,
.pv-menu-item:focus-visible {
  background: #eef4ff;
  color: #173b88;
  outline: none;
}

.pv-menu-item.is-disabled,
.pv-menu-item:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  opacity: .72;
}

.pv-menu-item kbd {
  padding: .08rem .28rem;
  border-radius: 6px;
  background: #f2f4f7;
  color: #667085;
  font-size: var(--pv-menu-section-font-size);
  font-weight: 800;
  box-shadow: inset 0 -1px 0 rgba(16,24,40,.12);
}

.pv-menu-check {
  width: 18px;
  color: #1769aa;
  text-align: center;
}

.pv-menu-sep {
  height: 1px;
  margin: .32rem .38rem;
  background: #eaecf0;
}

.pv-selection-tool {
  position: relative;
}

.pv-selection-tool.active {
  border-color: #2458d3;
  background: #eaf1ff;
  color: #173b88;
  box-shadow: 0 0 0 3px rgba(36,88,211,.12);
}

.pv-selection-tool[data-count]:not([data-count=""]):after {
  content: attr(data-count);
  position: absolute;
  top: -.42rem;
  right: -.38rem;
  min-width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #2458d3;
  color: #fff;
  font-size: var(--pv-fs-9);
  font-weight: 950;
  line-height: 1;
}

.pv-selection-active .pv-viewport {
  cursor: crosshair;
}

.pv-selection-box {
  position: absolute;
  z-index: 1500;
  pointer-events: none;
  border: 1px solid rgba(36,88,211,.78);
  border-radius: 10px;
  background: rgba(36,88,211,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 24px rgba(36,88,211,.13);
}

.pv-task.is-selected {
  outline: 3px solid var(--pv-task-selection-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--pv-task-selection-color) 18%, transparent), var(--pv-task-shadow, 0 8px 16px rgba(15,23,42,.12));
}

.pv-task.is-selected:after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px dashed var(--pv-task-selection-color);
  border-radius: inherit;
  pointer-events: none;
}

.pv-task.is-grouped:before {
  content: attr(data-group-id);
  position: absolute;
  top: -8px;
  left: -8px;
  z-index: 2;
  min-width: 22px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .28rem;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: var(--pv-fs-9);
  font-weight: 950;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px rgba(16,24,40,.22);
}

.pv-menu-strip button[aria-expanded="true"] {
  background: rgba(36,88,211,.10);
  color: #173b88;
}

@media (max-width: 760px) {
  .pv-top-menu,
  .pv-context-menu {
    min-width: min(310px, calc(100vw - 16px));
  }

  .pv-menu-item {
    grid-template-columns: 16px 20px minmax(0, 1fr);
  }

  .pv-menu-item kbd {
    display: none;
  }
}

/* v4.5 — ajustes de interfaz profesional */
.pv-toolbar-right #pvSelectionTool {
  margin-left: .15rem;
}

.pv-selection-action {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  border-color: #c9d7f2;
  background: linear-gradient(180deg,#ffffff,#f4f7ff);
  color: #1d335c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 10px rgba(16,24,40,.05);
}

.pv-selection-action i {
  font-size: var(--pv-fs-12);
}

.pv-selection-action:hover {
  background: #edf4ff;
  border-color: #a9c0f3;
  color: #173b88;
}

.pv-selection-action.active {
  border-color: #2458d3;
  background: #2458d3;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(36,88,211,.14), 0 8px 18px rgba(36,88,211,.18);
}

.pv-selection-action.active:hover {
  background: #1f4cb5;
  color: #fff;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    background: #fff !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pv-rail,
  .pv-left,
  .pv-right,
  .pv-desktopbar,
  .pv-statusbar,
  .pv-toast,
  .pv-context-menu,
  .pv-top-menu,
  .pv-navigator,
  .pv-hscroll,
  .pv-selection-box,
  .pv-drop-preview,
  .pv-drag-line,
  .pv-predict-line,
  .pv-now-line,
  .ui-resizable-handle {
    display: none !important;
  }

  .pv-app,
  .pv-main,
  .pv-board,
  .pv-viewport,
  #pvRows {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .pv-board {
    margin: 0 !important;
    border: 0 !important;
  }

  .pv-board-head {
    position: static !important;
    top: auto !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pv-time-clip,
  .pv-lane {
    overflow: visible !important;
  }

  #pvDayHeader,
  #pvTimeHeader,
  .pv-lane {
    transform: none !important;
  }

  .pv-row,
  .pv-task {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* v4.6 — ajustes impresión, selección y representación temporal precisa */
.pv-print-layer {
  display: none;
}

.pv-toolbar-right #pvSelectionTool {
  position: relative;
  margin-left: .2rem;
  border-color: #cbd7e6;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #23314a;
  font-weight: 900;
  letter-spacing: .01em;
  gap: .38rem;
}

.pv-toolbar-right #pvSelectionTool i {
  color: #2458d3;
  font-size: var(--pv-fs-12);
}

.pv-toolbar-right #pvSelectionTool:hover {
  border-color: #9fb4d4;
  background: #f1f6ff;
}

.pv-toolbar-right #pvSelectionTool.active {
  border-color: #2458d3;
  background: linear-gradient(180deg, #2458d3, #1f4cb5);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(36, 88, 211, .14), 0 8px 18px rgba(36, 88, 211, .18);
}

.pv-toolbar-right #pvSelectionTool.active i {
  color: #fff;
}

.pv-toolbar-right #pvSelectionTool[data-count]:not([data-count=""])::after {
  content: attr(data-count);
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: var(--pv-fs-9);
  font-weight: 950;
  box-shadow: 0 3px 9px rgba(16,24,40,.25);
}

.pv-selection-action {
  min-width: 0;
}

.pv-task,
.pv-task.priority-alta,
.pv-task.priority-media,
.pv-task.priority-baja,
.pv-task.has-custom-color {
  border-left-width: 1px !important;
}

.pv-task {
  padding: 7px 9px 11px;
}

.pv-task-duration-strip {
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  border-radius: 0 0 10px 10px;
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.pv-task-duration-mr,
.pv-task:not(.has-custom-color) .pv-task-duration-mr {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.62) 0, rgba(255,255,255,.62) 3px, transparent 3px, transparent 6px),
    #174ea6;
}

.pv-task-duration-run,
.pv-task:not(.has-custom-color) .pv-task-duration-run {
  background: #6ea8ff;
}

.pv-task.has-custom-color .pv-task-duration-strip {
  background: rgba(255,255,255,.34);
}

.pv-task.has-custom-color .pv-task-duration-mr {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.68) 0, rgba(255,255,255,.68) 3px, transparent 3px, transparent 6px),
    #174ea6;
}

.pv-task.has-custom-color .pv-task-duration-run {
  background: #6ea8ff;
}

/* 2026-07-10: la línea de carga externa de la máquina queda sustituida por
   la representación preparación/tirada dentro de cada tarea. */
.pv-lane > .pv-load {
  display: none;
}

.pv-task > .pv-load.pv-task-duration-strip {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: -1px;
  width: auto;
  height: 8px;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  pointer-events: none;
}

.pv-task > .pv-load.pv-task-duration-strip i {
  display: block;
  min-width: 0;
  height: 100%;
}

.pv-task > .pv-load.pv-task-duration-strip .pv-task-duration-mr,
.pv-task:not(.has-custom-color) > .pv-load.pv-task-duration-strip .pv-task-duration-mr {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.62) 0, rgba(255,255,255,.62) 3px, transparent 3px, transparent 6px),
    #174ea6;
}

.pv-task > .pv-load.pv-task-duration-strip .pv-task-duration-run,
.pv-task:not(.has-custom-color) > .pv-load.pv-task-duration-strip .pv-task-duration-run {
  background: #6ea8ff;
}

.pv-task.has-custom-color > .pv-load.pv-task-duration-strip .pv-task-duration-mr {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.68) 0, rgba(255,255,255,.68) 3px, transparent 3px, transparent 6px),
    #174ea6;
}

.pv-task.has-custom-color > .pv-load.pv-task-duration-strip .pv-task-duration-run {
  background: #6ea8ff;
}

/* 2026-07-10: línea de ocupación temporal de máquina independiente de la barra interna de tarea. */
.pv-lane-occupancy {
  position: absolute;
  top: 6px;
  height: 5px;
  border-radius: 999px;
  background: rgba(36,88,211,.16);
  box-shadow: inset 0 0 0 1px rgba(36,88,211,.08);
  pointer-events: none;
  z-index: 1;
}

.pv-lane-occupancy::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: rgba(255,255,255,.28);
}

.pv-task > .pv-load.pv-task-duration-strip i,
.pv-task-duration-strip i {
  flex: 0 0 auto;
  max-width: 100%;
}

.pv-task.ui-resizable-resizing > .pv-load.pv-task-duration-strip {
  transition: none;
}

.pv-task.ui-resizable-resizing > .pv-load.pv-task-duration-strip i {
  transition: none;
}

/* 2026-07-10: limitar altura del listado de tareas afectadas en resolución de conflictos. */
.pv-conflict-modal .modal-content {
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.pv-conflict-modal .modal-body,
.pv-conflict-body {
  min-height: 0;
}

.pv-conflict-list-pro {
  max-height: min(220px, 24vh);
  overflow: auto;
  padding-right: 4px;
}

.pv-conflict-list-pro::-webkit-scrollbar {
  width: 8px;
}

.pv-conflict-list-pro::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, .32);
}

/* v4.6 — compactación de controles de cola e impresión a una página */
.pv-backlog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "sort limit"
    "counter counter";
  align-items: center;
  gap: 7px 8px;
  padding: 8px 9px;
}

.pv-backlog-sort {
  grid-area: sort;
  grid-template-columns: auto minmax(104px, 1fr) 32px;
  gap: 7px;
  min-width: 0;
}

.pv-backlog-limit {
  grid-area: limit;
  grid-template-columns: auto minmax(64px, 76px) auto;
  gap: 6px;
  margin-top: 0;
  justify-self: end;
}
#pvPendingLimit{
	width: 5.2rem;
}
.pv-backlog-counter {
  grid-area: counter;
  margin-top: 0;
}

.pv-backlog-sort label,
.pv-backlog-limit label,
.pv-backlog-limit span {
  font-size: var(--pv-fs-10);
  letter-spacing: .105em;
  white-space: nowrap;
}

.pv-backlog-sort .form-select,
.pv-backlog-limit .form-select {
  min-height: 30px;
  padding-top: .22rem;
  padding-bottom: .22rem;
}

@media (max-width: 430px) {
  .pv-backlog-controls {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sort"
      "limit"
      "counter";
  }

  .pv-backlog-limit {
    justify-self: start;
  }
}


/* v4.7 — cierre coherente de menús, guía de resize y tooltip profesional de tareas */
.pv-drag-line.is-resize-guide {
  z-index: 1600;
  border-left: 1px solid rgba(36, 88, 211, .52);
}

.pv-drag-line.is-resize-guide.is-at-limit {
  border-left-color: rgba(217, 119, 6, .62);
}

.pv-drag-line.is-resize-guide span {
  display: block !important;
  top: 8px;
  left: 8px;
  max-width: min(220px, calc(100vw - 32px));
  padding: 4px 8px;
  border: 1px solid rgba(36, 88, 211, .18);
  border-radius: 999px;
  background: rgba(23, 32, 51, .92);
  color: #fff;
  font-size: var(--pv-fs-10);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .01em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.pv-drag-line.is-resize-guide.is-at-limit span {
  border-color: rgba(217, 119, 6, .28);
  background: rgba(138, 75, 8, .92);
}

.pv-drag-line.is-resize-guide.is-label-left span {
  left: auto;
  right: 8px;
}

.pv-task-tooltip {
  position: absolute;
  z-index: 2600;
  width: min(440px, calc(100vw - 20px));
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .985);
  color: #172033;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22), 0 4px 14px rgba(15, 23, 42, .10);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.pv-task-tooltip[hidden] {
  display: none !important;
}

.pv-task-tooltip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e7edf5;
}

.pv-task-tooltip-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-task-tooltip-title strong {
  overflow: hidden;
  color: #101828;
  font-size: var(--pv-fs-13);
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-task-tooltip-title span {
  color: #667085;
  font-size: var(--pv-fs-9);
  font-weight: 800;
  letter-spacing: .04em;
}

.pv-task-tooltip-badges {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.pv-task-tooltip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  background: #f5f8fc;
  color: #475467;
  font-size: var(--pv-fs-9);
  font-weight: 900;
  white-space: nowrap;
}

.pv-task-tooltip-badge.is-alta {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.pv-task-tooltip-badge.is-baja {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

.pv-task-tooltip-badge.is-locked {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #344054;
}

.pv-task-tooltip-badge.is-readonly {
  border-color: #d6bbfb;
  background: #f4f3ff;
  color: #5925dc;
}

.pv-task-tooltip-product {
  margin: 6px 0 7px;
  overflow: hidden;
  color: #344054;
  font-size: var(--pv-fs-11);
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-task-tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}

.pv-task-tooltip-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 5px;
}

.pv-task-tooltip-grid > div.is-wide {
  grid-column: 1 / -1;
}

.pv-task-tooltip-grid span,
.pv-task-tooltip-duration span {
  color: #7a8699;
  font-size: var(--pv-fs-9);
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.pv-task-tooltip-grid b {
  overflow: hidden;
  color: #263247;
  font-size: var(--pv-fs-10);
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-task-tooltip-tech {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #e7edf5;
}

.pv-task-tooltip-tech > div {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 5px;
}

.pv-task-tooltip-tech > div.is-wide {
  grid-column: 1 / -1;
}

.pv-task-tooltip-tech span {
  color: #7a8699;
  font-size: var(--pv-fs-8);
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: nowrap;
}

.pv-task-tooltip-tech b {
  min-width: 0;
  overflow: hidden;
  color: #263247;
  font-size: var(--pv-fs-9);
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-task-tooltip-tech > div.is-wide b {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pv-task-tooltip-duration {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.pv-task-tooltip-duration > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid #e3eaf4;
  border-radius: 10px;
  background: #f8fafc;
}

.pv-task-tooltip-duration > div.is-prep {
  border-color: #f6d58f;
  background: #fff9eb;
}

.pv-task-tooltip-duration > div.is-run {
  border-color: #bfd2ff;
  background: #f1f5ff;
}

.pv-task-tooltip-duration strong {
  color: #172033;
  font-size: var(--pv-fs-11);
  font-weight: 950;
  white-space: nowrap;
}

.pv-task-tooltip-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #edf1f6;
  color: #667085;
  font-size: var(--pv-fs-9);
  font-weight: 850;
}

.pv-task-tooltip-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 520px) {
  .pv-task-tooltip {
    width: min(360px, calc(100vw - 16px));
  }
}


/* 2026-07-10: la barra preparación/tirada recupera la prioridad visual.
   Preparación usa trama; tirada usa color sólido. */
.pv-task.priority-alta {
  --pv-priority-strip: #c73d4a;
  --pv-priority-strip-strong: #9f2935;
}

.pv-task.priority-media {
  --pv-priority-strip: #3f7fe8;
  --pv-priority-strip-strong: #2458b8;
}

.pv-task.priority-baja {
  --pv-priority-strip: #2aa174;
  --pv-priority-strip-strong: #187a56;
}

.pv-task > .pv-load.pv-task-duration-strip .pv-task-duration-mr,
.pv-task:not(.has-custom-color) > .pv-load.pv-task-duration-strip .pv-task-duration-mr,
.pv-task.has-custom-color > .pv-load.pv-task-duration-strip .pv-task-duration-mr {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.72) 0,
      rgba(255,255,255,.72) 3px,
      transparent 3px,
      transparent 6px
    ),
    var(--pv-priority-strip-strong, #2458b8);
}

.pv-task > .pv-load.pv-task-duration-strip .pv-task-duration-run,
.pv-task:not(.has-custom-color) > .pv-load.pv-task-duration-strip .pv-task-duration-run,
.pv-task.has-custom-color > .pv-load.pv-task-duration-strip .pv-task-duration-run {
  background: var(--pv-priority-strip, #3f7fe8);
}

/* Prueba temporal de rendimiento del timeline. */
.pv-performance-test{border:1px dashed rgba(13,110,253,.35);background:rgba(13,110,253,.035)}
.pv-performance-dates{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;margin-bottom:8px}
.pv-performance-dates .pv-field-stack{gap:4px}
.pv-performance-control{grid-template-columns:auto minmax(0,1fr)}
.pv-performance-presets,.pv-performance-actions{display:grid;gap:6px;margin-top:8px}
.pv-performance-presets{grid-template-columns:repeat(3,minmax(0,1fr))}
.pv-performance-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.pv-performance-status{margin-top:8px;padding:7px 9px;border-radius:6px;background:rgba(108,117,125,.08);font-size:.76rem;line-height:1.35;color:var(--pv-muted,#667085)}
.pv-performance-status.active{background:rgba(255,193,7,.14);color:#725500;font-weight:600}
.pv-task.performance-test{outline:1px dashed rgba(0,0,0,.22);outline-offset:-2px}

/* Optimización gráfica automática para cargas elevadas. */
.pv-rendering .pv-task,
.pv-rendering .pv-lane-occupancy,
.pv-high-density .pv-task,
.pv-high-density .pv-lane-occupancy {
  transition: none !important;
  animation: none !important;
}

.pv-high-density .pv-task {
  box-shadow: none !important;
}

/* Durante drag/resize se eliminan efectos de pintura no funcionales. La barra
   preparación/tirada y el contenido de las tareas siguen visibles. */
body.pv-task-interaction-active .pv-task,
body.pv-task-interaction-active .pv-card,
body.pv-task-interaction-active .pv-lane-occupancy,
body.pv-task-interaction-active .pv-drop-preview {
  transition: none !important;
  animation: none !important;
}

body.pv-task-interaction-active .pv-task,
body.pv-task-interaction-active .pv-card {
  box-shadow: none !important;
}

body.pv-task-interaction-active #pvDependencySvg {
  visibility: hidden !important;
}

body.pv-task-interaction-active .pv-lane-occupancy {
  opacity: .42;
}

body.pv-task-interaction-active,
body.pv-task-interaction-active * {
  scroll-behavior: auto !important;
}

.pv-high-density .pv-task small,
.pv-high-density .pv-task .pv-dep-badge {
  display: none;
}

.pv-very-high-density .pv-task {
  border-radius: 2px;
  outline: 0;
}

.pv-very-high-density .pv-task > span:not(.pv-task-code) {
  display: none;
}

.pv-performance-status[data-load-level="high"] {
  background: rgba(255, 193, 7, .18);
}

.pv-performance-status[data-load-level="very-high"] {
  background: rgba(220, 53, 69, .12);
  color: #8a2430;
}

/* 2026-07-13: umbrales locales y modo de interacción virtualizada. */
.pv-density-threshold-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.pv-density-thresholds .pv-field-stack{gap:4px}

/* La barra preparación/tirada es información funcional y nunca se oculta,
   tampoco en los modos de densidad alta. */
.pv-high-density .pv-task > .pv-load.pv-task-duration-strip,
.pv-very-high-density .pv-task > .pv-load.pv-task-duration-strip{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  height:5px !important;
  min-height:5px !important;
  z-index:4;
}
.pv-high-density .pv-task > .pv-load.pv-task-duration-strip i,
.pv-very-high-density .pv-task > .pv-load.pv-task-duration-strip i{display:block !important;min-height:5px}

.pv-drag-helper-compact{
  min-width:84px;
  max-width:260px;
  min-height:42px;
  padding:6px 8px;
  overflow:hidden;
  border-radius:5px;
  box-shadow:0 4px 12px rgba(15,23,42,.18);
  background:var(--pv-panel,#fff);
  color:var(--pv-text,#172033);
}
.pv-drag-helper-compact strong,.pv-drag-helper-compact small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-drag-helper-compact strong{font-size:.76rem;line-height:1.15}
.pv-drag-helper-compact small{font-size:.66rem;line-height:1.1;margin-top:3px;color:var(--pv-muted,#667085)}
.pv-drag-helper-duration{display:flex;width:100%;height:5px;margin-top:5px;overflow:hidden;border-radius:3px;background:#d9dee8}
.pv-drag-helper-duration i{display:block;height:5px;margin:0;padding:0}
.pv-drag-helper-duration .pv-task-duration-mr{background:repeating-linear-gradient(135deg,rgba(255,255,255,.7) 0,rgba(255,255,255,.7) 3px,transparent 3px,transparent 6px),#2458b8}
.pv-drag-helper-duration .pv-task-duration-run{background:#3f7fe8}


/* 2026-07-13 — consolidación controlada de estilos duplicados.
   Se centralizan únicamente el modal de detalle y la prueba de rendimiento. */
.pv-editor-modal .modal-content {
  height: min(720px, calc(100vh - 24px));
  min-height: min(520px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .28);
}

.pv-editor-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fbfdff 0, #fff 90px, #fff 100%);
}

.pv-task-editor-summary {
  display: grid;
  grid-template-columns: minmax(110px, .9fr) minmax(150px, 1.15fr) minmax(145px, 1fr) minmax(185px, 1.3fr) minmax(150px, 1.05fr);
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.pv-task-editor-kpi {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
  border: 1px solid #dde5f0;
  border-radius: 9px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.pv-task-editor-kpi strong {
  display: block;
  min-width: 0;
  color: #172033;
  font-size: var(--pv-fs-12);
  font-weight: 800;
  line-height: 1.28;
  word-break: break-word;
}

.pv-task-editor-pane {
  display: none;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.pv-performance-presets .pv-toolbtn,
.pv-performance-actions .pv-toolbtn,
.pv-performance-actions .pv-btn,
.pv-performance-actions button {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}

.pv-performance-actions { grid-template-columns: 1fr; }
.pv-performance-actions > * { width: 100%; }

.pv-task-editor-kpi strong,
.pv-task-editor-kpi small,
.pv-task-editor-kpi em,
.pv-task-editor-kpi b { min-width: 0; }

.pv-task-editor-kpi--state strong,
.pv-task-editor-kpi--machine strong,
.pv-task-editor-kpi--duration strong,
.pv-task-editor-kpi--duration small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-task-editor-kpi--machine strong,
.pv-task-editor-kpi--duration strong,
.pv-task-editor-kpi--duration small { white-space: nowrap; }

.pv-task-editor-kpi--color .pv-task-editor-color-preview {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pv-task-editor-kpi--color .pv-task-editor-color-preview small { margin-left: 0; }
.pv-task-editor-interval { gap: 3px; }
.pv-task-editor-interval em { flex-wrap: nowrap; }
.pv-task-editor-interval em b { flex: 1 1 auto; }
.pv-admin-only[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .pv-task-editor-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pv-task-editor-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pv-task-editor-summary { grid-template-columns: 1fr; }
}
/* 2026-07-13 · espacios operativos de máquinas, filtros e informes */
.pv-filtered-out{display:none!important}.pv-panel-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.pv-count-badge{font-size:11px;padding:4px 8px;border-radius:999px;background:#eef1f5;color:#596273;white-space:nowrap}.pv-count-badge.is-active{background:#e8f1ff;color:#1557a5}.pv-searchbox{display:flex;align-items:center;gap:8px;border:1px solid #d7dce4;border-radius:8px;padding:7px 10px;background:#fff}.pv-searchbox input{border:0;outline:0;width:100%;font-size:13px}.pv-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.pv-filter-grid label span{display:block;font-size:11px;font-weight:700;color:#5f6877;margin-bottom:4px}.pv-span-2{grid-column:1/-1}.pv-filter-switches{display:grid;gap:7px;margin:13px 0}.pv-filter-actions,.pv-report-actions{display:flex;gap:8px}.pv-saved-views{margin-top:18px;padding-top:14px;border-top:1px solid #e6e9ee}.pv-chip-row{display:flex;flex-wrap:wrap;gap:6px}.pv-chip-row button{border:1px solid #d8dde5;background:#fff;border-radius:999px;padding:5px 9px;font-size:11px}.pv-machine-oper-card{border:1px solid #e0e4ea;border-radius:10px;padding:10px;margin-bottom:8px;background:#fff}.pv-machine-oper-main{display:flex;align-items:center;gap:10px}.pv-machine-oper-main strong,.pv-machine-oper-main small{display:block}.pv-machine-oper-main small{font-size:11px;color:#70798a;margin-top:2px}.pv-machine-oper-metrics{display:flex;align-items:center;gap:8px;margin-top:9px;font-size:10px;color:#667080}.pv-machine-oper-metrics span{padding:3px 6px;border-radius:5px;background:#f3f5f8}.pv-machine-oper-metrics span:last-child{margin-left:auto}.pv-machine-oper-metrics .is-mantenimiento{background:#fff3d6;color:#875d00}.pv-switch input{display:none}.pv-switch span{display:block;width:28px;height:16px;background:#c8ced8;border-radius:99px;position:relative}.pv-switch span:after{content:"";position:absolute;width:12px;height:12px;background:#fff;border-radius:50%;top:2px;left:2px;transition:.15s}.pv-switch input:checked+span{background:#1769d2}.pv-switch input:checked+span:after{left:14px}.pv-report-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pv-report-kpis>div{display:flex;gap:9px;align-items:center;border:1px solid #e1e5eb;border-radius:9px;padding:10px;background:#fff}.pv-report-kpis i{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:#edf4ff;color:#1769d2}.pv-report-kpis b,.pv-report-kpis small{display:block}.pv-report-kpis b{font-size:18px;line-height:1}.pv-report-kpis small{font-size:10px;color:#687284;margin-top:4px}.pv-report-block{margin-top:14px;border:1px solid #e1e5eb;border-radius:10px;padding:11px;background:#fff}.pv-report-block-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:10px}.pv-report-block-head span{font-size:10px;color:#778090}.pv-report-bar{margin:8px 0}.pv-report-bar>div{display:flex;justify-content:space-between;font-size:11px;margin-bottom:4px}.pv-report-bar em{display:block;height:7px;background:#edf0f4;border-radius:99px;overflow:hidden}.pv-report-bar i{display:block;height:100%;background:linear-gradient(90deg,#3579dc,#1aa177);border-radius:99px}.pv-report-alerts>div{display:flex;gap:7px;padding:7px 0;font-size:11px;color:#9a5b00;border-bottom:1px solid #f0f1f3}.pv-report-alerts>div:last-child{border-bottom:0}.pv-report-alerts .is-ok{color:#16754b}.pv-report-actions{margin-top:12px}@media print{.pv-rail,.pv-left,.pv-desktopbar,.pv-statusbar{display:none!important}.pv-app{display:block!important}.pv-main{margin:0!important}}
.pv-login-modal .modal-dialog{max-width:430px}.pv-login-modal .modal-content{border:0;border-radius:16px;box-shadow:0 24px 70px rgba(20,28,44,.28);overflow:hidden}.pv-login-modal .modal-header{padding:18px 22px;background:#172235;color:#fff;border:0}.pv-login-modal .modal-body{padding:24px}.pv-login-brand{display:flex;gap:12px;align-items:center;margin-bottom:18px}.pv-login-brand strong,.pv-login-brand small{display:block}.pv-login-brand strong{font-size:18px}.pv-login-brand small{font-size:11px;color:#758095;margin-top:2px}.pv-login-mark{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center}.pv-login-mark img{display:block;width:48px;height:48px;object-fit:contain}.pv-login-modal .pv-field-stack label{font-size:12px;font-weight:700;color:#4e5969;margin-bottom:6px}.pv-login-modal .form-control{height:42px}.pv-login-modal .modal-footer{padding:0 24px 24px;border:0}.pv-login-modal .modal-footer .btn{width:100%;height:42px}.pv-field-help{display:block;font-size:10px;color:#7a8493;margin-top:4px}

/* La aplicación permanece oculta desde el primer render hasta completar la autenticación. */
body.pv-auth-gated { background: #eef2f7; }
body.pv-auth-gated #pvApp { visibility: hidden !important; }
body.pv-auth-gated .modal-backdrop { background-color: #eef2f7; opacity: 1; }

/* 2026-07-13: corrección geométrica de interruptores.
   Neutraliza la definición compacta heredada al final del archivo y mantiene
   el tirador dentro de la pista en estados activo e inactivo. */
.pv-switch > span {
  display: block;
  position: relative;
  width: 2.25rem;
  height: 1.22rem;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 999rem;
  background: #cbd5e1;
  flex: 0 0 2.25rem;
}

.pv-switch > span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: .14rem;
  width: .84rem;
  height: .84rem;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 .08rem .2rem rgba(15, 23, 42, .28);
  transform: translateY(-50%);
  transition: transform .16s ease;
}

.pv-switch > input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
}

.pv-switch > input:checked + span::after {
  left: .14rem;
  transform: translate(1.06rem, -50%);
}

/* 2026-07-13 · ajustes de máquinas, permisos, presencia e informes */
.pv-machine-oper-card{position:relative;padding-right:2rem}
.pv-machine-oper-sort{position:absolute;top:.55rem;right:.45rem;width:1.5rem;height:1.7rem;border:0;background:transparent;color:#94a3b8;cursor:grab;display:grid;place-items:center;border-radius:.35rem}
.pv-machine-oper-sort:hover{background:#eef4ff;color:#2563eb}
.pv-machine-oper-sort:active{cursor:grabbing}
.pv-machine-oper-placeholder{min-height:5.35rem;border:1px dashed #93b4e8;border-radius:10px;background:#f5f9ff;margin-bottom:8px}
.pv-user-perm-table td:nth-child(2),.pv-user-perm-table td:nth-child(3){text-align:center}
.pv-user-perm-switch{display:inline-flex;vertical-align:middle;margin:0}
.pv-user-perm-switch>span{margin:0 auto}
.pv-report-kpis{width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.pv-report-kpis>div{min-width:0;padding:8px;gap:7px}
.pv-report-kpis>div>span{min-width:0}
.pv-report-kpis i{flex:0 0 24px;width:24px;height:24px}
.pv-report-kpis b{font-size:16px}
.pv-report-kpis small{white-space:normal;overflow-wrap:anywhere;line-height:1.15}
.pv-presence-badge{cursor:pointer}
.pv-presence-popover{position:fixed;z-index:2600;width:19rem;max-width:calc(100vw - 16px);display:none;border:1px solid var(--line);border-radius:.8rem;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.2);overflow:hidden}
.pv-presence-popover.is-open{display:block}
.pv-presence-popover-head{display:flex;align-items:center;justify-content:space-between;padding:.75rem .85rem;border-bottom:1px solid var(--line);background:#f8fafc}
.pv-presence-popover-head strong{font-size:.78rem}
.pv-presence-popover-head button{border:0;background:transparent;color:#64748b;width:1.7rem;height:1.7rem;border-radius:.35rem}
.pv-presence-popover-list{max-height:19rem;overflow:auto;padding:.45rem}
.pv-presence-person{display:flex;gap:.65rem;padding:.62rem;border-radius:.55rem}
.pv-presence-person:hover{background:#f8fafc}
.pv-presence-person.is-me{background:#eef6ff}
.pv-presence-avatar{flex:0 0 2rem;width:2rem;height:2rem;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;font-weight:800}
.pv-presence-person div{min-width:0}
.pv-presence-person strong,.pv-presence-person small,.pv-presence-person div>span{display:block}
.pv-presence-person strong{font-size:.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-presence-person strong em{font-style:normal;color:#64748b;font-weight:600}
.pv-presence-person small,.pv-presence-person div>span{font-size:.66rem;color:#64748b;margin-top:.12rem}
.pv-presence-empty{padding:1rem;text-align:center;color:#64748b;font-size:.72rem}

/* 2026-07-13 · Centro de informes y presencia informativa */
.pv-report-workspace{min-width:0;overflow:hidden}
.pv-report-controls{display:grid;gap:8px;margin:10px 0 8px}
.pv-report-controls label>span{display:block;margin-bottom:4px;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#68758a}
.pv-report-controls .pv-report-check{display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid #e1e7ef;border-radius:8px;background:#fff}
.pv-report-controls .pv-report-check>span{display:inline;margin:0;font-size:11px;font-weight:600;letter-spacing:0;text-transform:none}
.pv-report-meta{display:flex;flex-direction:column;gap:2px;margin:6px 0 9px;font-size:9px;color:#748096}
.pv-report-current-title{margin:12px 0 7px;font-size:12px;font-weight:800;color:#1e293b}
.pv-report-content{min-width:0}
.pv-report-content .pv-report-block{margin-top:8px}
.pv-report-table-wrap{max-width:100%;overflow:auto;border:1px solid #e1e7ef;border-radius:9px;background:#fff}
.pv-report-table{width:100%;min-width:430px;border-collapse:collapse;font-size:10px}
.pv-report-table th,.pv-report-table td{padding:7px 8px;border-bottom:1px solid #edf0f4;text-align:left;white-space:nowrap}
.pv-report-table th{position:sticky;top:0;z-index:1;background:#f6f8fb;color:#5f6b7d;font-size:9px;text-transform:uppercase;letter-spacing:.04em}
.pv-report-table tr:last-child td{border-bottom:0}
.pv-report-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:110px;padding:18px;border:1px dashed #cad4e2;border-radius:9px;color:#748096;text-align:center;font-size:11px}
.pv-report-empty i{font-size:20px}
.pv-report-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;position:sticky;bottom:0;padding-top:10px;background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 22%)}
.pv-report-actions .btn{min-width:0;padding-left:5px;padding-right:5px}
.pv-presence-popover-head{justify-content:flex-start}
.pv-presence-popover-head button{display:none!important}

/* 2026-07-14 — editor y trazado de relaciones entre tareas */
.pv-rel-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.85rem}.pv-rel-editor-head small{display:block;color:var(--muted);margin-top:.2rem}.pv-rel-editor-list{display:grid;gap:.5rem}.pv-rel-empty{padding:1rem;border:1px dashed #cbd5e1;border-radius:.65rem;color:#64748b;text-align:center}.pv-rel-row{display:grid;grid-template-columns:90px minmax(120px,1fr) 42px 76px 86px 32px 32px;align-items:center;gap:.45rem;padding:.55rem .65rem;border:1px solid #e2e8f0;border-radius:.65rem;background:#fff}.pv-rel-direction,.pv-rel-mode{font-size:.76rem;color:#64748b}.pv-rel-badge{font-weight:700;text-align:center;border-radius:999px;background:#e8f0fe;color:#1d4ed8;padding:.18rem .35rem}.pv-rel-lag{font-variant-numeric:tabular-nums;font-size:.78rem}.pv-rel-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;padding:.8rem;border:1px solid #bfdbfe;background:#f8fbff;border-radius:.7rem}.pv-rel-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:.5rem}.pv-dep-line.warning{stroke:#f59e0b}


/* 2026-07-14 — mejoras UX para relaciones */
.pv-rel-task-picker{display:grid;gap:.4rem}
.pv-rel-form-count{display:block;color:#64748b;font-size:.74rem}
.pv-rel-form-task{min-height:2.05rem}
.pv-rel-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.pv-rel-handle{
  position:absolute !important;
  top:10px;
  width:12px;
  height:12px;
  margin-top:0;
  border-radius:999px;
  border:2px solid #2563eb;
  background:#fff;
  box-shadow:0 2px 8px rgba(37,99,235,.22);
  opacity:0;
  pointer-events:none;
  z-index:34;
  transition:opacity .14s ease,transform .14s ease,box-shadow .14s ease;
}
.pv-rel-handle-start{left:-2px;cursor:crosshair}
.pv-rel-handle-end{right:-2px;cursor:crosshair}
.pv-task:hover .pv-rel-handle,
.pv-task.is-relation-source .pv-rel-handle,
.pv-task.is-relation-target .pv-rel-handle,
body.pv-connecting-dependency .pv-rel-handle{
  opacity:.95;
  pointer-events:auto;
}
.pv-rel-handle:hover,
.pv-rel-handle.is-active,
.pv-rel-handle.is-drop-target{
  transform:scale(1.12);
  box-shadow:0 0 0 4px rgba(37,99,235,.56),0 2px 8px rgba(37,99,235,.68);
}
.pv-task.is-relation-source{box-shadow:0 0 0 2px rgba(37,99,235,.26),0 12px 24px rgba(37,99,235,.18)}
.pv-task.is-relation-target{box-shadow:0 0 0 2px rgba(59,130,246,.26),0 12px 24px rgba(59,130,246,.18)}
.pv-dep-line.draft{
  stroke:var(--pv-relation-line-color);
  stroke-width:2.5;
  stroke-dasharray:7 5;
  opacity:.92;
}
body.pv-connecting-dependency .pv-task.ui-draggable,
body.pv-connecting-dependency .pv-task.ui-resizable{cursor:default}

.pv-task.pv-relation-chain-source{box-shadow:0 0 0 3px rgba(37,99,235,.38),0 14px 28px rgba(37,99,235,.20)}
.pv-task.pv-relation-chain-affected{box-shadow:0 0 0 3px rgba(245,158,11,.42),0 14px 28px rgba(245,158,11,.22)}
.pv-dep-line.pv-relation-chain-affected{stroke:#f59e0b;stroke-width:3;opacity:1;stroke-dasharray:8 4}
.pv-relation-chain-note{padding:.55rem .7rem;border:1px solid #fde68a;border-radius:.6rem;background:#fffbeb;color:#92400e;font-size:.78rem;line-height:1.35}

/* 2026-07-14 — relaciones compactas, sin tooltip ni resize durante conexión */
body.pv-connecting-dependency .pv-task .ui-resizable-handle,
body.pv-relation-handle-hover .pv-task .ui-resizable-handle,
.pv-task.pv-relation-handle-hover .ui-resizable-handle {
  display: none !important;
  pointer-events: none !important;
}

.pv-editor-modal.pv-relation-editing .modal-content {
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 24px);
}

.pv-editor-modal.pv-relation-editing .modal-body,
.pv-editor-modal.pv-relation-editing .pv-editor-body,
.pv-editor-modal.pv-relation-editing .pv-task-editor-panes,
.pv-editor-modal.pv-relation-editing .pv-task-editor-pane[data-pv-task-pane="relations"].active {
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.pv-editor-modal.pv-relation-editing .pv-task-editor-summary {
  margin-bottom: 6px;
}

.pv-editor-modal.pv-relation-editing .pv-task-editor-tabs {
  margin-bottom: 6px;
}

.pv-rel-form {
  display: block;
  padding: .65rem;
}

.pv-rel-form-row {
  display: grid;
  gap: .6rem;
  align-items: start;
}

.pv-rel-form-row-main {
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.8fr);
}

.pv-rel-form-row-options {
  grid-template-columns: minmax(120px, .65fr) minmax(130px, .7fr) minmax(220px, 1.35fr);
  margin-top: .55rem;
}

.pv-rel-form .pv-field-stack {
  min-width: 0;
  gap: .25rem;
}

.pv-rel-task-picker {
  grid-template-columns: minmax(190px, .75fr) minmax(240px, 1.25fr);
  gap: .4rem;
  align-items: center;
}

.pv-rel-task-picker .pv-rel-form-count {
  grid-column: 1 / -1;
  margin-top: -.12rem;
}

.pv-rel-field-description {
  margin-top: .55rem;
}

.pv-relation-chain-note {
  margin-bottom: .55rem;
}

@media (max-width: 820px) {
  .pv-rel-form-row-main,
  .pv-rel-form-row-options,
  .pv-rel-task-picker {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-14 — relaciones: guardado unificado y limpieza visual */
.pv-rel-editor-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;justify-content:flex-end}
.pv-task .pv-dep-badge{display:none!important}
.ui-draggable-dragging.pv-task{opacity:.9;box-shadow:0 12px 28px rgba(15,23,42,.24)!important}
.pv-dep-line.pv-dep-type-ss,
.pv-dep-line.pv-dep-type-fs,
.pv-dep-line.pv-dep-type-ff,
.pv-dep-line.pv-dep-type-sf{stroke-dasharray:none}

/* 2026-07-14 — trazado y edición de relaciones v6 */
.pv-drag-anchor{
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:0!important;
  overflow:hidden!important;
  pointer-events:none!important;
}
.pv-dependency-item{
  position:relative;
  cursor:pointer;
  padding-right:2rem;
}
.pv-dependency-item:focus-visible{
  outline:2px solid rgba(37,99,235,.4);
  outline-offset:2px;
}
.pv-dependency-edit{
  position:absolute;
  top:.4rem;
  right:.4rem;
  width:1.55rem;
  height:1.55rem;
  border:0;
  border-radius:.4rem;
  background:transparent;
  color:#64748b;
  opacity:.45;
}
.pv-dependency-item:hover .pv-dependency-edit,
.pv-dependency-edit:focus-visible{
  opacity:1;
  color:#2563eb;
  background:#eff6ff;
}

/* 2026-07-14 — acciones de relaciones en panel lateral */
.pv-dependency-item{
  padding-right:4.15rem;
}
.pv-dependency-actions{
  position:absolute;
  top:.35rem;
  right:.35rem;
  display:flex;
  gap:.2rem;
}
.pv-dependency-actions .pv-dependency-edit,
.pv-dependency-actions .pv-dependency-delete{
  position:static;
  width:1.55rem;
  height:1.55rem;
  border:0;
  border-radius:.4rem;
  background:transparent;
  color:#64748b;
  opacity:.5;
}
.pv-dependency-item:hover .pv-dependency-actions button,
.pv-dependency-actions button:focus-visible{
  opacity:1;
}
.pv-dependency-actions .pv-dependency-edit:hover,
.pv-dependency-actions .pv-dependency-edit:focus-visible{
  color:#2563eb;
  background:#eff6ff;
}
.pv-dependency-actions .pv-dependency-delete:hover,
.pv-dependency-actions .pv-dependency-delete:focus-visible{
  color:#dc2626;
  background:#fef2f2;
}

/* 2026-07-14 — desfase opcional en relaciones */
.pv-rel-field-lag{align-content:start}
.pv-rel-lag-toggle{display:flex;align-items:center;gap:.42rem;min-height:1.35rem;margin:0;color:#334155;font-size:.78rem;font-weight:600;cursor:pointer}
.pv-rel-lag-toggle .form-check-input{margin:0;flex:0 0 auto}
.pv-rel-field-lag .input-group{margin-top:.18rem}
.pv-rel-field-lag .pv-rel-form-lag:disabled{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}
.pv-rel-field-lag .input-group-text{min-width:2.8rem;justify-content:center;color:#64748b}


/* 2026-07-14 — relación: condición del desfase y maquetación compacta */
.pv-rel-form-row-options{
  grid-template-columns:minmax(130px,.6fr) minmax(300px,1.15fr) minmax(220px,1.2fr);
  align-items:end;
}
.pv-rel-field-lag{align-self:stretch}
.pv-rel-lag-controls{
  display:grid;
  grid-template-columns:minmax(120px,.9fr) minmax(125px,.75fr);
  gap:.45rem;
  align-items:center;
  margin-top:.18rem;
}
.pv-rel-field-lag .input-group{margin-top:0}
.pv-rel-form-lag-mode:disabled{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}
.pv-rel-field-description{display:grid;grid-template-columns:1fr;gap:.25rem}
.pv-rel-field-description .pv-rel-form-desc{width:100%;min-height:2rem}
@media (max-width:980px){
  .pv-rel-form-row-options{grid-template-columns:minmax(120px,.7fr) minmax(260px,1.3fr)}
  .pv-rel-form-row-options>.pv-field-stack:last-child{grid-column:1/-1}
}
@media (max-width:820px){
  .pv-rel-form-row-options,.pv-rel-lag-controls{grid-template-columns:1fr}
}

/* 2026-07-15 · cabecera y paneles adaptativos por ancho real del planificador */
.pv-app.pv-header-compact .pv-menu-strip {
  display: none;
}

.pv-app.pv-header-compact .pv-menu-compact {
  display: inline-flex;
  margin-right: auto;
}

.pv-app.pv-header-compact .pv-toolbar,
.pv-app.pv-header-compact .pv-toolbar-left,
.pv-app.pv-header-compact .pv-toolbar-right {
  gap: 6px;
}

.pv-app.pv-header-compact .pv-zoom-label {
  display: none;
}

.pv-app.pv-header-compact .pv-toolbar-right #pvSelectionTool {
  width: 34px;
  min-width: 34px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}

.pv-app.pv-header-compact .pv-toolbar-right #pvSelectionTool span {
  display: none;
}

.pv-app.pv-header-condensed .pv-window-title {
  min-width: 0;
}

.pv-app.pv-header-condensed .pv-window-title span {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-app.pv-header-condensed .pv-top-indicators .pv-user-badge span,
.pv-app.pv-header-condensed .pv-top-indicators .pv-data-mode,
.pv-app.pv-header-condensed #pvFit {
  display: none;
}

.pv-app.pv-header-condensed .pv-user-badge,
.pv-app.pv-header-condensed .pv-presence-badge,
.pv-app.pv-header-condensed .pv-notice-badge {
  min-width: 2rem;
  width: 2rem;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}

.pv-app.pv-layout-overlay {
  grid-template-columns: var(--rail) 0 minmax(0,1fr) 0;
}

.pv-app.pv-layout-overlay .pv-left,
.pv-app.pv-layout-overlay .pv-right {
  position: fixed;
  top: 0;
  bottom: 30px;
  z-index: 1550;
  opacity: 1;
  pointer-events: auto;
  transition: transform .18s ease, opacity .16s ease;
}

.pv-app.pv-layout-overlay .pv-left {
  left: var(--rail);
  width: min(var(--left), calc(100vw - var(--rail) - 20px));
  transform: translateX(0);
}

.pv-app.pv-layout-overlay .pv-right {
  right: 0;
  width: min(var(--right), calc(100vw - var(--rail) - 20px));
  transform: translateX(0);
}

.pv-app.pv-layout-overlay.left-closed .pv-left {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-100% - 12px));
}

.pv-app.pv-layout-overlay.right-collapsed .pv-right {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 12px));
}

@media (max-width: 760px) {
  .pv-desktopbar {
    grid-template-columns: minmax(145px, 180px) minmax(0,1fr);
    gap: 0 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .pv-app.pv-header-condensed #pvWeek {
    display: none;
  }
}


/* 2026-07-16 · Panel compacto y disponibilidad operativa de máquinas */
.pv-machine-panel-section {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  gap: 10px;
}

.pv-machine-panel-head,
.pv-machine-panel-tools,
.pv-machine-panel-legend,
.pv-shift-toolbar,
.pv-overtime-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pv-machine-panel-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 7px;
}

.pv-machine-searchbox {
  min-width: 0;
  margin: 0;
}

.pv-machine-panel-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: #64748b;
  font-size: var(--pv-fs-10);
}

.pv-machine-panel-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pv-machine-load-toggle {
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  font-size: var(--pv-fs-11);
}

.pv-machine-settings {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 3px 4px 1px;
  gap: 5px !important;
  scrollbar-width: thin;
}

.pv-machine-setting-item {
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr) auto !important;
  align-items: center !important;
  padding: 5px 6px !important;
  border: 1px solid #e1e7f0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.pv-machine-setting-item:hover {
  border-color: #b8c9e8 !important;
  border-left-color: #2458d3 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}

.pv-machine-setting-item.is-hidden {
  opacity: .56;
  background: #f8fafc !important;
}

.pv-machine-setting-item.is-filtered-out {
  display: none !important;
}

.pv-machine-setting-item.is-no-access {
  opacity: .42;
}

.pv-machine-setting-item .pv-machine-sort {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: static !important;
  left: auto !important;
  width: 14px !important;
  min-width: 14px !important;
  height: 34px !important;
  color: #b0bdce !important;
  cursor: grab;
}

.pv-machine-setting-main {
  grid-column: 2 !important;
  display: block !important;
  min-width: 0;
  padding: 3px 5px !important;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.pv-machine-setting-main:disabled {
  cursor: default;
}

.pv-machine-setting-title {
  display: flex !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pv-machine-setting-main strong {
  min-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: var(--pv-fs-12) !important;
  line-height: 1.25 !important;
}

.pv-machine-state-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .13);
}

.pv-machine-state-dot.is-active {
  background: #16a36f;
  box-shadow: 0 0 0 3px rgba(22, 163, 111, .12);
}

.pv-machine-state-dot.is-maintenance {
  background: #e89519;
  box-shadow: 0 0 0 3px rgba(232, 149, 25, .14);
}

.pv-machine-state-dot.is-off {
  background: #7c8798;
}

.pv-machine-setting-meta {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  min-width: 0;
  margin-top: 3px;
  color: #64748b !important;
  font-size: var(--pv-fs-10) !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}

.pv-machine-setting-meta span,
.pv-machine-setting-meta em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-machine-setting-meta b {
  color: #c1cad7;
  font-weight: 400;
}

.pv-machine-setting-meta em {
  color: #8390a2;
  font-style: normal;
}

.pv-machine-setting-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pv-machine-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 27px;
  min-width: 27px;
  height: 27px;
  margin: 0;
  padding: 0;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  color: #8694a8;
  cursor: pointer;
}

.pv-machine-action:hover {
  border-color: #9fb7e7;
  color: #2458d3;
  background: #f4f7ff;
}

.pv-machine-action.is-on {
  border-color: #c4d3ef;
  color: #2458d3;
  background: #eef3ff;
}

.pv-machine-action.is-disabled,
.pv-machine-action:disabled {
  opacity: .42;
  cursor: default;
}

.pv-machine-action input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: inherit;
}

.pv-machine-sort-placeholder {
  min-height: 54px;
  border: 1px dashed #7d9be0;
  border-radius: 10px;
  background: #eef3ff;
}

.pv-machine-sort-hint {
  color: #7b8798;
  font-size: var(--pv-fs-10);
  line-height: 1.25;
}

.pv-machine-sort-hint.is-filtering {
  color: #9a6507;
}

.pv-auth-nonadmin .pv-admin-only-inline {
  display: none !important;
}

/* Fondo no operativo: informativo y por debajo de tareas/ocupación. */
.pv-machine-closed-band {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  border-left: 1px solid rgba(100, 116, 139, .12);
  border-right: 1px solid rgba(100, 116, 139, .12);
  background:
    repeating-linear-gradient(135deg, rgba(100, 116, 139, .09) 0, rgba(100, 116, 139, .09) 5px, rgba(148, 163, 184, .025) 5px, rgba(148, 163, 184, .025) 10px),
    rgba(241, 245, 249, .74);
}

.pv-lane-occupancy,
.pv-task {
  z-index: 2;
}

/* Modal de turnos */
.pv-machine-schedule-modal .modal-dialog {
  max-width: 980px;
}

.pv-machine-schedule-body {
  padding: 18px 20px 20px;
  background: #f6f8fc;
}

.pv-machine-schedule-tabs {
  gap: 7px;
  margin-bottom: 12px;
}

.pv-machine-schedule-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #4a5b73;
  font-weight: 700;
}

.pv-machine-schedule-tabs .nav-link.active {
  border-color: #2458d3;
  background: #2458d3;
  color: #fff;
}

.pv-machine-schedule-content {
  min-height: 405px;
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #fff;
}

.pv-shift-toolbar,
.pv-overtime-intro {
  align-items: flex-start;
  margin-bottom: 14px;
}

.pv-shift-toolbar > div:first-child,
.pv-overtime-intro > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pv-shift-toolbar small,
.pv-overtime-intro small {
  color: #66758a;
}

.pv-shift-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 330px;
}

.pv-shift-week {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pv-shift-day {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
}

.pv-shift-day-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pv-shift-day-name strong {
  color: #25334a;
  font-size: var(--pv-fs-12);
}

.pv-shift-day-name small {
  margin-top: 3px;
  color: #8a97a9;
  font-size: var(--pv-fs-10);
}

.pv-shift-intervals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pv-shift-interval {
  display: inline-grid;
  grid-template-columns: 86px auto 86px 25px;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fff;
}

.pv-shift-interval input {
  padding-inline: 6px;
}

.pv-shift-remove {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9a5560;
}

.pv-shift-remove:hover {
  background: #fff0f2;
  color: #c83349;
}

.pv-shift-add {
  justify-self: end;
}

.pv-overtime-form {
  display: grid;
  grid-template-columns: 190px 190px minmax(220px, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}

.pv-overtime-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: #53647b;
  font-size: var(--pv-fs-10);
  font-weight: 700;
}

.pv-overtime-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pv-overtime-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #fff;
}

.pv-overtime-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #fff5d9;
  color: #b37700;
}

.pv-overtime-item > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pv-overtime-item strong {
  color: #25334a;
  font-size: var(--pv-fs-11);
}

.pv-overtime-item small {
  margin-top: 2px;
  color: #718096;
}

.pv-empty-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 110px;
  border: 1px dashed #cfd8e6;
  border-radius: 11px;
  color: #7b8798;
  background: #fafcff;
}

@media (max-width: 900px) {
  .pv-machine-schedule-modal .modal-dialog {
    max-width: calc(100vw - 20px);
  }
  .pv-shift-toolbar,
  .pv-overtime-intro {
    flex-direction: column;
  }
  .pv-shift-presets {
    width: 100%;
    min-width: 0;
  }
  .pv-shift-day {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .pv-shift-add {
    grid-column: 2;
    justify-self: start;
  }
  .pv-overtime-form {
    grid-template-columns: 1fr 1fr;
  }
  .pv-overtime-reason {
    grid-column: 1 / -1;
  }
}

.pv-tool-panel[data-panel="machines"] {
  overflow: hidden;
}

.pv-tool-panel[data-panel="machines"] .pv-machine-panel-section {
  margin-bottom: 0;
}


/* 2026-07-16 · Ajustes V4.6.1: patrones, resumen compacto y relaciones estables */
.pv-machine-shift-indicator {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-left: auto;
  border: 1px solid #cbd8ec;
  border-radius: 999px;
  background: #eef4ff;
  color: #2458d3;
  font-size: 9px;
  cursor: help;
}

.pv-machine-head .pv-machine-shift-indicator + .pv-machine-overlap-indicator {
  margin-left: 3px;
}

.pv-shift-presets {
  min-width: min(440px, 100%);
}

.pv-shift-presets .form-select {
  min-width: 190px;
}

.pv-shift-pattern-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  padding-inline: 0;
}

.pv-shift-pattern-editor {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  margin: -4px 0 12px;
  padding: 9px 10px;
  border: 1px solid #d8e3f3;
  border-radius: 10px;
  background: #f7faff;
}

.pv-shift-pattern-editor label {
  margin: 0;
  color: #42526a;
  font-size: var(--pv-fs-11);
  font-weight: 800;
  white-space: nowrap;
}

/* Las relaciones permanecen ocultas mientras se recompone el tablero. */
body.pv-rendering .pv-dependency-svg {
  visibility: hidden !important;
}

@media (max-width: 760px) {
  .pv-shift-presets {
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .pv-shift-presets .form-select {
    flex: 1 1 220px;
  }

  .pv-shift-pattern-editor {
    grid-template-columns: 1fr auto auto;
  }

  .pv-shift-pattern-editor label {
    grid-column: 1 / -1;
  }
}

.pv-machine-head {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-right: 24px;
}

.pv-machine-head .pv-machine-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-machine-head .pv-machine-shift-indicator {
  margin-left: auto;
}

/* 2026-07-16 · V4.6.2: ficha de máquina amplia y foco de listado estable */
.pv-machine-setting-item {
  min-height: 7rem !important;
  grid-template-columns: 14px minmax(0, 1fr) auto !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  padding: 8px 7px 8px 6px !important;
  border-left-color: #d8e4f5 !important;
  border-radius: 11px !important;
}

.pv-machine-setting-item:hover {
  border-left-color: #2458d3 !important;
}

.pv-machine-setting-item.is-hidden {
  border-left-color: #cbd5e1 !important;
}

.pv-machine-setting-item.is-target {
  border-left-color: #2458d3 !important;
}

.pv-machine-setting-item .pv-machine-sort {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  height: 42px !important;
}

.pv-machine-setting-main {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  min-height: 0 !important;
  padding: 2px 5px 1px 6px !important;
}

.pv-machine-setting-title {
  width: 100%;
  gap: 7px !important;
}

.pv-machine-setting-main strong {
  flex: 1 1 auto;
  font-size: var(--pv-fs-12) !important;
  line-height: 1.3 !important;
}

.pv-machine-state-dot {
  margin-left: auto;
  margin-right: 1px;
}

.pv-machine-setting-type,
.pv-machine-setting-shift,
.pv-machine-setting-permission {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-machine-setting-type {
  margin-top: 5px;
  color: #5e6f86;
  font-size: var(--pv-fs-10);
  line-height: 1.25;
  min-width: 10rem;
}

.pv-machine-setting-shift {
  margin-top: 3px;
  color: #4d6079;
  font-size: var(--pv-fs-10);
  line-height: 1.25;
  min-width: 10rem;
}

.pv-machine-setting-permission {
  margin-top: auto;
  padding-top: 5px;
  color: #7f8ca0;
  font-size: var(--pv-fs-10);
  line-height: 1.2;
  cursor: help;
}

.pv-machine-setting-actions {
  grid-column: 3 !important;
  grid-row: 2 !important;
  align-self: end !important;
  justify-self: end !important;
  padding-bottom: 1px;
}

.pv-machine-sort-placeholder {
  min-height: 7rem;
}


/* V4.6.3 — política configurable para tareas fuera de turno. */
.pv-config-machine-head,
.pv-config-machine-row {
  grid-template-columns: minmax(12rem, 1.25fr) minmax(8rem, .75fr) 6.25rem 6.25rem minmax(11.5rem, .9fr);
}

.pv-config-machine-shift-select {
  display: block !important;
  margin: 0 !important;
}

.pv-config-machine-shift-select .form-select {
  min-width: 0;
  font-size: var(--pv-fs-11);
}

.pv-config-shift-impact {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: .8rem;
  margin-bottom: .2rem;
  font-size: var(--pv-fs-12);
}

.pv-task.shift-violation {
  outline: 2px dashed #b45309;
  outline-offset: -2px;
}

.pv-task.shift-violation::after {
  content: "\f017";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(120, 53, 15, .92);
  color: #fff;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 10px;
  z-index: 5;
}

.pv-task.shift-violation.shift-mode-block,
.pv-task.shift-violation.shift-mode-adjust {
  outline-color: #b91c1c;
}

.pv-drop-preview.warning {
  border-color: #d97706;
  background: rgba(245, 158, 11, .12);
}

.pv-drop-preview.warning:after,
.pv-drop-preview.adjusted:after {
  background: #92400e;
}

.pv-drop-preview.adjusted {
  border-color: #2563eb;
  background: rgba(37, 99, 235, .09);
}

@media (max-width: 1180px) {
  .pv-config-machine-head,
  .pv-config-machine-row {
    grid-template-columns: minmax(10rem, 1.1fr) minmax(7rem, .7fr) 5.8rem 5.8rem minmax(10rem, .85fr);
  }
}

/* === Planificador 4.7: cola jerárquica, detalle técnico y recurrencias === */
.pv-queue-hierarchy-toolbar{display:grid;gap:.55rem;padding:.65rem .75rem;border-top:1px solid var(--pv-border,#d9e1ea);border-bottom:1px solid var(--pv-border,#d9e1ea);background:rgba(246,249,252,.92)}
.pv-queue-view-tabs{display:grid;grid-template-columns:repeat(2,1fr);gap:.3rem;padding:.2rem;border:1px solid #d8e1eb;border-radius:.65rem;background:#fff}
.pv-queue-view-tabs button{border:0;border-radius:.48rem;background:transparent;padding:.46rem .35rem;font-size:.76rem;font-weight:700;color:#536274;display:flex;align-items:center;justify-content:center;gap:.35rem}
.pv-queue-view-tabs button.active{background:#eaf2ff;color:#175fc4;box-shadow:inset 0 0 0 1px #c7dcff}
.pv-queue-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.4rem;align-items:end}
.pv-queue-filters label{display:grid;gap:.18rem;min-width:0}.pv-queue-filters label>span{font-size:.66rem;text-transform:uppercase;letter-spacing:.05em;font-weight:800;color:#738196}
.pv-queue-filters .btn{height:31px;min-width:34px;padding:.25rem}
.pv-pending-list.is-hierarchical{display:block;padding:.55rem;overflow:auto}
.pv-queue-group{border:1px solid #dbe3ec;border-radius:.7rem;background:#fff;overflow:hidden;margin-bottom:.65rem;box-shadow:0 4px 16px rgba(28,47,70,.05)}
.pv-queue-group-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.55rem;align-items:center;padding:.62rem .7rem;background:linear-gradient(180deg,#f8fafc,#f1f5f9);border-bottom:1px solid #e1e7ef}
.pv-queue-group-head .pv-queue-group-icon{width:1.75rem;height:1.75rem;border-radius:.48rem;display:grid;place-items:center;background:#e3edfb;color:#2863a9}
.pv-queue-group-head div{min-width:0;}.pv-queue-group-head strong{font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pv-queue-group-head small{font-size:.67rem;color:#748196}.pv-queue-group-head>em{font-style:normal;font-size:.67rem;font-weight:800;background:#fff;border:1px solid #d6e0ea;border-radius:99px;padding:.12rem .42rem}
.pv-queue-group-cards{display:grid;gap:.45rem;padding:.5rem}.pv-queue-group-cards .pv-card{margin:0}
.pv-queue-order-body{padding:.5rem;background:#f8fafc}.pv-queue-subgroup{border:1px solid #e0e7ef;border-radius:.55rem;background:#fff;margin-bottom:.45rem;overflow:hidden}.pv-queue-subgroup:last-child{margin-bottom:0}
.pv-queue-subgroup-head{display:flex;justify-content:space-between;align-items:center;padding:.42rem .55rem;border-bottom:1px solid #e7ecf2;background:#fff;font-size:.72rem}.pv-queue-subgroup-head em{font-style:normal;color:#6d7a8c}
.pv-card-hierarchy{display:flex;flex-wrap:wrap;gap:.25rem;margin:.24rem 0}.pv-card-hierarchy span{display:inline-flex;gap:.2rem;align-items:center;font-size:.62rem;color:#5f6d7d;background:#f1f5f9;border:1px solid #dbe4ed;border-radius:.3rem;padding:.1rem .28rem}.pv-card-hierarchy b{font-size:.56rem;color:#2f65a0}
.pv-card-technical{display:flex;flex-wrap:wrap;gap:.22rem;margin-bottom:.25rem}.pv-card-technical span{font-size:.6rem;color:#4c6076;background:#eef6ff;border-radius:99px;padding:.11rem .32rem}.pv-card-technical span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.pv-task-data-block{border:1px solid #dfe6ee;border-radius:.75rem;background:#fff;padding:.75rem;margin-bottom:.75rem}.pv-task-data-block:last-child{margin-bottom:0}
.pv-task-data-block-head{display:flex;align-items:baseline;justify-content:space-between;gap:.6rem;padding-bottom:.55rem;margin-bottom:.6rem;border-bottom:1px solid #e6ebf1}.pv-task-data-block-head strong{font-size:.83rem}.pv-task-data-block-head small{font-size:.66rem;color:#718096;text-align:right}
.pv-task-specific-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.42rem .7rem;margin:0}.pv-task-specific-grid>div{min-width:0;padding:.38rem .45rem;border-radius:.45rem;background:#f7f9fc}.pv-task-specific-grid dt{font-size:.62rem;text-transform:uppercase;letter-spacing:.04em;color:#758296;margin-bottom:.1rem}.pv-task-specific-grid dd{font-size:.75rem;font-weight:650;color:#263648;margin:0;overflow-wrap:anywhere}
.pv-special-task .pv-task-editor-kpi--duration small{display:none}.pv-special-task #pvTaskEditDuration{font-weight:750;background:#fff}
.pv-imported-task #pvTaskEditCode[readonly],.pv-imported-task #pvTaskEditProduct[readonly],.pv-imported-task #pvTaskEditClient[readonly],.pv-imported-task #pvTaskEditSection[readonly]{background:#f3f6f9;color:#556273}

.pv-recurrence-editor{display:grid;gap:.75rem}.pv-recurrence-intro{display:grid;gap:.16rem;padding:.7rem .8rem;border-radius:.65rem;background:#eef5ff;border:1px solid #d5e5fb}.pv-recurrence-intro strong{font-size:.84rem}.pv-recurrence-intro small{font-size:.7rem;color:#536a84;line-height:1.35}
.pv-recurrence-options{display:grid;gap:.65rem;transition:opacity .16s ease}.pv-recurrence-options.is-disabled{opacity:.48}
.pv-weekday-selector{display:grid;grid-template-columns:repeat(7,1fr);gap:.3rem}.pv-weekday-selector label{display:grid;place-items:center;border:1px solid #d8e1ea;border-radius:.45rem;padding:.35rem .15rem;font-size:.72rem;font-weight:800;cursor:pointer;background:#fff}.pv-weekday-selector input{position:absolute;opacity:0}.pv-weekday-selector label:has(input:checked){background:#dcecff;border-color:#8fb9ef;color:#165da9}
.pv-monthly-pattern,.pv-recurrence-end{display:grid;gap:.4rem}.pv-monthly-pattern>label,.pv-recurrence-end>label{display:flex;align-items:center;gap:.4rem;padding:.42rem .5rem;border:1px solid #e0e6ed;border-radius:.5rem;background:#fafbfd;font-size:.73rem}.pv-monthly-pattern input[type=number],.pv-recurrence-end input[type=number]{width:72px}.pv-monthly-pattern select{width:auto;min-width:105px}.pv-recurrence-end input[type=date]{width:auto}
.pv-recurrence-summary{padding:.55rem .65rem;border-radius:.5rem;background:#f1f7ef;border:1px solid #d8e9d2;color:#315c29;font-size:.73rem;font-weight:700}.pv-recurrence-actions{display:flex;justify-content:flex-end}

@media (max-width: 920px){.pv-task-specific-grid{grid-template-columns:1fr}.pv-queue-filters{grid-template-columns:1fr 1fr auto}}

/* === Planificador 4.7.1: compactación operativa de la cola === */
#pvAddTask.pv-add-task{
  width:34px;
  min-width:34px;
  height:32px;
  border-color:#1769d2;
  background:linear-gradient(180deg,#2b7de0,#1769d2);
  color:#fff;
  box-shadow:0 5px 12px rgba(23,105,210,.24),0 0 0 2px rgba(23,105,210,.09);
}
#pvAddTask.pv-add-task:hover,
#pvAddTask.pv-add-task:focus-visible{
  border-color:#0f56b2;
  background:linear-gradient(180deg,#3588ed,#145ebd);
  color:#fff;
  box-shadow:0 7px 16px rgba(23,105,210,.32),0 0 0 3px rgba(23,105,210,.13);
  transform:translateY(-1px);
}

.pv-queue-collapsible{
  flex:0 0 auto;
  margin:0 14px 8px;
  border:1px solid #dce5ef;
  border-radius:12px;
  background:#f8fbff;
  overflow:hidden;
}
.pv-queue-collapsible-toggle{
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 9px;
  border:0;
  background:#f8fbff;
  color:#263648;
  text-align:left;
}
.pv-queue-collapsible-toggle:hover{background:#f0f6fd}
.pv-queue-collapsible-title{display:flex;align-items:center;gap:8px;min-width:0}
.pv-queue-collapsible-title>i{width:18px;text-align:center;color:#3972b5;font-size:.72rem}
.pv-queue-collapsible-title>span{display:grid;min-width:0}
.pv-queue-collapsible-title strong{font-size:.69rem;line-height:1.15;text-transform:uppercase;letter-spacing:.055em}
.pv-queue-collapsible-title small{display:block;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#748196;font-size:.61rem;line-height:1.25;margin-top:2px}
.pv-queue-collapsible-chevron{color:#748196;font-size:.68rem;transition:transform .16s ease}
.pv-queue-collapsible.is-collapsed .pv-queue-collapsible-chevron{transform:rotate(-90deg)}
.pv-queue-collapsible.is-collapsed .pv-queue-collapsible-body{display:none}
.pv-queue-collapsible-body{border-top:1px solid #e3eaf2;background:#fff}
.pv-queue-collapsible .pv-backlog-controls{margin:0;border:0;border-radius:0;background:#fff}
.pv-queue-collapsible .pv-queue-hierarchy-toolbar{border:0;background:#fff;padding:.55rem .6rem .62rem}

.pv-card-code .pv-card-priority{
  display:inline-flex;
  align-items:center;
  gap:4px;
  max-width:95px;
  padding:2px 6px;
  border-radius:999px;
  background:#eef3f8;
  color:#65748a;
  font-size:.57rem;
  line-height:1.2;
  letter-spacing:.025em;
  text-transform:none;
  white-space:nowrap;
}
.pv-card-code .pv-card-priority i{font-size:.5rem}
.pv-card.priority-alta .pv-card-priority{background:#fff0f0;color:#a93030}
.pv-card.priority-media .pv-card-priority{background:#edf4ff;color:#2861a7}
.pv-card.priority-baja .pv-card-priority{background:#edf8f1;color:#287248}

.pv-card-technical span{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-card-technical span.is-method,
.pv-card-technical span.is-config{flex:1 1 42%}
.pv-card-technical span.is-warning{color:#8a5600;background:#fff4dc}

@media (max-width:430px){
  .pv-queue-collapsible-title small{max-width:190px}
  .pv-card-technical span.is-method,
  .pv-card-technical span.is-config{flex-basis:100%}
}

/* === Planificador 4.7.4: filtros y acciones masivas del panel de máquinas === */
.pv-machine-panel-tools{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.pv-machine-filter-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.pv-machine-filter-grid label{
  display:grid;
  gap:3px;
  min-width:0;
  margin:0;
}
.pv-machine-filter-grid label>span{
  overflow:hidden;
  color:#718096;
  font-size:var(--pv-fs-9);
  font-weight:800;
  letter-spacing:.035em;
  text-overflow:ellipsis;
  text-transform:uppercase;
  white-space:nowrap;
}
.pv-machine-filter-grid .form-select{
  min-width:0;
  padding-left:7px;
  padding-right:24px;
  font-size:var(--pv-fs-10);
}
.pv-machine-filter-grid .pv-machine-filter-wide{grid-column:1/-1}

.pv-machine-batch-tools{
  display:grid;
  gap:7px;
  padding:8px;
  border:1px solid #dce5f0;
  border-radius:10px;
  background:linear-gradient(180deg,#f8fbff,#f3f7fc);
}
.pv-machine-batch-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}
.pv-machine-batch-head strong{
  min-width:0;
  overflow:hidden;
  color:#40516a;
  font-size:var(--pv-fs-10);
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-machine-batch-head>div{display:flex;gap:5px;flex:0 0 auto}
.pv-machine-link-btn{
  padding:0;
  border:0;
  background:transparent;
  color:#2464b8;
  font-size:var(--pv-fs-9);
  font-weight:750;
}
.pv-machine-link-btn:hover{text-decoration:underline}
.pv-machine-link-btn:disabled{opacity:.42;text-decoration:none;cursor:default}
.pv-machine-batch-scope{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:3px;
  border:1px solid #dbe4ef;
  border-radius:8px;
  background:#fff;
}
.pv-machine-batch-scope button{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  min-width:0;
  min-height:29px;
  padding:4px 6px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#64748b;
  font-size:var(--pv-fs-9);
  font-weight:750;
  text-align:left;
}
.pv-machine-batch-scope button.active{
  background:#e9f2ff;
  color:#195ead;
  box-shadow:inset 0 0 0 1px #c9def9;
}
.pv-machine-batch-scope button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-machine-batch-scope button b{
  min-width:20px;
  padding:1px 5px;
  border-radius:999px;
  background:rgba(100,116,139,.11);
  font-size:var(--pv-fs-9);
  text-align:center;
}
.pv-machine-batch-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
}
.pv-machine-batch-actions button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:0;
  min-height:30px;
  padding:4px 5px;
  border:1px solid #d8e2ef;
  border-radius:7px;
  background:#fff;
  color:#53647b;
  font-size:var(--pv-fs-9);
  font-weight:750;
}
.pv-machine-batch-actions button:hover:not(:disabled){
  border-color:#9fb9e6;
  background:#eef5ff;
  color:#1f5faf;
}
.pv-machine-batch-actions button:disabled{opacity:.38;cursor:default}
.pv-machine-batch-actions button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.pv-machine-setting-item{
  grid-template-columns:24px minmax(0,1fr) auto !important;
  transition:border-color .15s ease,box-shadow .15s ease,opacity .15s ease,background .15s ease;
}
.pv-machine-setting-item.is-selected{
  border-color:#8eb4ed !important;
  border-left-color:#2458d3 !important;
  background:#f5f9ff !important;
  box-shadow:0 0 0 2px rgba(36,88,211,.08),0 4px 12px rgba(15,23,42,.07);
}
.pv-machine-card-rail{
  grid-column:1 !important;
  grid-row:1/span 2 !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  gap:5px;
  min-height:0;
  padding:1px 0;
}
.pv-machine-setting-item .pv-machine-card-rail .pv-machine-sort{
  position:static !important;
  display:grid;
  place-items:center;
  width:18px !important;
  min-width:18px !important;
  height:32px !important;
  color:#a9b7c9 !important;
  cursor:grab;
}
.pv-machine-select{
  position:relative;
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  margin:0;
  border:1px solid #cad6e5;
  border-radius:5px;
  background:#fff;
  color:transparent;
  cursor:pointer;
}
.pv-machine-select:hover{border-color:#7fa7df;background:#f2f7ff}
.pv-machine-select.is-on{
  border-color:#2d70c9;
  background:#2d70c9;
  color:#fff;
}
.pv-machine-select.is-disabled{opacity:.4;cursor:default}
.pv-machine-select input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:inherit;
}
.pv-machine-select i{font-size:9px;pointer-events:none}
.pv-machine-setting-main[role="button"]{cursor:pointer;border-radius:7px}
.pv-machine-setting-main[role="button"]:hover{background:rgba(36,88,211,.035)}
.pv-machine-setting-main[role="button"]:focus-visible{outline:2px solid rgba(36,88,211,.35);outline-offset:1px}

@media (max-height:760px){
  .pv-machine-panel-section{gap:7px}
  .pv-machine-batch-tools{gap:5px;padding:6px}
  .pv-machine-batch-actions button{min-height:27px}
}

.pv-machine-advanced{
  overflow:hidden;
  border:1px solid #dce5f0;
  border-radius:10px;
  background:#fff;
}
.pv-machine-advanced-toggle{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border:0;
  background:#f8fbff;
  color:#40516a;
  text-align:left;
}
.pv-machine-advanced-toggle:hover{background:#f1f6fd}
.pv-machine-advanced-toggle>span{
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr);
  align-items:center;
  gap:6px;
  min-width:0;
}
.pv-machine-advanced-toggle>span>i{color:#2e6bb8;font-size:var(--pv-fs-10)}
.pv-machine-advanced-toggle strong{font-size:var(--pv-fs-10);white-space:nowrap}
.pv-machine-advanced-toggle small{
  min-width:0;
  overflow:hidden;
  color:#7a8798;
  font-size:var(--pv-fs-9);
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-machine-advanced-chevron{color:#7b8798;font-size:var(--pv-fs-9);transition:transform .16s ease}
.pv-machine-advanced-body{display:grid;gap:7px;padding:7px;border-top:1px solid #e3eaf2}
.pv-machine-advanced.is-collapsed .pv-machine-advanced-body{display:none}
.pv-machine-advanced.is-collapsed .pv-machine-advanced-chevron{transform:rotate(180deg)}
.pv-machine-advanced .pv-machine-batch-tools{border-radius:8px}

/* V4.8.0 — configuración de tareas, colores por estado y cola por OT. */
.pv-task-state-color-grid,
.pv-config-task-color-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.65rem;
}
.pv-task-state-color-grid label,
.pv-config-task-color-grid label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  min-width:0;
  padding:.55rem .65rem;
  border:1px solid #dce5f1;
  border-radius:.65rem;
  background:#fff;
  color:#34435a;
  font-size:.77rem;
  font-weight:700;
}
.pv-task-state-color-grid .form-control-color,
.pv-config-task-color-grid .form-control-color{
  width:2.7rem;
  min-width:2.7rem;
  height:2rem;
  padding:.15rem;
}
.pv-local-task-colors{padding-top:.75rem;border-top:1px solid #e6ebf3}
.pv-queue-filters{grid-template-columns:minmax(0,1fr) auto}
.pv-queue-filter-wide{min-width:0}
.pv-queue-filter-wide select{width:100%}
.pv-priority-disabled .pv-card-priority{display:none!important}
@media (max-width: 720px){
  .pv-task-state-color-grid,.pv-config-task-color-grid{grid-template-columns:1fr}
}


/* V4.8.1 — panel de máquinas estable en anchuras compactas. */
.pv-tool-panel[data-panel="machines"]{
  padding:14px 12px;
  overflow:hidden;
}
.pv-tool-panel[data-panel="machines"] .pv-machine-panel-section{
  min-width:0;
  max-width:100%;
  padding:12px;
}
.pv-machine-panel-section,
.pv-machine-panel-tools,
.pv-machine-advanced,
.pv-machine-advanced-body,
.pv-machine-filter-grid,
.pv-machine-batch-tools,
.pv-machine-batch-head,
.pv-machine-batch-scope,
.pv-machine-batch-actions{
  width:100%;
  min-width:0;
  max-width:100%;
}
.pv-machine-advanced-body{
  overflow:hidden;
}
.pv-machine-filter-grid label,
.pv-machine-filter-grid .form-select{
  width:100%;
  max-width:100%;
}
.pv-machine-batch-head{
  flex-wrap:wrap;
  align-items:flex-start;
}
.pv-machine-batch-head strong{
  flex:1 1 92px;
}
.pv-machine-batch-head>div{
  display:flex;
  flex:0 1 auto;
  flex-wrap:wrap;
  justify-content:flex-end;
  min-width:0;
  max-width:100%;
}
.pv-machine-link-btn{
  white-space:nowrap;
}
.pv-machine-batch-scope button,
.pv-machine-batch-actions button{
  overflow:hidden;
}
.pv-machine-batch-actions button span{
  max-width:100%;
}
.pv-machine-settings{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}
.pv-machine-setting-item{
  width:100%;
  max-width:100%;
}
@media (max-width:1200px){
  .pv-tool-panel[data-panel="machines"]{
    padding-left:10px;
    padding-right:10px;
  }
  .pv-tool-panel[data-panel="machines"] .pv-machine-panel-section{
    padding-left:10px;
    padding-right:10px;
  }
  .pv-machine-batch-actions button{
    padding-left:3px;
    padding-right:3px;
    gap:4px;
  }
}

/* 2026-07-20 — transición estable del panel de tareas */
.pv-app.pv-layout-transitioning {
  pointer-events: none;
}
.pv-app.pv-layout-transitioning .pv-right {
  will-change: opacity, transform;
}
.pv-app:not(.right-collapsed) .pv-right {
  transform: translateX(0);
}
.pv-app.right-collapsed .pv-right {
  transform: translateX(18px);
}

/* V4.8.1.3 — selector de colores locales legible en el panel lateral estrecho. */
.pv-left .pv-task-state-color-grid{
  grid-template-columns:minmax(0,1fr);
  gap:.5rem;
}
.pv-left .pv-task-state-color-grid label{
  width:100%;
  min-height:2.75rem;
  padding:.5rem .6rem;
}
.pv-left .pv-task-state-color-grid label > span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-left .pv-task-state-color-grid .form-control-color{
  flex:0 0 2.7rem;
}


/* V4.8.2.1 — filtros técnicos compactos de la cola de tareas. */
.pv-queue-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.35rem .4rem}
.pv-queue-filters .pv-queue-filter-wide{grid-column:1 / -1}
.pv-queue-filters .btn{grid-column:3;grid-row:3;align-self:end}
.pv-queue-filters select{min-width:0;text-overflow:ellipsis}
.pv-queue-filters label>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:420px){
  .pv-queue-filters{grid-template-columns:minmax(0,1fr) auto}
  .pv-queue-filters label:not(.pv-queue-filter-wide){grid-column:1 / -1}
  .pv-queue-filters .btn{grid-column:2;grid-row:auto}
}


/* Compatibilidad técnica de máquinas de impresión */
.pv-technical-modal .modal-dialog { max-width: 560px; }
.pv-technical-modal .form-text { font-size: .72rem; }
.pv-technical-modal .alert { font-size: .82rem; margin-bottom: 1rem; }

/* 4.8.4 · Autoplanificación individual */
.pv-card-autoplan{align-self:center;flex:0 0 30px;width:30px;height:30px;border:0;border-radius:9px;background:#eef4ff;color:#2563eb;display:grid;place-items:center;margin-left:auto;transition:.15s ease}
.pv-card-autoplan:hover{background:#dbe8ff;color:#164db8;transform:translateY(-1px)}
.pv-card-sort{margin-left:2px}
.pv-autoplan-planned{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border:1px solid #dfe7f3;border-radius:.75rem;background:#f8fbff;margin-bottom:1rem}.pv-autoplan-planned span{font-size:.73rem;text-transform:uppercase;letter-spacing:.08em;color:#64748b}.pv-autoplan-planned strong{text-align:right}
.pv-autoplan-section{border:1px solid #e2e8f0;border-radius:.75rem;padding:.75rem .85rem;margin:0 0 .85rem}.pv-autoplan-section legend{float:none;width:auto;margin:0 0 .45rem;padding:0 .25rem;font-size:.78rem;font-weight:700;color:#334155}.pv-autoplan-section>label{display:flex;align-items:center;gap:.5rem;margin:.42rem 0;font-size:.88rem}.pv-autoplan-manual .form-control{width:190px;margin-left:auto}
.pv-autoplan-result{border-radius:.75rem;padding:.8rem .9rem;display:flex;flex-direction:column;gap:.15rem;background:#f1f5f9;color:#475569}.pv-autoplan-result.is-ok{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}.pv-autoplan-result.is-error{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.pv-autoplan-result strong{font-size:.92rem}.pv-autoplan-result span{font-size:.82rem}

/* 4.8.5 - Planificación automática por Orden de trabajo */
.pv-card-autoorder{align-self:center;flex:0 0 30px;width:30px;height:30px;border:0;border-radius:9px;background:#eefbf6;color:#087f5b;display:grid;place-items:center;transition:.15s ease}
.pv-card-autoorder:hover{background:#d8f5e8;color:#056447;transform:translateY(-1px)}
.pv-autoorder-notice{display:flex;align-items:flex-start;gap:.7rem;padding:.75rem .85rem;margin-bottom:1rem;border:1px solid #dbe7f5;border-radius:.75rem;background:#f7faff;color:#334155;font-size:.85rem}
.pv-autoorder-notice>i{margin-top:.15rem;color:#2563eb}
.pv-autoorder-preview{display:flex;flex-direction:column;gap:.45rem;max-height:360px;overflow:auto;padding-right:.2rem}
.pv-autoorder-row{display:grid;grid-template-columns:32px minmax(180px,1fr) minmax(220px,1fr);align-items:center;gap:.65rem;padding:.6rem .7rem;border:1px solid #e2e8f0;border-radius:.7rem;background:#fff}
.pv-autoorder-row.is-error{border-color:#fed7aa;background:#fffaf5}
.pv-autoorder-seq{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#eef2ff;color:#3730a3;font-size:.76rem;font-weight:700}
.pv-autoorder-row>div{min-width:0;display:flex;flex-direction:column}
.pv-autoorder-row strong,.pv-autoorder-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-autoorder-row strong{font-size:.84rem;color:#1e293b}.pv-autoorder-row small{font-size:.76rem;color:#64748b}
.pv-autoorder-slot{text-align:right}
@media (max-width:767.98px){.pv-autoorder-row{grid-template-columns:30px 1fr}.pv-autoorder-slot{grid-column:2;text-align:left}.pv-card-autoorder{flex-basis:28px;width:28px;height:28px}}

/* 4.8.5.1 — ajuste visual de botones de autoplanificación y vista por órdenes */
.pv-card{
  min-width:0;
  max-width:100%;
}
.pv-card-main{
  overflow:hidden;
}
.pv-card-actions{
  align-self:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:8px 0 8px 4px;
  flex:0 0 34px;
}
.pv-card-actions .pv-card-autoplan,
.pv-card-actions .pv-card-autoorder{
  margin-left:0;
}
.pv-card-autoplan,
.pv-card-autoorder{
  width:28px;
  height:28px;
  border-radius:8px;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}
.pv-card-sort{
  flex:0 0 28px;
  width:28px;
  margin-left:0;
}
.pv-queue-group,
.pv-queue-group-cards,
.pv-queue-group-cards .pv-card,
.pv-queue-group-head,
.pv-queue-group-head>div,
.pv-queue-group-tools{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.pv-queue-group-cards{
  grid-template-columns:minmax(0,1fr);
}
.pv-queue-group-cards .pv-card{
  width:100%;
}
.pv-queue-group-tools{
  display:flex;
  align-items:center;
  gap:.45rem;
  justify-content:flex-end;
}
.pv-queue-group-autoorder{
  width:30px;
  height:30px;
  border:0;
  border-radius:9px;
  background:#eefbf6;
  color:#087f5b;
  display:grid;
  place-items:center;
  transition:.15s ease;
  flex:0 0 30px;
}
.pv-queue-group-autoorder:hover{
  background:#d8f5e8;
  color:#056447;
  transform:translateY(-1px);
}
@media (max-width:767.98px){
  .pv-card-actions{
    flex-basis:32px;
    padding-right:2px;
  }
  .pv-card-autoplan,
  .pv-card-autoorder,
  .pv-card-sort,
  .pv-queue-group-autoorder{
    width:27px;
    height:27px;
    border-radius:8px;
  }
}
.pv-queue-group-tools>em{font-style:normal;font-size:.67rem;font-weight:800;background:#fff;border:1px solid #d6e0ea;border-radius:99px;padding:.12rem .42rem}

/* 4.8.5.2 — pie completo de ficha y corrección de máquina prevista en autoplanificación */
.pv-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-rows:auto auto;
  gap:0 8px;
  align-items:stretch;
}
.pv-card-main{
  grid-column:1;
  grid-row:1;
}
.pv-card-actions{
  grid-column:2;
  grid-row:1;
}
.pv-card-sort{
  grid-column:3;
  grid-row:1 / span 2;
}
.pv-card-footer{
  grid-column:1 / 3;
  grid-row:2;
  min-width:0;
  padding:0 5px 10px 12px;
}
.pv-card-footer .pv-card-meta{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  width:100%;
  margin-top:0;
  overflow:visible;
}
.pv-card-footer .pv-chip{
  flex:0 0 auto;
  white-space:nowrap;
}
.pv-queue-group-cards .pv-card-footer{
  width:100%;
}
@media (max-width:767.98px){
  .pv-card{
    grid-template-columns:minmax(0,1fr) auto auto;
  }
  .pv-card-footer{
    padding-right:4px;
  }
  .pv-card-footer .pv-card-meta{
    gap:5px;
  }
}

/* 4.8.5.3 — persistencia de cola y Órdenes de trabajo plegables */
.pv-lane-head-right{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.45rem;
}
.pv-queue-order-fold-tools{
  display:flex;
  align-items:center;
  gap:.25rem;
}
.pv-queue-order-fold-tools[hidden]{display:none!important}
.pv-queue-order-fold-tools button,
.pv-queue-group-toggle{
  width:27px;
  height:27px;
  border:1px solid #d8e2ee;
  border-radius:8px;
  background:#fff;
  color:#64748b;
  display:grid;
  place-items:center;
  padding:0;
  transition:.15s ease;
}
.pv-queue-order-fold-tools button:hover,
.pv-queue-group-toggle:hover{
  background:#eef4fb;
  color:#245a9b;
  border-color:#c6d7ea;
}
.pv-queue-group-toggle i{transition:transform .16s ease}
.pv-queue-order.is-collapsed .pv-queue-group-toggle i{transform:rotate(-90deg)}
.pv-queue-order.is-collapsed .pv-queue-group-cards{display:none}
.pv-queue-order.is-collapsed .pv-queue-group-head{border-bottom:0}
.pv-queue-group-head{cursor:default}
.pv-queue-group-tools{display:flex!important;grid-auto-flow:column;align-items:center}
@media (max-width:520px){
  .pv-lane-head-right{gap:.25rem}
  .pv-queue-order-fold-tools button,.pv-queue-group-toggle{width:25px;height:25px}
}

/* 4.8.5.4 — modal de orden con un único scroll y ordenación por tamaño de OT */
.pv-autoorder-preview{
  max-height:none;
  overflow:visible;
  padding-right:0;
}
.pv-autoorder-notice{display:none!important}

/* 4.8.6 — planificación automática masiva del listado filtrado */
.pv-queue-batch-plan{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.28rem .5rem;
  border:1px solid #cfe0fb;
  border-radius:.55rem;
  background:#eef5ff;
  color:#245fa8;
  font-size:.68rem;
  font-weight:800;
  white-space:nowrap;
}
.pv-queue-batch-plan:hover{background:#dfeeff;color:#174d91}
.pv-autobatch-modal .modal-dialog{max-width:1180px}
.pv-autobatch-select{display:grid!important;grid-template-columns:1fr;align-items:stretch!important;gap:.35rem!important}
.pv-autobatch-select>span{font-size:.75rem;font-weight:700;color:#475569}
.pv-autobatch-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.pv-autobatch-summary>div{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem .85rem;border:1px solid #dce6f1;border-radius:.75rem;background:#f8fbff}
.pv-autobatch-summary>div.is-warning{border-color:#fed7aa;background:#fff8ee}
.pv-autobatch-summary strong{font-size:1.15rem;color:#173b68}.pv-autobatch-summary span{font-size:.75rem;color:#64748b}
.pv-autobatch-preview{display:flex;flex-direction:column;gap:.45rem}
.pv-autobatch-row{display:grid;grid-template-columns:32px minmax(210px,1fr) minmax(230px,.8fr);align-items:center;gap:.7rem;padding:.62rem .72rem;border:1px solid #e2e8f0;border-radius:.72rem;background:#fff}
.pv-autobatch-row.is-error{border-color:#fed7aa;background:#fffaf5}
.pv-autobatch-task{min-width:0;display:flex;flex-direction:column}.pv-autobatch-task strong,.pv-autobatch-task small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-autobatch-task strong{font-size:.84rem;color:#1e293b}.pv-autobatch-task small{font-size:.74rem;color:#64748b}
.pv-autobatch-task>div{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.25rem}.pv-autobatch-task em{font-style:normal;font-size:.6rem;padding:.1rem .3rem;border-radius:99px;background:#eef4ff;color:#315f9b}
@media (max-width:767.98px){
  .pv-queue-batch-plan span{display:none}
  .pv-autobatch-summary{grid-template-columns:1fr}
  .pv-autobatch-row{grid-template-columns:30px minmax(0,1fr)}
  .pv-autobatch-row .pv-autoorder-slot{grid-column:2;text-align:left}
}

/* 4.8.6.1 — refinado visual de cabeceras de cola y cierre de Fase 4 */
.pv-queue-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:.7rem;
}
.pv-lane-head-main{
  min-width:0;
  display:grid;
  gap:.18rem;
}
.pv-queue-head .pv-lane-title{
  line-height:1.05;
}
.pv-queue-head .pv-lane-hint{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:.16rem .52rem;
  border-radius:999px;
  border:1px solid #d6e3f1;
  background:#f7fbff;
  color:#5d6e84;
  font-size:.66rem;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-queue-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.4rem;
  flex-wrap:wrap;
}
.pv-queue-batch-plan{
  min-height:30px;
  padding:.35rem .62rem;
  border-radius:.65rem;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45);
}
.pv-queue-order-fold-tools{
  padding:.15rem;
  border:1px solid #d8e2ee;
  border-radius:.7rem;
  background:#f8fbff;
}

.pv-queue-group-head{
  grid-template-columns:minmax(0,1fr) auto;
  gap:.8rem;
  padding:.72rem .78rem;
  background:linear-gradient(180deg,#fbfdff,#f3f7fb);
}
.pv-queue-group-main{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:.65rem;
}
.pv-queue-group-copy{
  min-width:0;
  display:grid;
  gap:.08rem;
}
.pv-queue-group-label{
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#73839a;
}
.pv-queue-group-head strong{
  font-size:.86rem;
  line-height:1.15;
  color:#1f2f44;
}
.pv-queue-group-head small{
  line-height:1.3;
  max-width:100%;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-queue-group-tools{
  display:flex!important;
  align-items:center;
  justify-content:flex-end;
  gap:.35rem;
  align-self:center;
}
.pv-queue-group-count{
  min-width:1.8rem;
  height:1.8rem;
  padding:0 .5rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#fff;
  border:1px solid #d6e0ea;
  color:#223247;
  font-size:.72rem;
  font-weight:800;
}
.pv-queue-group-autoorder{
  width:30px;
  height:30px;
  border-radius:9px;
}
.pv-queue-group-toggle{
  width:30px;
  height:30px;
  border-radius:9px;
}

.pv-autobatch-summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.pv-autobatch-summary>div strong{white-space:nowrap}
.pv-autobatch-row.is-ok{
  border-color:#d8e7fb;
  background:#fcfdff;
}
.pv-autobatch-task em:last-child{
  max-width:100%;
}

@media (max-width: 767.98px){
  .pv-queue-head{
    grid-template-columns:1fr;
  }
  .pv-queue-head-actions{
    justify-content:flex-start;
  }
  .pv-queue-head .pv-lane-hint{
    width:100%;
  }
  .pv-queue-group-head{
    grid-template-columns:1fr;
  }
  .pv-queue-group-tools{
    justify-content:flex-start;
  }
  .pv-autobatch-summary{
    grid-template-columns:1fr;
  }
}

/* 4.8.6.2 — ajuste fino de cabeceras de cola y órdenes */
.pv-queue-head{
  display:grid;
  gap:.55rem;
}
.pv-queue-head-top{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
}
.pv-queue-head-top .pv-lane-title{
  width:100%;
  text-align:center;
}
.pv-queue-head-top .pv-queue-order-fold-tools{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
}
.pv-queue-head-bottom{
  display:flex;
  align-items:center;
  gap:.45rem;
  min-width:0;
}
.pv-queue-head-bottom .pv-queue-batch-plan{
  flex:0 0 auto;
}
.pv-queue-head-bottom .pv-lane-hint{
  flex:1 1 auto;
  width:auto;
  min-width:0;
  justify-content:flex-start;
}
.pv-queue-order-fold-tools{
  gap:.18rem;
  padding:.12rem;
  border-radius:.62rem;
}
.pv-queue-order-fold-tools button{
  width:24px;
  height:24px;
  border-radius:7px;
}

.pv-queue-group-head{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:.65rem;
  position:relative;
}
.pv-queue-group-main{
  min-width:0;
  display:grid;
  gap:.12rem;
}
.pv-queue-group-overline{
  display:flex;
  align-items:center;
  gap:.35rem;
  min-width:0;
}
.pv-queue-group-overline .pv-queue-group-icon{
  width:1.5rem;
  height:1.5rem;
  border-radius:.42rem;
  flex:0 0 auto;
}
.pv-queue-group-label{
  line-height:1;
}
.pv-queue-group-tools{
  align-self:stretch;
}
.pv-queue-group-rail{
  display:grid;
  grid-template-columns:1fr;
  justify-items:end;
  align-content:start;
  gap:.28rem;
}
.pv-queue-group-count{
  min-width:1.3rem;
  height:1.3rem;
  padding:0 .34rem;
  font-size:.64rem;
  font-weight:700;
  color:#5f6f85;
  border-color:#dce4ee;
  background:#f8fbff;
}
.pv-queue-group-autoorder{
  width:28px;
  height:28px;
  border:0;
  border-radius:8px;
  background:#eefbf6;
  color:#087f5b;
  display:grid;
  place-items:center;
  box-shadow:inset 0 0 0 1px rgba(16,185,129,.1);
}
.pv-queue-group-autoorder:hover{
  background:#d8f5e8;
  color:#056447;
  transform:translateY(-1px);
}
.pv-queue-group-toggle{
  width:22px;
  height:22px;
  border-radius:7px;
  justify-self:end;
}
.pv-queue-group-copy{display:contents}

@media (max-width: 767.98px){
  .pv-queue-head-top{
    justify-content:flex-start;
    padding-right:0;
    min-height:auto;
    gap:.45rem;
  }
  .pv-queue-head-top .pv-lane-title{
    text-align:left;
  }
  .pv-queue-head-top .pv-queue-order-fold-tools{
    position:static;
    transform:none;
    margin-left:auto;
  }
  .pv-queue-head-bottom{
    flex-wrap:wrap;
  }
  .pv-queue-head-bottom .pv-lane-hint{
    flex-basis:100%;
  }
}

/* 4.8.6.3 — corrección de regresión en la cabecera de la cola */
.pv-lane-head.pv-queue-head{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-auto-flow:row;
  align-items:stretch;
  justify-content:stretch;
  gap:.5rem;
}
.pv-lane-head.pv-queue-head > .pv-queue-head-top,
.pv-lane-head.pv-queue-head > .pv-queue-head-bottom{
  width:100%;
  min-width:0;
}
.pv-lane-head.pv-queue-head > .pv-queue-head-top{
  grid-column:1;
  grid-row:1;
}
.pv-lane-head.pv-queue-head > .pv-queue-head-bottom{
  grid-column:1;
  grid-row:2;
}
.pv-queue-head-top .pv-lane-title{
  padding:0 3.75rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pv-queue-head-bottom{
  justify-content:stretch;
}
.pv-queue-head-bottom .pv-lane-hint{
  max-width:none;
  /*margin:clamp(1rem,10vh,5rem) auto 1.75rem;*/
}
@media (max-width:520px){
  .pv-queue-head-top .pv-lane-title{
    padding-left:0;
    padding-right:3.4rem;
    text-align:left;
  }
}

/* 4.8.6.4 — cabecera de Orden de trabajo según referencia visual */
.pv-queue-group-head{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:.75rem;
  padding:.78rem .85rem;
  background:linear-gradient(180deg,#fbfdff,#f4f7fb);
}
.pv-queue-group-main{
  min-width:0;
  display:grid;
  gap:.18rem;
}
.pv-queue-group-overline{
  display:flex;
  align-items:center;
  gap:.5rem;
  min-width:0;
}
.pv-queue-group-overline .pv-queue-group-icon{
  width:1.65rem;
  height:1.65rem;
  border-radius:.45rem;
  background:#e6eefb;
  color:#3a6aa7;
}
.pv-queue-group-label{
  display:inline-block;
  line-height:1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#71829a;
}
.pv-queue-group-head strong{
  line-height:1.1;
  color:#1f2f45;
}
.pv-queue-group-head small{
  display:block;
  line-height:1.25;
  color:#74839a;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-queue-group-tools-order{
  display:grid!important;
  grid-template-columns:auto auto;
  grid-template-rows:auto auto;
  align-items:center;
  justify-items:end;
  gap:.38rem .42rem;
  align-self:stretch;
}
.pv-queue-group-tools-order .pv-queue-group-count{
  grid-column:1;
  grid-row:1;
  min-width:1.55rem;
  height:1.55rem;
  padding:0 .42rem;
  border-radius:999px;
  background:#f8fbff;
  border:1px solid #d7e1ec;
  color:#6c7b90;
  font-size:.72rem;
  font-weight:800;
}
.pv-queue-group-tools-order .pv-queue-group-toggle{
  grid-column:2;
  grid-row:1;
  width:28px;
  height:28px;
  border:1px solid #d8e2ee;
  border-radius:9px;
  background:#fff;
  color:#708095;
}
.pv-queue-group-tools-order .pv-queue-group-toggle:hover{
  background:#eef4fb;
  color:#245a9b;
  border-color:#c6d7ea;
}
.pv-queue-group-tools-order .pv-queue-group-autoorder{
  grid-column:1;
  grid-row:2;
  width:30px;
  height:30px;
  border-radius:10px;
  justify-self:end;
}
.pv-queue-order.is-collapsed .pv-queue-group-toggle i{
  transform:rotate(0deg);
}
.pv-queue-order:not(.is-collapsed) .pv-queue-group-toggle i{
  transform:rotate(90deg);
}
@media (max-width:767.98px){
  .pv-queue-group-head{
    padding:.72rem .78rem;
  }
  .pv-queue-group-label{
    font-size:.72rem;
  }
  .pv-queue-group-head strong{
    font-size:.96rem;
  }
  .pv-queue-group-head small{
    font-size:.75rem;
  }
}

/* 4.8.6.5 — panel lateral de tareas unificado */
.pv-queue-view-tabs--persistent{
  flex:0 0 auto;
  margin:0 14px 8px;
  box-shadow:0 2px 8px rgba(31,50,73,.04);
}
.pv-queue-controls{
  margin-top:0;
}
.pv-queue-controls .pv-queue-collapsible-body{
  background:#fff;
}
.pv-queue-controls-body{
  display:grid;
  gap:0;
}
.pv-queue-controls-group{
  display:grid;
  gap:.55rem;
  padding:.65rem .7rem .72rem;
}
.pv-queue-controls-group + .pv-queue-controls-group{
  border-top:1px solid #e4eaf1;
}
.pv-queue-controls-group--sort{
  background:#fbfdff;
}
.pv-queue-controls-group--filter{
  background:#fff;
}
.pv-queue-controls-group-head{
  /*display:flex;*/
  display: none;
  align-items:center;
  gap:.42rem;
  min-width:0;
}
.pv-queue-controls-group-head strong{
  font-size:.66rem;
  line-height:1;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#66788e;
}
.pv-queue-controls-group-icon{
  width:1.45rem;
  height:1.45rem;
  display:grid;
  place-items:center;
  border-radius:.42rem;
  background:#edf4fc;
  color:#3972b5;
  font-size:.66rem;
  flex:0 0 auto;
}
.pv-queue-controls .pv-backlog-controls,
.pv-queue-controls .pv-queue-filters{
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
}
.pv-queue-controls .pv-backlog-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.42rem;
  align-items:end;
}
.pv-queue-controls .pv-backlog-sort{
  min-width:0;
}
.pv-queue-controls .pv-backlog-limit{
  min-width:72px;
}
.pv-queue-controls .pv-backlog-counter{
  grid-column:1 / -1;
  justify-content:flex-start;
  margin-top:.05rem;
}
.pv-queue-controls .pv-queue-filters{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:.38rem .42rem;
  align-items:end;
}
.pv-queue-controls .pv-queue-filters .pv-queue-filter-wide{
  grid-column:1 / -1;
}
.pv-queue-controls .pv-queue-filters .btn{
  grid-column:3;
  grid-row:3;
  align-self:end;
}
.pv-queue-controls .pv-queue-filters select{
  min-width:0;
  text-overflow:ellipsis;
}
@media (max-width:520px){
  .pv-queue-view-tabs--persistent{
    margin-left:10px;
    margin-right:10px;
  }
  .pv-queue-controls .pv-backlog-controls{
    grid-template-columns:minmax(0,1fr) 72px;
  }
  .pv-queue-controls .pv-queue-filters{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .pv-queue-controls .pv-queue-filters label:not(.pv-queue-filter-wide){
    grid-column:1 / -1;
  }
  .pv-queue-controls .pv-queue-filters .btn{
    grid-column:2;
    grid-row:auto;
  }
}

/* 4.8.6.8 — estado visual determinista por agrupador */
.pv-queue-group-head{
  position:relative;
  padding-right:3.1rem;
}
.pv-queue-group-tools-order{
  position:absolute;
  top:.55rem;
  right:.55rem;
  display:grid!important;
  grid-template-columns:auto auto;
  grid-template-rows:auto auto;
  gap:.28rem .34rem;
  align-items:center;
  justify-items:end;
}
.pv-queue-group-tools-order .pv-queue-group-toggle{
  grid-column:2;
  grid-row:1;
  width:20px;
  height:20px;
  min-width:20px;
  border-radius:6px;
  font-size:.62rem;
  box-shadow:none;
}
.pv-queue-group-tools-order .pv-queue-group-count{
  grid-column:1;
  grid-row:1;
  min-width:1.25rem;
  height:1.25rem;
  padding:0 .3rem;
  font-size:.61rem;
  font-weight:700;
}
.pv-queue-group-tools-order .pv-queue-group-autoorder{
  grid-column:1 / span 2;
  grid-row:2;
  width:28px;
  height:28px;
  border-radius:8px;
  margin-top: 1rem;
}

#pvPendingList .pv-card--task-view{
  grid-template-columns:minmax(0,1fr) auto auto;
  column-gap:8px;
}
#pvPendingList .pv-card--task-view .pv-card-main{
  grid-column:1;
}
#pvPendingList .pv-card--task-view .pv-card-actions--autoplan{
  grid-column:2;
  display:flex!important;
}
#pvPendingList .pv-card--task-view .pv-card-autoplan{
  display:grid!important;
}
#pvPendingList .pv-card--task-view .pv-card-sort{
  grid-column:3;
  display:flex!important;
  flex-wrap: wrap;
  align-items: center;
}
#pvPendingList .pv-card--task-view .pv-card-footer{
  grid-column:1 / 3;
}

#pvPendingList .pv-card--order-view{
  grid-template-columns:minmax(0,1fr);
  column-gap:0;
}
#pvPendingList .pv-card--order-view .pv-card-main,
#pvPendingList .pv-card--order-view .pv-card-footer{
  grid-column:1;
}
#pvPendingList .pv-card--order-view .pv-card-actions,
#pvPendingList .pv-card--order-view .pv-card-sort{
  display:none!important;
}


/* 4.8.6.9 — feedback visual en planificación automática masiva */
.pv-autobatch-modal .modal-content{position:relative;overflow:hidden}
.pv-autobatch-busy[hidden]{display:none!important}
.pv-autobatch-busy{
  position:absolute;
  inset:0;
  z-index:1085;
  display:grid;
  place-items:center;
  padding:1.25rem;
  background:rgba(245,248,252,.82);
  backdrop-filter:blur(2px);
}
.pv-autobatch-busy-card{
  width:min(430px,100%);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:.45rem .7rem;
  padding:1rem 1.1rem;
  border:1px solid #d8e4f1;
  border-radius:.9rem;
  background:#fff;
  box-shadow:0 16px 42px rgba(30,58,92,.18);
}
.pv-autobatch-busy-card>.spinner-border{grid-row:1 / span 2;color:#2563eb}
.pv-autobatch-busy-card>strong{font-size:.9rem;color:#1e3553}
.pv-autobatch-busy-card>small{font-size:.74rem;color:#64748b}
.pv-autobatch-busy-card>.progress{grid-column:1 / -1;height:.42rem;margin-top:.3rem;background:#e7eef7}
.pv-autobatch-cancel{
  grid-column:1 / -1;
  justify-self:end;
  margin-top:.2rem;
  min-width:9.5rem;
}
.pv-autobatch-placeholder{
  min-height:110px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  color:#64748b;
  font-size:.82rem;
  border:1px dashed #d6e2ef;
  border-radius:.75rem;
  background:#f8fbff;
}
.pv-autobatch-strategy-help{
  display:block;
  min-height:2.2em;
  font-size:.68rem;
  line-height:1.35;
  color:#64748b;
}
#pvAutoBatchApply .spinner-border,
#pvAutoBatchOpen .spinner-border{margin-right:.3rem}
.pv-autobatch-delivery-status{
  display:block;
  margin-top:.15rem;
  padding:.32rem .45rem;
  border-radius:.5rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  font-size:.66rem;
  line-height:1.35;
  color:#64748b;
}

/* 4.8.7.1 — filtro por fechas de publicación y ventanas previstas */
.pv-queue-date-filter{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);
  gap:.38rem .42rem;
  padding:.48rem;
  border:1px solid #e1e8f0;
  border-radius:.65rem;
  background:#f8fbff;
}
.pv-queue-date-filter label{
  min-width:0;
}
.pv-queue-date-filter input,
.pv-queue-date-filter select{
  min-width:0;
}
.pv-queue-date-filter input:disabled{
  background:#eef2f6;
  color:#8a96a6;
  opacity:.78;
}
.pv-queue-controls .pv-queue-filters .pv-queue-date-filter{
  grid-column:1 / -1;
}
.pv-queue-controls .pv-queue-filters .btn{
  grid-column:3;
  grid-row:4;
}
@media (max-width:520px){
  .pv-queue-date-filter{
    grid-template-columns:1fr 1fr;
  }
  .pv-queue-date-filter label:first-child{
    grid-column:1 / -1;
  }
  .pv-queue-controls .pv-queue-filters .btn{
    grid-column:2;
    grid-row:auto;
  }
}

/* 4.8.7.3 — formato global personalizable de fecha y hora */
.pv-config-date-format{grid-column:span 2}
.pv-config-date-format-preview{
  display:block;
  margin-top:.28rem;
  min-height:1rem;
  color:#64748b;
  font-size:.72rem;
  font-weight:600;
}
@media (max-width:767.98px){
  .pv-config-date-format{grid-column:span 1}
}

/* 4.8.7.4 — legibilidad de los filtros de fecha en panel estrecho */
.pv-queue-date-filter{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:.34rem .42rem;
}
.pv-queue-date-filter label:first-child{
  grid-column:1 / -1;
}
.pv-queue-date-filter label > span{
  
  line-height:1.1;
  letter-spacing:.035em;
}
.pv-queue-date-filter input[type="date"],
.pv-queue-date-filter select{
  width:100%;
  min-width:0;
  height:30px;
  padding:.24rem .36rem;
  
  line-height:1.1;
  letter-spacing:-.015em;
}
.pv-queue-date-filter input[type="date"]{
  color-scheme:light;
  font-variant-numeric:tabular-nums;
}
.pv-queue-date-filter input[type="date"]::-webkit-calendar-picker-indicator{
  margin:0;
  padding:0;
  width:15px;
  height:15px;
}
@media (max-width:420px){
  .pv-queue-date-filter{
    grid-template-columns:1fr;
  }
  .pv-queue-date-filter label:first-child{
    grid-column:auto;
  }
}

/* 4.8.7.4 — progreso detallado y ejecución en segundo plano */
.pv-autobatch-busy-card{width:min(560px,100%);grid-template-columns:auto minmax(0,1fr)}
.pv-autobatch-live-summary{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;margin-top:.35rem}
.pv-autobatch-live-summary>div{display:flex;flex-direction:column;padding:.48rem .58rem;border:1px solid #e2eaf3;border-radius:.55rem;background:#f8fafc;min-width:0}
.pv-autobatch-live-summary span,.pv-autobatch-recent>span{font-size:.62rem;text-transform:uppercase;letter-spacing:.05em;color:#7b8ca2;font-weight:700}
.pv-autobatch-live-summary strong{font-size:.76rem;color:#263d59;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-autobatch-recent{grid-column:1/-1;padding:.5rem .58rem;border:1px solid #e2eaf3;border-radius:.55rem;background:#fbfdff}
.pv-autobatch-recent>div{display:flex;flex-direction:column;gap:.16rem;margin-top:.25rem;max-height:4.7rem;overflow:auto}
.pv-autobatch-recent>div>span{font-size:.7rem;color:#36516f}.pv-autobatch-recent i{color:#16a34a;margin-right:.35rem}.pv-autobatch-recent .is-muted{color:#94a3b8}
.pv-autobatch-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:.45rem;margin-top:.2rem}
.pv-autobatch-busy-card>.progress{overflow:hidden}.pv-autobatch-busy-card>.progress .progress-bar{transition:width .18s linear}
.pv-autobatch-floating[hidden]{display:none!important}
.pv-autobatch-floating{position:fixed;right:1rem;bottom:2.15rem;z-index:1095;width:min(390px,calc(100vw - 2rem));display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.45rem .55rem;align-items:center;padding:.7rem .8rem;border:1px solid #cfdceb;border-radius:.8rem;background:#fff;box-shadow:0 12px 34px rgba(15,35,60,.22)}
.pv-autobatch-floating>div:first-child{display:flex;flex-direction:column;min-width:0}.pv-autobatch-floating strong{font-size:.78rem;color:#203954}.pv-autobatch-floating small{font-size:.66rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pv-autobatch-floating>.progress{grid-column:1/-1;height:.32rem;background:#e7eef7}
@media(max-width:575.98px){.pv-autobatch-live-summary{grid-template-columns:1fr}.pv-autobatch-actions{flex-wrap:wrap}.pv-autobatch-actions .btn{flex:1 1 auto}}


/* 2026-07-23 · presencia compacta, indicadores de máquina y vista de control */
.pv-machine-presence .pv-presence-count{display:inline-flex;align-items:center;gap:3px;min-width:25px;width:auto;padding:0 5px;border-radius:6px;font-size:9px}
.pv-machine-presence .pv-presence-count b{font-size:9px}
.pv-machine-head .pv-machine-overlap-indicator{position:absolute!important;top:.2rem;right:0rem;border-radius:6px}
.pv-machine-head .pv-machine-shift-indicator{position:absolute!important;top:1.9rem;right:0rem;margin:0!important;border-radius:6px;width:19px;height:19px}
.pv-machine-head{position:relative;padding-right:28px}
body.pv-control-view .pv-rail,body.pv-control-view .pv-left,body.pv-control-view .pv-sidebar,body.pv-control-view .pv-desktopbar,body.pv-control-view .pv-right,body.pv-control-view .pv-statusbar,body.pv-control-view .pv-hscroll{display:none!important}
.pv-control-bar{display:none}
body.pv-control-view .pv-control-bar{display:flex!important;position:fixed;inset:0 0 auto 0;height:52px;z-index:3000;align-items:center;justify-content:space-between;gap:1rem;padding:.35rem .75rem;background:#fff;border-bottom:1px solid #d7e1ed;box-shadow:0 2px 9px rgba(15,23,42,.08)}
.pv-control-brand{display:flex;align-items:center;gap:.6rem;min-width:0}.pv-control-brand img{width:34px;height:34px;object-fit:contain;border-radius:8px}.pv-control-brand div{display:flex;flex-direction:column;min-width:0}.pv-control-brand strong{font-size:.86rem;color:#10233c}.pv-control-brand span{font-size:.7rem;color:#64748b;white-space:nowrap}
.pv-control-notice{display:flex;align-items:center;justify-content:center;gap:.45rem;min-width:0;color:#42556f;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pv-control-notice i{color:#2563eb}
.pv-control-meta{display:flex;align-items:center;gap:.55rem;color:#334155;font-size:.78rem;font-weight:700}.pv-control-meta button{width:30px;height:30px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#334155}
body.pv-control-view .pv-app{display:block!important;width:100vw!important;height:100vh!important}
body.pv-control-view .pv-main{position:fixed!important;inset:52px 0 0 0!important;margin:0!important;width:100vw!important;height:calc(100vh - 52px)!important;max-width:none!important;padding:0!important}
body.pv-control-view .pv-board{position:fixed!important;inset:52px 0 0 0!important;margin:0!important;width:100vw!important;height:calc(100vh - 52px)!important;max-width:none!important;border-radius:0!important}
body.pv-control-view .pv-viewport{height:calc(100vh - 52px - var(--pv-board-head-h,56px) - var(--pv-navigator-h,40px))!important}
body.pv-control-view .pv-navigator{display:flex!important;position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:8!important}

.pv-presence-person{align-items:flex-start}.pv-presence-person-main{flex:1;min-width:0}.pv-presence-session-meta{display:flex;flex-wrap:wrap;gap:.2rem .55rem;margin-top:.28rem;color:#64748b;font-size:.63rem}.pv-presence-session-actions{display:flex;gap:.3rem;margin-top:.4rem}.pv-presence-session-actions button{border:1px solid #cbd5e1;background:#fff;border-radius:.4rem;padding:.25rem .42rem;font-size:.64rem;color:#334155}.pv-presence-session-actions button.is-danger{color:#b42318;border-color:#fecaca}.pv-presence-session-actions button:hover{background:#f8fafc}

/* 2026-07-23 · fecha en vista de control y metadatos compactos */
.pv-control-datetime{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05;white-space:nowrap}
.pv-control-datetime #pvControlDate{font-size:.62rem;font-weight:600;color:#64748b;text-transform:capitalize}
.pv-control-datetime #pvControlClock{font-size:.82rem;font-weight:800;color:#334155;margin-top:.14rem}

/* 2026-07-23 — el helper de arrastre refleja la duración calculada para la máquina destino. */
.pv-drag-helper-compact{transition:width .12s ease}
.pv-drag-helper-compact.is-recalculated{outline:1px solid rgba(37,99,235,.35)}

/* 4.8.7.8 · Velocidad media discreta en la ficha de máquina */
.pv-machine-speed{
  display:block;
  margin-top:.08rem;
  max-width:calc(100% - .25rem);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#718096;
  font-size:.62rem;
  line-height:1.05;
  font-style:normal;
}
.pv-machine-speed i{font-size:.58rem;opacity:.72}


/* 4.8.7.9 · La velocidad media comparte la línea descriptiva para no aumentar la altura de la ficha. */
.pv-machine-speed-inline{
  color:#64748b;
  font-size:.95em;
  font-weight:600;
  white-space:nowrap;
}
.pv-machine-speed-inline i{font-size:.82em;opacity:.72}

/* 2026-07-24 — indicador inequívoco de filtros activos en la cola. */
.pv-lane-head.pv-queue-head > .pv-queue-filter-status{
  grid-column:1;
  grid-row:3;
}
.pv-queue-filter-status[hidden]{display:none!important}
.pv-queue-filter-status{
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  gap:.5rem;
  padding:.46rem .52rem;
  border:1px solid #8eb8ee;
  border-left:4px solid #2563eb;
  border-radius:.68rem;
  background:linear-gradient(180deg,#f3f8ff,#eaf3ff);
  box-shadow:0 2px 7px rgba(37,99,235,.09);
  color:#1e4f94;
}
.pv-queue-filter-status-icon{
  flex:0 0 1.65rem;
  width:1.65rem;
  height:1.65rem;
  display:grid;
  place-items:center;
  border-radius:.5rem;
  background:#d9e9ff;
  color:#1d5fc4;
  font-size:.72rem;
}
.pv-queue-filter-status-copy{
  flex:1 1 auto;
  min-width:0;
  display:grid;
  gap:.08rem;
}
.pv-queue-filter-status-title{
  display:flex;
  align-items:center;
  gap:.38rem;
  min-width:0;
}
.pv-queue-filter-status-title strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.68rem;
  line-height:1.1;
  letter-spacing:.085em;
  text-transform:uppercase;
}
.pv-queue-filter-status-title b{
  flex:0 0 auto;
  min-width:1.25rem;
  height:1.25rem;
  padding:0 .34rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-size:.64rem;
}
.pv-queue-filter-status-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#53729c;
  font-size:.65rem;
  line-height:1.2;
}
#pvQueueFilterClear{
  flex:0 0 auto;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  gap:.32rem;
  padding:.28rem .48rem;
  border:1px solid #aac8ee;
  border-radius:.52rem;
  background:#fff;
  color:#1c5ebc;
  font-size:.65rem;
  font-weight:750;
}
#pvQueueFilterClear:hover,#pvQueueFilterClear:focus-visible{
  border-color:#639be0;
  background:#f8fbff;
  color:#154b98;
}
.pv-backlog-lane.is-filtered{
  border-color:#9cbde6;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.07);
}
@media (max-width:420px){
  #pvQueueFilterClear span{display:none}
  #pvQueueFilterClear{width:30px;justify-content:center;padding:.25rem}
}

/* 2026-07-24 · Reduce el espacio vertical de la cabecera de la cola. */
.pv-lane-head.pv-queue-head{
  gap:.24rem;
}
.pv-queue-head-top{
  min-height:18px;
}
.pv-queue-head-top:has(.pv-queue-order-fold-tools:not([hidden])){
  min-height:28px;
}

/* 4.8.8 — deshacer split persistente */
.pv-card-actions .pv-card-undo-split,
.pv-card-actions--undo-split .pv-card-undo-split{
  width:28px;
  height:28px;
  border:0;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:#fff7ed;
  color:#c2410c;
  box-shadow:inset 0 0 0 1px rgba(194,65,12,.16);
  transition:background-color .15s ease,color .15s ease,transform .15s ease;
}
.pv-card-actions .pv-card-undo-split:hover,
.pv-card-actions--undo-split .pv-card-undo-split:hover{
  background:#ffedd5;
  color:#9a3412;
  transform:translateY(-1px);
}
#pvPendingList .pv-card--order-view.pv-card--has-undo-split{
  grid-template-columns:minmax(0,1fr) auto;
  column-gap:6px;
}
#pvPendingList .pv-card--order-view .pv-card-actions--undo-split{
  grid-column:2;
  grid-row:1 / span 2;
  display:flex!important;
  align-self:center;
  padding:4px 4px 4px 0;
}
#pvPendingList .pv-card--order-view .pv-card-actions--undo-split + .pv-card-footer,
#pvPendingList .pv-card--order-view.pv-card--has-undo-split .pv-card-footer{
  grid-column:1;
}
@media (max-width:767.98px){
  .pv-card-actions .pv-card-undo-split,
  .pv-card-actions--undo-split .pv-card-undo-split{
    width:27px;
    height:27px;
  }
}


/* 2026-07-24 · Avisos operativos persistentes y navegación al origen */
.pv-toast-item .pv-toast-action-btn {
  grid-column: 2 / -1;
  justify-self: start;
  width: auto;
  min-width: 0;
  height: 1.7rem;
  padding: 0 .65rem;
  border-radius: 999rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: var(--pv-fs-10);
  font-weight: 900;
  white-space: nowrap;
}

.pv-toast-item .pv-toast-action-btn:hover,
.pv-toast-item .pv-toast-action-btn:focus-visible {
  background: rgba(255,255,255,.34);
  outline: 2px solid rgba(255,255,255,.72);
  outline-offset: 1px;
}

.pv-toast-item .pv-toast-action-btn span {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.pv-task.pv-issue-target {
  z-index: 40 !important;
  animation: pvIssueTargetPulse .75s ease-in-out 4;
}

.pv-row.pv-issue-row-target .pv-machine {
  animation: pvIssueRowPulse .75s ease-in-out 4;
}

.pv-card.pv-issue-target {
  animation: pvIssueCardPulse .75s ease-in-out 4;
}

@keyframes pvIssueTargetPulse {
  0%, 100% { box-shadow: var(--shadow-sm); outline: 0 solid rgba(245,158,11,0); }
  50% { box-shadow: 0 0 0 5px rgba(245,158,11,.28), 0 10px 26px rgba(15,23,42,.28); outline: 2px solid #f59e0b; }
}

@keyframes pvIssueRowPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: inset 0 0 0 2px #f59e0b, 0 0 0 3px rgba(245,158,11,.18); }
}

@keyframes pvIssueCardPulse {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: 0 0 0 3px #f59e0b, 0 10px 24px rgba(15,23,42,.2); }
}

@media (prefers-reduced-motion: reduce) {
  .pv-task.pv-issue-target,
  .pv-row.pv-issue-row-target .pv-machine,
  .pv-card.pv-issue-target {
    animation: none;
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
  }
}

/* 4.8.8.3 — tareas nativas sin compatibilidad técnica y eliminación definitiva */
.pv-card-actions .pv-card-delete-local,
.pv-card-actions--delete-local .pv-card-delete-local{
  width:28px;
  height:28px;
  border:0;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:#fff1f2;
  color:#be123c;
  box-shadow:inset 0 0 0 1px rgba(190,18,60,.15);
  transition:background-color .15s ease,color .15s ease,transform .15s ease;
}
.pv-card-actions .pv-card-delete-local:hover,
.pv-card-actions--delete-local .pv-card-delete-local:hover{
  background:#ffe4e6;
  color:#9f1239;
  transform:translateY(-1px);
}
#pvPendingList .pv-card--order-view.pv-card--has-delete-local{
  grid-template-columns:minmax(0,1fr) auto;
  column-gap:6px;
}
#pvPendingList .pv-card--order-view .pv-card-actions--delete-local{
  grid-column:2;
  grid-row:1 / span 2;
  display:flex!important;
  align-self:center;
  padding:4px 4px 4px 0;
}
#pvPendingList .pv-card--order-view.pv-card--has-delete-local .pv-card-footer{
  grid-column:1;
}
#pvTaskDeleteLocal[hidden]{display:none!important}
@media (max-width:767.98px){
  .pv-card-actions .pv-card-delete-local,
  .pv-card-actions--delete-local .pv-card-delete-local{
    width:27px;
    height:27px;
  }
}

/* V4.8.9.1 — menús contextuales planos y compactos */
.pv-context-menu {
  min-width: 238px;
  max-width: min(330px, calc(100vw - 16px));
  padding: .28rem;
  border-radius: 12px;
}

.pv-context-menu .pv-menu-title {
  padding: .28rem .44rem .34rem;
  font-size: var(--pv-menu-section-font-size);
  line-height: 1.15;
}

.pv-context-menu .pv-menu-item {
  grid-template-columns: 14px 18px minmax(0, 1fr) auto;
  gap: .34rem;
  min-height: 29px;
  padding: .30rem .42rem;
  border-radius: 8px;
  font-size: var(--pv-menu-compact-font-size);
  line-height: 1.12;
}

.pv-context-menu .pv-menu-check {
  width: 14px;
}

.pv-context-menu .pv-menu-item > i:not(.pv-menu-check) {
  font-size: var(--pv-fs-10);
}

.pv-context-menu .pv-menu-sep {
  margin: .18rem .28rem;
}


/* V4.8.9.2 — menús superiores prioritariamente planos y compactos */
.pv-top-menu {
  min-width: 248px;
  padding: .32rem;
  border-radius: 12px;
}

.pv-top-menu .pv-menu-title {
  padding: .30rem .46rem .36rem;
  font-size: var(--pv-menu-title-font-size);
  line-height: 1.15;
}

.pv-top-menu .pv-menu-section {
  padding: .38rem .46rem .14rem;
  font-size: var(--pv-menu-section-font-size);
  line-height: 1.1;
}

.pv-top-menu .pv-menu-section:first-of-type {
  padding-top: .16rem;
}

.pv-top-menu .pv-menu-item {
  grid-template-columns: 16px 20px minmax(0, 1fr) auto;
  gap: .38rem;
  min-height: 31px;
  padding: .34rem .46rem;
  border-radius: 8px;
  font-size: var(--pv-menu-font-size);
  line-height: 1.15;
}

.pv-top-menu .pv-menu-check {
  width: 16px;
}

.pv-top-menu .pv-menu-item > i:not(.pv-menu-check):not(.pv-menu-chevron) {
  font-size: var(--pv-menu-compact-font-size);
}

.pv-top-menu .pv-menu-sep {
  margin: .20rem .30rem;
}

/* 2026-07-27 · Consolidación de estados de cola y helper de relaciones */
.pv-config-task-visibility{
  display:grid;
  gap:.4rem;
  padding:.65rem .75rem;
  border:1px solid var(--line);
  border-radius:.65rem;
  background:var(--soft);
}
.pv-config-task-visibility>strong{font-size:.78rem;font-weight:700}
.pv-config-task-visibility>small{color:var(--muted);font-size:.72rem;line-height:1.3}

.pv-relation-draw-helper{
  position:fixed;
  z-index:10080;
  display:none;
  width:min(300px,calc(100vw - 24px));
  padding:.48rem .58rem;
  border:1px solid rgba(37,99,235,.38);
  border-radius:.55rem;
  background:var(--panel);
  box-shadow:0 8px 22px rgba(15,23,42,.18);
  color:var(--ink);
  pointer-events:none;
  transform:translateY(3px);
  opacity:0;
  transition:opacity .08s ease,transform .08s ease,border-color .08s ease;
}
.pv-relation-draw-helper.is-visible{opacity:1;transform:none}
.pv-relation-draw-helper strong,
.pv-relation-draw-helper span,
.pv-relation-draw-helper small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-relation-draw-helper strong{font-size:.76rem;color:#1d4ed8}
.pv-relation-draw-helper span{margin-top:.12rem;font-size:.74rem;font-weight:600}
.pv-relation-draw-helper small{margin-top:.12rem;color:var(--muted);font-size:.67rem}
.pv-relation-draw-helper.is-target{border-color:rgba(22,163,74,.55)}
.pv-relation-draw-helper.is-target strong{color:#15803d}
.pv-relation-draw-helper.is-invalid{border-color:rgba(220,38,38,.55)}
.pv-relation-draw-helper.is-invalid strong,
.pv-relation-draw-helper.is-invalid small{color:#b91c1c}


/* 2026-07-27 · Helper magnético para creación visual de relaciones */
body.pv-task-interaction-active.pv-connecting-dependency #pvDependencySvg{
  visibility:visible !important;
}
body.pv-connecting-dependency .pv-dep-line.draft{
  stroke:var(--pv-relation-line-color);
  stroke-dasharray:none;
  opacity:1;
}
body.pv-connecting-dependency .pv-task.is-relation-target-start{
  box-shadow:inset 5px 0 0 rgba(37,99,235,.72),0 0 0 2px rgba(59,130,246,.34),0 12px 24px rgba(59,130,246,.18) !important;
}
body.pv-connecting-dependency .pv-task.is-relation-target-finish{
  box-shadow:inset -5px 0 0 rgba(37,99,235,.72),0 0 0 2px rgba(59,130,246,.34),0 12px 24px rgba(59,130,246,.18) !important;
}
body.pv-connecting-dependency .pv-rel-handle.is-drop-target{
  opacity:1;
  transform:scale(1.3);
  box-shadow:0 0 0 5px rgba(37,99,235,.38),0 2px 9px rgba(37,99,235,.72);
}
body.pv-connecting-dependency .pv-task{
  cursor:crosshair !important;
}

/* 4.8.9.6 — escenarios en memoria, aplicación atómica y relaciones en autoplanificación */
.pv-autoplan-scenario-id{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
  padding:.48rem .68rem;
  border:1px solid #cbdcf1;
  border-radius:.65rem;
  background:#f5f9ff;
  color:#274766;
}
.pv-autoplan-scenario-id>span{
  display:inline-flex;
  align-items:center;
  gap:.38rem;
  font-size:.75rem;
}
.pv-autoplan-scenario-id>span i{color:#3b6ea8}
.pv-autoplan-scenario-id strong{
  font-size:.74rem;
  letter-spacing:.025em;
}
.pv-autoplan-scenario-id small{
  color:#64748b;
  font-size:.69rem;
  line-height:1.25;
}
.pv-autoplan-result>.pv-autoplan-scenario-id{
  margin-bottom:.42rem;
  color:#274766;
}
.pv-autoplan-relation-warning{
  display:inline-flex!important;
  align-items:center;
  width:max-content;
  margin-top:.22rem;
  padding:.12rem .38rem;
  border:1px solid #f4c879;
  border-radius:999px;
  background:#fff8e8!important;
  color:#8a5412!important;
  font-size:.64rem!important;
  font-style:normal;
  font-weight:750;
}
.pv-autobatch-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media (max-width: 991.98px){
  .pv-autobatch-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 575.98px){
  .pv-autoplan-scenario-id{align-items:flex-start;flex-direction:column;gap:.2rem}
  .pv-autobatch-summary{grid-template-columns:1fr}
}


/* 4.8.9.7 — progreso visible durante la aplicación de escenarios masivos */
.pv-autobatch-busy-card>.progress .progress-bar,
.pv-autobatch-floating>.progress .progress-bar{
  flex:0 0 auto;
  min-width:0;
  background:var(--blue)!important;
  transition:width .18s linear,flex-basis .18s linear;
}

/* 4.8.9.9 — comparación de estrategias y explicación por criterios */
.pv-autobatch-compare-control{
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.55rem .65rem;
  border:1px solid #dbe5f0;
  border-radius:.65rem;
  background:#f8fbff;
}
.pv-autobatch-compare-control small{font-size:.68rem;color:#64748b;line-height:1.3}
.pv-autobatch-comparison[hidden]{display:none!important}
.pv-autobatch-comparison{
  border:1px solid #cfddeb;
  border-radius:.8rem;
  background:#f8fbff;
  padding:.7rem;
}
.pv-autobatch-comparison-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.65rem}
.pv-autobatch-comparison-head>div{display:flex;flex-direction:column;gap:.12rem}
.pv-autobatch-comparison-head strong{font-size:.82rem;color:#1f3b5b}
.pv-autobatch-comparison-head small{font-size:.67rem;color:#64748b;line-height:1.35}
.pv-autobatch-comparison-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.5rem}
.pv-autobatch-comparison-card{
  display:flex;
  flex-direction:column;
  gap:.45rem;
  min-width:0;
  padding:.58rem;
  border:1px solid #dbe4ee;
  border-radius:.65rem;
  background:#fff;
}
.pv-autobatch-comparison-card.is-current{border-color:#3b82f6;box-shadow:inset 0 0 0 1px #3b82f6}
.pv-autobatch-comparison-card.is-recommended{background:#f0fdf4;border-color:#86efac}
.pv-autobatch-comparison-card header{display:flex;align-items:center;justify-content:space-between;gap:.35rem;min-height:1.6rem}
.pv-autobatch-comparison-card header strong{font-size:.76rem;color:#1e3a5f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-autobatch-comparison-card header span{font-size:.56rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#166534;background:#dcfce7;border-radius:99px;padding:.12rem .28rem}
.pv-autobatch-comparison-card dl{display:grid;gap:.2rem;margin:0;flex:1}
.pv-autobatch-comparison-card dl>div{display:flex;align-items:center;justify-content:space-between;gap:.35rem;border-bottom:1px dashed #e2e8f0;padding-bottom:.14rem}
.pv-autobatch-comparison-card dt{font-size:.6rem;color:#64748b;font-weight:500}
.pv-autobatch-comparison-card dd{font-size:.67rem;color:#203954;font-weight:700;margin:0;white-space:nowrap}
.pv-autobatch-comparison-card .btn{font-size:.65rem;padding:.28rem .4rem}
.pv-autoplan-explain{grid-column:1/-1;border-top:1px dashed #d8e2ed;margin-top:.1rem;padding-top:.35rem;min-width:0}
.pv-autoplan-result>.pv-autoplan-explain{width:100%;margin-top:.45rem}
.pv-autoplan-explain summary{cursor:pointer;display:flex;align-items:center;gap:.35rem;font-size:.68rem;font-weight:700;color:#315f92;list-style:none}
.pv-autoplan-explain summary::-webkit-details-marker{display:none}
.pv-autoplan-explain summary i{font-size:.65rem}
.pv-autoplan-explain-body{padding:.48rem .1rem .1rem}
.pv-autoplan-explain-body>p{margin:0 0 .45rem;font-size:.7rem;color:#334155}
.pv-autoplan-explain-grid{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.pv-autoplan-explain-grid section{border:1px solid #e2e8f0;border-radius:.55rem;background:#f8fafc;padding:.45rem;min-width:0}
.pv-autoplan-explain-grid h6{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:0 0 .35rem;font-size:.64rem;color:#334155}
.pv-autoplan-explain-grid h6 span{font-size:.62rem;color:#315f92}
.pv-autoplan-explain-grid ul{display:flex;flex-direction:column;gap:.18rem;list-style:none;margin:0;padding:0}
.pv-autoplan-explain-grid li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .45rem;align-items:center;padding:.18rem .25rem;border-radius:.35rem}
.pv-autoplan-explain-grid li.is-selected{background:#eaf3ff}
.pv-autoplan-explain-grid li span{font-size:.62rem;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-autoplan-explain-grid li strong{font-size:.61rem;color:#1f3b5b}
.pv-autoplan-explain-grid li small{grid-column:1/-1;font-size:.56rem;color:#7b8ca2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-autoplan-score-note{display:block;margin-top:.35rem;font-size:.56rem;color:#94a3b8}
@media(max-width:1100px){.pv-autobatch-comparison-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767.98px){
  .pv-autobatch-comparison-grid{grid-template-columns:1fr}
  .pv-autobatch-compare-control{align-items:flex-start;flex-direction:column}
  .pv-autoplan-explain-grid{grid-template-columns:1fr}
}

/* 4.8.9.8 — previsualización de impacto de relaciones en drag y resize */
.pv-relation-impact-preview{
  position:absolute;
  inset:0;
  z-index:24;
  pointer-events:none;
  display:none;
}
.pv-relation-impact-ghost{
  position:absolute;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:.08rem;
  min-width:38px;
  padding:.2rem .35rem;
  overflow:hidden;
  border:2px dashed #7c3aed;
  border-radius:.35rem;
  background:rgba(237,233,254,.84);
  color:#4c1d95;
  box-shadow:0 2px 8px rgba(76,29,149,.18);
}
.pv-relation-impact-ghost strong,.pv-relation-impact-ghost small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-relation-impact-ghost strong{font-size:.62rem}
.pv-relation-impact-ghost small{font-size:.54rem}
.pv-relation-impact-info{
  position:absolute;
  display:flex;
  flex-direction:column;
  gap:.08rem;
  width:min(360px,calc(100% - 1rem));
  margin:.55rem;
  padding:.48rem .58rem;
  border:1px solid #c4b5fd;
  border-radius:.6rem;
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 24px rgba(30,41,59,.18);
}
.pv-relation-impact-info strong{font-size:.68rem;color:#5b21b6}
.pv-relation-impact-info strong.is-warning{color:#a16207}
.pv-relation-impact-info strong.is-blocking{color:#b91c1c}
.pv-relation-impact-info small{font-size:.58rem;color:#64748b;margin-bottom:.18rem}
.pv-drop-preview.relation-warning{border-color:#7c3aed!important;background:rgba(237,233,254,.72)!important}
.pv-drop-preview.relation-invalid{border-color:#dc2626!important;background:rgba(254,226,226,.78)!important}

/* 4.8.9.11 — previsualización de relaciones en compactación y deshacer split */
.pv-relation-impact-ghost.is-primary{
  border-style:solid;
  border-color:#2563eb;
  background:rgba(219,234,254,.88);
  color:#1e3a8a;
}
/* 4.8.9.14 — ventana de revisión de relaciones arrastrable */
#pvRelationOperationModal{
  z-index:1065;
}
#pvRelationOperationModal .pv-relation-operation-dialog{
  width:min(560px,calc(100vw - 24px));
  max-width:none;
  margin:clamp(1rem,10vh,5rem) auto 1.75rem;
}
#pvRelationOperationModal .modal-content{
  overflow:hidden;
  border:1px solid rgba(148,163,184,.38);
  border-radius:.9rem;
  background:#fff;
  box-shadow:0 22px 60px rgba(15,23,42,.28),0 2px 10px rgba(15,23,42,.12);
}
#pvRelationOperationModal .modal-header{
  align-items:flex-start;
  gap:.75rem;
  padding:.85rem .95rem .78rem;
  border-bottom:1px solid #e7edf5;
  background:linear-gradient(180deg,#fbfdff 0%,#f7faff 100%);
  cursor:move;
  user-select:none;
}
#pvRelationOperationModal .modal-header:active{cursor:grabbing}
#pvRelationOperationModal .pv-relation-operation-heading{
  display:flex;
  align-items:flex-start;
  gap:.7rem;
  min-width:0;
}
#pvRelationOperationModal .pv-relation-operation-icon{
  display:grid;
  flex:0 0 2.35rem;
  width:2.35rem;
  height:2.35rem;
  place-items:center;
  border:1px solid #c7d7f3;
  border-radius:.68rem;
  background:#eaf2ff;
  color:#2563eb;
  font-size:.95rem;
}
#pvRelationOperationModal .pv-modal-eyebrow{
  display:block;
  margin:0 0 .12rem;
  color:#64748b;
  font-size:.6rem;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}
#pvRelationOperationModal .modal-title{
  margin:0;
  color:#1e293b;
  font-size:1rem;
  line-height:1.18;
}
#pvRelationOperationModal .pv-relation-operation-subtitle{
  margin:.18rem 0 0;
  color:#6b7d94;
  font-size:.68rem;
  line-height:1.35;
}
#pvRelationOperationModal .pv-relation-operation-header-tools{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-left:auto;
}
#pvRelationOperationModal .pv-relation-operation-drag-hint{
  display:none !important;
  align-items:center;
  gap:.3rem;
  padding:.24rem .42rem;
  border:1px solid #d9e3f0;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  font-size:.58rem;
  white-space:nowrap;
}
#pvRelationOperationModal .pv-relation-operation-drag-hint i{color:#3b82f6}
#pvRelationOperationModal .btn-close{
  margin:0;
  padding:.45rem;
  cursor:pointer;
}
#pvRelationOperationModal .modal-body{
  padding:.85rem .95rem .9rem;
}
.pv-relation-operation-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.5rem;
  margin-bottom:.78rem;
}
.pv-relation-operation-metric{
  display:grid;
  grid-template-columns:1.75rem auto minmax(0,1fr);
  gap:.42rem;
  align-items:center;
  min-width:0;
  padding:.52rem .58rem;
  border:1px solid #dce6f2;
  border-radius:.65rem;
  background:#f8fbff;
  color:#334155;
}
.pv-relation-operation-metric-icon{
  display:grid;
  width:1.75rem;
  height:1.75rem;
  place-items:center;
  border-radius:.48rem;
  background:#eaf2ff;
  color:#2563eb;
  font-size:.7rem;
}
.pv-relation-operation-metric-value{
  color:#183153;
  font-size:1rem;
  font-weight:800;
  line-height:1;
}
.pv-relation-operation-metric-label{
  min-width:0;
  color:#64748b;
  font-size:.64rem;
  font-weight:650;
  line-height:1.2;
}
.pv-relation-operation-metric.is-related .pv-relation-operation-metric-icon{background:#f0eaff;color:#7c3aed}
.pv-relation-operation-metric.is-warning{border-color:#f5d784;background:#fffbeb}
.pv-relation-operation-metric.is-warning .pv-relation-operation-metric-icon{background:#fef3c7;color:#b45309}
.pv-relation-operation-metric.is-blocking{border-color:#fecaca;background:#fff5f5}
.pv-relation-operation-metric.is-blocking .pv-relation-operation-metric-icon{background:#fee2e2;color:#dc2626}
.pv-relation-operation-section{
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:.7rem;
  background:#fff;
}
.pv-relation-operation-section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:.7rem;
  padding:.48rem .62rem;
  border-bottom:1px solid #e8edf4;
  background:#f8fafc;
}
.pv-relation-operation-section-head strong{
  color:#334155;
  font-size:.68rem;
}
.pv-relation-operation-section-head small{
  color:#7b8ca2;
  font-size:.58rem;
  text-align:right;
}
.pv-relation-operation-list{
  max-height:min(250px,38vh);
  overflow:auto;
  padding:.38rem;
}
.pv-relation-operation-list ul{
  display:flex;
  flex-direction:column;
  gap:.32rem;
  margin:0;
  padding:0;
  list-style:none;
}
.pv-relation-operation-list li{
  display:grid;
  grid-template-columns:1.85rem minmax(0,1fr) auto;
  gap:.45rem;
  align-items:center;
  min-width:0;
  padding:.45rem .5rem;
  border:1px solid transparent;
  border-radius:.52rem;
  background:#f8fafc;
  color:#475569;
}
.pv-relation-operation-list li.is-move:hover{border-color:#d5e1ef;background:#f3f8ff}
.pv-relation-operation-list li.is-warning{border-color:#f7e1a2;background:#fffbeb;color:#92400e}
.pv-relation-operation-list li.is-blocking{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.pv-relation-operation-list-icon{
  display:grid;
  width:1.85rem;
  height:1.85rem;
  place-items:center;
  border-radius:.48rem;
  background:#e8f1ff;
  color:#2563eb;
  font-size:.66rem;
}
.pv-relation-operation-list li.is-warning .pv-relation-operation-list-icon{background:#fef3c7;color:#b45309}
.pv-relation-operation-list li.is-blocking .pv-relation-operation-list-icon{background:#fee2e2;color:#dc2626}
.pv-relation-operation-list-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:.08rem;
}
.pv-relation-operation-list-copy strong{
  overflow:hidden;
  color:inherit;
  font-size:.69rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-relation-operation-list-copy small{
  color:#718096;
  font-size:.6rem;
}
.pv-relation-operation-list-meta{
  max-width:8rem;
  overflow:hidden;
  padding:.18rem .34rem;
  border-radius:999px;
  background:#eaf2ff;
  color:#315f92;
  font-size:.56rem;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-relation-operation-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:4.2rem;
  color:#64748b;
  font-size:.68rem;
  text-align:center;
}
.pv-relation-operation-empty i{color:#16a34a}
#pvRelationOperationModal .modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.65rem .95rem;
  border-top:1px solid #e6edf5;
  background:#fbfdff;
}
#pvRelationOperationModal .pv-relation-operation-footer-note{
  max-width:19rem;
  color:#7b8ca2;
  font-size:.58rem;
  line-height:1.3;
}
#pvRelationOperationModal .pv-relation-operation-footer-actions{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-left:auto;
}
#pvRelationOperationModal .btn{
  min-width:5.2rem;
  font-size:.72rem;
}
#pvRelationOperationModal .pv-relation-operation-dialog.is-dragging .modal-content{
  box-shadow:0 28px 70px rgba(15,23,42,.32),0 4px 14px rgba(15,23,42,.14);
}
.modal-backdrop.pv-relation-operation-backdrop{
  opacity:.13!important;
}
body.pv-relation-operation-open #pvRelationImpactPreview{
  filter:saturate(1.12) contrast(1.03);
}
@media(max-width:575.98px){
  #pvRelationOperationModal .pv-relation-operation-dialog{width:calc(100vw - 16px)}
  #pvRelationOperationModal .pv-relation-operation-drag-hint{display:none}
  #pvRelationOperationModal .modal-header{padding:.72rem}
  #pvRelationOperationModal .modal-body{padding:.72rem}
  #pvRelationOperationModal .modal-footer{align-items:stretch;flex-direction:column;padding:.65rem .72rem}
  #pvRelationOperationModal .pv-relation-operation-footer-note{max-width:none}
  #pvRelationOperationModal .pv-relation-operation-footer-actions{width:100%;margin-left:0}
  #pvRelationOperationModal .pv-relation-operation-footer-actions .btn{flex:1}
  .pv-relation-operation-summary{grid-template-columns:1fr 1fr}
  .pv-relation-operation-section-head{align-items:flex-start;flex-direction:column;gap:.15rem}
  .pv-relation-operation-section-head small{text-align:left}
}
.pv-autobatch-comparison-card .pv-autobatch-strategy-source{
  display:block;
  margin-top:-.08rem;
  font-size:.58rem;
  line-height:1.25;
  color:#64748b;
}


/* 4.8.9.17 — acciones de cabecera de cola y estados de planificación legibles */
.pv-queue-head-top .pv-queue-head-actions{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  gap:.24rem;
  flex-wrap:nowrap;
}
.pv-queue-head-top .pv-queue-order-fold-tools{
  position:static;
  top:auto;
  right:auto;
  transform:none;
}
.pv-autoorder-slot--error .pv-autoorder-status,
.pv-autoorder-slot--error .pv-autoorder-reason{
  display:block;
}
.pv-autoorder-slot--error .pv-autoorder-status{
  margin-bottom:.18rem;
}
.pv-autoorder-slot--error .pv-autoorder-reason{
  line-height:1.3;
  white-space:normal;
}


/* v4.8.9.20 — panel de filtros operativo y estado visible de vistas rápidas */
.pv-filter-workspace{padding:14px}
.pv-filter-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.pv-filter-header .pv-section-title{margin:0}
.pv-filter-results{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:14px}
.pv-filter-results>div{display:flex;align-items:baseline;gap:6px;min-width:0;padding:9px 10px;border:1px solid #e1e7f0;border-radius:10px;background:#f8fafc}
.pv-filter-results b{font-size:var(--pv-fs-16);line-height:1;color:#172033}
.pv-filter-results span{font-size:var(--pv-fs-10);color:#728095;white-space:nowrap}
.pv-filter-quick{padding-bottom:13px;margin-bottom:13px;border-bottom:1px solid #e6ebf2}
.pv-filter-subtitle{margin-bottom:7px;font-size:var(--pv-fs-10);font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#718096}
.pv-quick-view-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.pv-quick-view-grid button{display:flex;align-items:center;gap:7px;min-width:0;height:34px;padding:0 9px;border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#4d5b70;font-size:var(--pv-fs-11);font-weight:800;text-align:left;transition:border-color .14s ease,background .14s ease,color .14s ease,box-shadow .14s ease}
.pv-quick-view-grid button i{width:14px;color:#7c899d;text-align:center}
.pv-quick-view-grid button:hover{border-color:#a9c2ed;background:#f5f8fe;color:#244f9d}
.pv-quick-view-grid button.is-active{border-color:#75a4ef;background:#eaf2ff;color:#174f9f;box-shadow:0 0 0 2px rgba(47,112,219,.09)}
.pv-quick-view-grid button.is-active i{color:#1769d2}
.pv-filter-context{margin-top:8px;padding:7px 9px;border-radius:8px;background:#fff7df;color:#79580b;font-size:var(--pv-fs-10);line-height:1.35}
.pv-filter-search{margin-bottom:11px}
.pv-filter-workspace .pv-filter-grid{gap:9px;margin-top:0}
.pv-filter-workspace .pv-filter-grid label span{margin-bottom:5px}
.pv-filter-workspace .pv-filter-switches{gap:6px;margin:12px 0}
.pv-filter-workspace .pv-filter-switches .pv-check{display:flex;align-items:flex-start;gap:8px;margin:0;padding:8px 9px;border:1px solid #e3e8ef;border-radius:9px;background:#fbfcfe;font-size:var(--pv-fs-11);line-height:1.3}
.pv-filter-workspace .pv-filter-switches .pv-check input{margin-top:2px;flex:0 0 auto}
.pv-filter-workspace .pv-filter-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.pv-filter-workspace .pv-filter-actions .btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0}
.pv-filter-workspace .pv-count-badge{max-width:110px;overflow:hidden;text-overflow:ellipsis}

/* 2026-07-30 · Interacción directa con relaciones */
.pv-dep-line:hover{
  stroke-width:2.6;
  opacity:1;
}


/* 2026-07-31 · Localización y gestión profesional de relaciones */
.pv-rel-row{grid-template-columns:90px minmax(120px,1fr) 42px 76px 86px 32px 32px 32px}
.pv-rel-locate{color:#2563eb!important}
.pv-rel-form-actions{grid-column:1/-1;display:flex;justify-content:space-between;gap:.5rem;padding-top:.15rem;border-top:1px solid #dbeafe}
.pv-dependency-toolbar{display:grid;gap:8px;margin-top:10px}
.pv-dependency-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.pv-dependency-summary span{display:flex;flex-direction:column;align-items:center;padding:6px 3px;border:1px solid #dfe7f1;border-radius:9px;background:#fff;color:#64748b;font-size:var(--pv-fs-9);line-height:1.1}
.pv-dependency-summary strong{font-size:var(--pv-fs-12);color:#334155}
.pv-dependency-summary .is-ok{border-color:#b7e4d2;background:#f2fbf7}.pv-dependency-summary .is-ok strong{color:#12835f}
.pv-dependency-summary .is-warning{border-color:#f6c9ce;background:#fff5f5}.pv-dependency-summary .is-warning strong{color:#c73d4a}
.pv-dependency-filter{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;color:#64748b;font-size:var(--pv-fs-10);font-weight:800}
.pv-dependency-help{display:flex;align-items:flex-start;gap:6px;margin-top:8px;padding:7px 8px;border-radius:9px;background:#f5f8fc;color:#64748b;font-size:var(--pv-fs-9);line-height:1.3}
.pv-dependency-help i{margin-top:1px;color:#2563eb}
.pv-dependency-item{grid-template-columns:18px minmax(0,1fr) auto minmax(0,1fr);padding-right:5.9rem}
.pv-dependency-item .pv-dep-state{display:grid;place-items:center;width:18px;height:18px;border-radius:999px;background:#e7f7f0;color:#16825f;font-size:8px}
.pv-dependency-item.invalid .pv-dep-state{background:#fde8eb;color:#c73d4a}
.pv-dependency-item .pv-dep-arrow{text-align:center}
.pv-dependency-item small{grid-column:1/-1;padding-left:23px}
.pv-dependency-item small b{display:inline;font-size:inherit;color:#315b9a}
.pv-dependency-actions .pv-dependency-locate,.pv-dependency-actions .pv-dependency-edit,.pv-dependency-actions .pv-dependency-delete{position:static;width:1.55rem;height:1.55rem;border:0;border-radius:.4rem;background:transparent;color:#64748b;opacity:.55}
.pv-dependency-actions .pv-dependency-locate:hover,.pv-dependency-actions .pv-dependency-locate:focus-visible{color:#2563eb;background:#eff6ff;opacity:1}
.pv-dependency-empty-filter{margin:0;padding:12px 8px;border:1px dashed #cbd5e1;border-radius:10px;text-align:center;color:#64748b;font-size:var(--pv-fs-10)}
.pv-dependency-empty-filter i{display:block;margin-bottom:4px}
.pv-task.pv-relation-locate-task{z-index:45!important;animation:pvRelationLocateTask .72s ease-in-out 4}
.pv-dep-line.pv-relation-locate-target{stroke:#1d6fe8!important;stroke-width:4!important;filter:drop-shadow(0 0 4px rgba(29,111,232,.65));opacity:1!important;animation:pvRelationLocateLine .72s ease-in-out 4}
@keyframes pvRelationLocateTask{0%,100%{outline:0 solid rgba(29,111,232,0)}50%{outline:3px solid #1d6fe8;outline-offset:3px;box-shadow:0 0 0 7px rgba(29,111,232,.2),0 12px 28px rgba(15,23,42,.25)}}
@keyframes pvRelationLocateLine{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.pv-task.pv-relation-locate-task{animation:none;outline:3px solid #1d6fe8;outline-offset:3px}.pv-dep-line.pv-relation-locate-target{animation:none}}


/* 2026-07-31 · cambio rápido de fecha y cabecera técnica de impresión */
.pv-quick-date-trigger{cursor:pointer;border-radius:5px;transition:background-color .12s,color .12s,box-shadow .12s}
.pv-quick-date-trigger:hover,.pv-quick-date-trigger:focus-visible{background:#eaf2ff;color:#145fc3;box-shadow:0 0 0 2px rgba(29,111,232,.14);outline:0}
.pv-statusbar .pv-quick-date-trigger:hover,.pv-statusbar .pv-quick-date-trigger:focus-visible{background:rgba(42,122,235,.18);color:#8fc0ff}
.pv-quick-date-picker{display:none;position:fixed;z-index:1095;width:auto;height:auto;padding:0;border:0;background:transparent;color:#172033;box-shadow:none}
.pv-quick-date-picker.is-open{display:block}
.pv-quick-date-picker .ui-datepicker-inline{display:block!important;box-shadow:0 10px 24px rgba(15,23,42,.18)}
.pv-task-editor-print-specs{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,.72fr) minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.2fr);gap:8px}
.pv-task-editor-kpi--print-spec{min-width:0;background:#fbfcfe;border-color:#dbe3ee;box-shadow:none}
.pv-task-editor-kpi--print-spec strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:400}
@media(max-width:900px){.pv-task-editor-print-specs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.pv-task-editor-print-specs{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* 2026-07-31 · Jerarquía visual y compactación del panel lateral de tareas. */
.pv-right .pv-queue-controls{
  margin:0 14px 8px;
  border:1px solid #d9e2ec;
  border-radius:.72rem;
  background:#f5f7fa;
  box-shadow:0 1px 3px rgba(30,50,75,.035);
  overflow:hidden;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-toggle{
  min-height:34px;
  padding:.42rem .62rem;
  background:#f3f6f9;
  border:0;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-toggle:hover{
  background:#edf2f7;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-body{
  border-top:1px solid #dfe6ee;
  background:#f8fafc;
}
.pv-right .pv-queue-controls-group{
  gap:.4rem;
  padding:.48rem .55rem .52rem;
}
.pv-right .pv-queue-controls-group--sort{
  background:#f8fafc;
}
.pv-right .pv-queue-controls-group--filter{
  background:#f5f8fb;
}
.pv-right .pv-queue-controls-group + .pv-queue-controls-group{
  border-top:1px solid #dfe6ee;
}
.pv-right .pv-queue-controls .pv-backlog-controls{
  gap:.3rem;
}
.pv-right .pv-queue-controls .pv-queue-filters{
  gap:.3rem .34rem;
}
.pv-right .pv-queue-controls label,
.pv-right .pv-queue-date-filter label{
  gap:.16rem;
}
.pv-right .pv-queue-controls label > span,
.pv-right .pv-queue-date-filter label > span,
.pv-right .pv-backlog-sort label,
.pv-right .pv-backlog-limit label{
  font-size:.59rem;
  line-height:1;
  letter-spacing:.055em;
  font-weight:750;
  color:#607187;
}
.pv-right .pv-queue-controls .form-select-sm,
.pv-right .pv-queue-controls .form-control-sm{
  min-height:28px;
  height:28px;
  padding-top:.2rem;
  padding-bottom:.2rem;
  font-size:.69rem;
  line-height:1.15;
  border-radius:.46rem;
}
.pv-right .pv-queue-controls .btn-sm{
  min-height:28px;
  height:28px;
  padding:.18rem .42rem;
  font-size:.66rem;
  border-radius:.46rem;
}
.pv-right .pv-queue-date-filter{
  gap:.3rem .34rem;
  padding:.38rem;
  border-color:#dce4ed;
  border-radius:.55rem;
  background:#fff;
}
.pv-right .pv-backlog-counter{
  min-height:18px;
  gap:.28rem;
  margin-top:0;
}
.pv-right .pv-backlog-counter span{
  padding:.18rem .38rem;
  font-size:.59rem;
}

/* Las pestañas actúan como separador funcional entre configuración y resultados. */
.pv-right .pv-queue-view-tabs--persistent{
  margin:0 14px 10px;
  padding:3px;
  border:1px solid #dbe4ee;
  border-radius:.68rem;
  background:#eef2f6;
  box-shadow:none;
}
.pv-right .pv-queue-view-tabs--persistent button{
  min-height:29px;
  font-size:.67rem;
  border-radius:.5rem;
}
.pv-right .pv-queue-view-tabs--persistent button.active{
  background:#fff;
  box-shadow:0 1px 3px rgba(31,50,73,.09);
}

/* La cola se percibe como un bloque independiente de resultados. */
.pv-right .pv-backlog-lanes{
  margin:0 10px 10px;
  padding:4px;
  border:1px solid #ccd9e7;
  border-radius:.82rem;
  background:#eaf0f6;
  box-shadow:0 3px 10px rgba(31,50,73,.055);
}
.pv-right .pv-backlog-lane{
  border-radius:.66rem;
  background:#fff;
  overflow:hidden;
}
.pv-right .pv-lane-head.pv-queue-head{
  padding:.48rem .56rem .5rem;
  border-bottom:1px solid #dfe7f0;
  background:#fbfcfe;
}
.pv-right .pv-queue-head-top .pv-lane-title{
  font-size:.67rem;
  letter-spacing:.11em;
  color:#617187;
}

/* Aviso de filtro activo: visible, pero compacto y subordinado a la cabecera. */
.pv-right .pv-queue-filter-status{
  gap:.34rem;
  min-height:28px;
  padding:.26rem .34rem;
  border:1px solid #b8d0ef;
  border-left:3px solid #2f73cf;
  border-radius:.5rem;
  background:#f2f7fd;
  box-shadow:none;
}
.pv-right .pv-queue-filter-status-icon{
  flex-basis:1.25rem;
  width:1.25rem;
  height:1.25rem;
  border-radius:.38rem;
  font-size:.58rem;
  background:#dfeeff;
}
.pv-right .pv-queue-filter-status-copy{
  display:flex;
  align-items:center;
  gap:.34rem;
  overflow:hidden;
}
.pv-right .pv-queue-filter-status-title{
  flex:0 0 auto;
  gap:.25rem;
}
.pv-right .pv-queue-filter-status-title strong{
  font-size:.61rem;
  letter-spacing:.065em;
}
.pv-right .pv-queue-filter-status-title b{
  min-width:1.05rem;
  height:1.05rem;
  padding:0 .28rem;
  font-size:.56rem;
}
.pv-right .pv-queue-filter-status-copy small{
  flex:1 1 auto;
  min-width:0;
  font-size:.59rem;
  color:#607a9d;
}
.pv-right #pvQueueFilterClear{
  min-height:24px;
  height:24px;
  padding:.16rem .34rem;
  border-radius:.42rem;
  font-size:.59rem;
  font-weight:700;
}
.pv-right .pv-backlog-lane.is-filtered{
  border-color:#b7cce7;
  box-shadow:none;
}

@media (max-width:520px){
  .pv-right .pv-queue-controls,
  .pv-right .pv-queue-view-tabs--persistent{margin-left:10px;margin-right:10px}
  .pv-right .pv-backlog-lanes{margin-left:7px;margin-right:7px}
  .pv-right .pv-queue-filter-status-copy small{display:none}
}

/* 4.8.24 — separación visual refinada entre controles y cola */
.pv-right .pv-queue-controls .pv-queue-collapsible-body{
  background:#e7edf4;
}
.pv-right .pv-queue-controls-group--sort,
.pv-right .pv-queue-controls-group--filter{
  background:#e7edf4;
}
.pv-right .pv-queue-controls-group + .pv-queue-controls-group{
  border-top-color:#cfd9e4;
}

/* La cola vuelve a integrarse directamente en el panel, sin marco exterior. */
.pv-right .pv-backlog-lanes{
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.pv-right .pv-backlog-lane{
  border-radius:0;
  background:#fff;
  overflow:visible;
}
.pv-right .pv-lane-head.pv-queue-head{
  border-top:1px solid #d8e1eb;
}

@media (max-width:520px){
  .pv-right .pv-backlog-lanes{margin-left:0;margin-right:0}
}

/* 4.8.24 — estado de devolución de tareas sobre toda la cola */
#pvTaskPanel {
  position: relative;
}

#pvTaskPanel.drop-return::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: rgba(16, 185, 129, .10);
  box-shadow: inset 0 0 0 2px rgba(5, 150, 105, .38);
}

/* 4.8.24 — refinamiento visual del destino de devolución a la cola */
#pvTaskPanel.drop-return {
  background: rgba(16, 185, 129, .035) !important;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .16);
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

#pvTaskPanel.drop-return::after {
  background: transparent;
  box-shadow: none;
}

#pvTaskPanel .pv-lane-head.pv-queue-head {
  transition: border-top-color 120ms ease, box-shadow 120ms ease;
}

#pvTaskPanel.drop-return .pv-lane-head.pv-queue-head {
  border-top-color: rgba(5, 150, 105, .72);
  box-shadow: inset 0 2px 0 rgba(5, 150, 105, .55);
}

#pvTaskPanel.drop-return .pv-card,
#pvTaskPanel.drop-return .pv-order-card {
  background-color: inherit;
}

body:has(#pvTaskPanel.drop-return) .ui-draggable-dragging.pv-task,
body:has(#pvTaskPanel.drop-return) .pv-drag-helper {
  opacity: .92;
}

/* 2026-09-10 — 4.8.26 · continuidad visual en paneles, navegación y zoom */
.pv-left {
  transform: translateX(0);
  transition: opacity .16s ease, transform .18s ease;
}

.pv-app.pv-layout-transitioning .pv-left {
  will-change: opacity, transform;
}

.pv-app.left-closed .pv-left {
  transform: translateX(-18px);
}

.pv-tool-panel.active {
  animation: pv-panel-enter .16s cubic-bezier(.2,.7,.25,1) both;
}

@keyframes pv-panel-enter {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: translateX(0); }
}

.pv-task.pv-motion-geometry {
  transition: left .17s cubic-bezier(.2,.7,.25,1), width .17s cubic-bezier(.2,.7,.25,1);
  will-change: left, width;
}

body.pv-timeline-moving #pvDayHeader,
body.pv-timeline-moving #pvTimeHeader,
body.pv-timeline-moving .pv-lane {
  will-change: transform;
}

.pv-app.pv-no-animations .pv-tool-panel.active {
  animation: none !important;
}

.pv-app.pv-no-animations .pv-task.pv-motion-geometry {
  transition: none !important;
}

.pv-app.pv-no-animations {
  transition: none !important;
}


/* 4.8.26.1 — pan temporal con barra espaciadora sin scroll nativo de página */
body.pv-space-pan #pvViewport,
body.pv-space-pan #pvViewport * {
  cursor: grab !important;
}

body.pv-space-pan.pv-is-panning #pvViewport,
body.pv-space-pan.pv-is-panning #pvViewport * {
  cursor: grabbing !important;
}

/* V4.8.27 — diagnóstico de rendimiento para administradores */
.pv-perf-config-card{margin-top:1rem;padding:.9rem;border:1px solid #dbe4f0;border-radius:.85rem;background:#f8fafc}
.pv-perf-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.7rem}
.pv-perf-config-head strong{display:block;font-size:var(--pv-fs-13)}
.pv-perf-config-head small{display:block;margin-top:.15rem;color:#64748b;font-size:var(--pv-fs-11)}
.pv-perf-state{display:inline-flex;align-items:center;justify-content:center;min-width:2.9rem;padding:.18rem .42rem;border-radius:999px;background:#e2e8f0;color:#475569;font-size:var(--pv-fs-10);font-weight:900;letter-spacing:.04em}
.pv-perf-state.is-active{background:#dcfce7;color:#166534}
.pv-perf-config-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.pv-perf-actions{margin:.7rem 0}
.pv-perf-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem;margin:.7rem 0}
.pv-perf-summary>div{padding:.55rem .6rem;border:1px solid #e2e8f0;border-radius:.65rem;background:#fff}
.pv-perf-summary b{display:block;font-size:.95rem;color:#0f172a}
.pv-perf-summary small{display:block;color:#64748b;font-size:var(--pv-fs-10);line-height:1.2}
.pv-perf-log{max-height:15rem;margin-top:.6rem}
.pv-perf-overlay{position:fixed;left:4.75rem;bottom:.75rem;z-index:1090;width:min(25rem,calc(100vw - 6rem));padding:.6rem .7rem;border:1px solid rgba(148,163,184,.45);border-radius:.75rem;background:rgba(15,23,42,.94);box-shadow:0 .55rem 1.8rem rgba(15,23,42,.2);color:#e2e8f0;font:600 11px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace;pointer-events:none;backdrop-filter:blur(7px)}
.pv-perf-overlay-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.35rem;color:#fff}
.pv-perf-overlay-head span{display:inline-flex;align-items:center;gap:.3rem}
.pv-perf-overlay-head span:before{content:'';width:.45rem;height:.45rem;border-radius:50%;background:#22c55e;box-shadow:0 0 0 .18rem rgba(34,197,94,.15)}
.pv-perf-overlay-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem .7rem}
.pv-perf-overlay-grid em{font-style:normal;color:#94a3b8}
.pv-perf-overlay-grid b{color:#f8fafc}
@media(max-width:50rem){.pv-perf-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.pv-perf-config-grid{grid-template-columns:1fr}.pv-perf-overlay{left:.75rem;width:calc(100vw - 1.5rem)}}


/* V4.8.28 — diagnóstico compacto y salida principal utilizable */
.pv-perf-config-card{padding:.72rem .82rem}
.pv-perf-config-card.is-enabled{padding:.9rem}
.pv-perf-config-head{align-items:center;margin-bottom:0}
.pv-perf-config-card.is-enabled .pv-perf-config-head{margin-bottom:.7rem}
.pv-perf-master-switch{margin-left:auto;flex:0 0 auto}
.pv-perf-master-switch em{min-width:1.7rem;text-align:right}
.pv-perf-config-body[hidden]{display:none!important}
.pv-perf-config-body{border-top:1px solid #e2e8f0;padding-top:.72rem}
.pv-config-debug-main{min-height:14rem;height:clamp(14rem,32vh,22rem);max-height:22rem;white-space:pre-wrap;overflow:auto}
.pv-config-panel[data-pv-config-panel="diagnostics"].active{display:flex;flex-direction:column;min-height:34rem}
.pv-config-panel[data-pv-config-panel="diagnostics"] .pv-config-debug-main{flex:1 1 auto}

/* V4.8.28 — lectura profesional de informes */
.pv-report-workspace{display:flex;flex-direction:column;gap:.75rem}
.pv-report-controls{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:.55rem;padding:.7rem;border:1px solid #dfe7f1;border-radius:.85rem;background:#f8fafc}
.pv-report-controls>label{min-width:0}
.pv-report-controls>label>span{display:block;margin-bottom:.28rem;color:#64748b;font-size:var(--pv-fs-10);font-weight:900;text-transform:uppercase;letter-spacing:.045em}
.pv-report-controls .pv-report-check{grid-column:1/-1;display:flex;align-items:center;gap:.45rem;margin:0;color:#475569;font-size:var(--pv-fs-11);font-weight:800}
.pv-report-meta{display:flex;justify-content:space-between;gap:.5rem;padding:0 .1rem;color:#64748b;font-size:var(--pv-fs-10)}
.pv-report-current-title{margin:.15rem 0 .25rem;font-size:var(--pv-fs-14);font-weight:950;color:#0f172a}
.pv-report-health{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}
.pv-report-health>div{min-width:0;padding:.58rem .62rem;border:1px solid #e2e8f0;border-radius:.7rem;background:#fff}
.pv-report-health>div.is-alert{border-color:#fecaca;background:#fff7f7}
.pv-report-health span,.pv-report-health b,.pv-report-health small{display:block}
.pv-report-health span{font-size:var(--pv-fs-10);font-weight:850;color:#64748b}
.pv-report-health b{margin:.1rem 0;font-size:1rem;color:#0f172a}
.pv-report-health .is-alert b{color:#b4232f}
.pv-report-health small{font-size:var(--pv-fs-10);line-height:1.2;color:#8791a2}
.pv-report-table-wrap{max-height:28rem;overflow:auto;border:1px solid #e2e8f0;border-radius:.65rem;background:#fff}
.pv-report-table{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--pv-fs-10)}
.pv-report-table th{position:sticky;top:0;z-index:1;padding:.48rem .55rem;background:#f1f5f9;color:#475569;text-align:left;white-space:nowrap;border-bottom:1px solid #dbe3ed}
.pv-report-table td{padding:.44rem .55rem;border-bottom:1px solid #edf2f7;vertical-align:top}
.pv-report-table tbody tr:hover{background:#f8fbff}
.pv-report-block{box-shadow:0 .18rem .65rem rgba(15,23,42,.035)}
.pv-report-block-head strong{color:#0f172a}
.pv-report-actions{position:sticky;bottom:-1rem;margin:.25rem -1rem -1rem;padding:.75rem 1rem;background:linear-gradient(to top,#fff 72%,rgba(255,255,255,.84));z-index:3}
@media(max-width:50rem){.pv-report-controls,.pv-report-health{grid-template-columns:1fr}.pv-report-controls .pv-report-check{grid-column:auto}.pv-report-meta{flex-direction:column}}


/* V4.8.29 — diagnóstico en vivo y panel de informes amplio superpuesto */
.pv-config-panel[data-pv-config-panel="diagnostics"].active{
  min-height:34rem;
  overflow:visible;
}
.pv-config-panel[data-pv-config-panel="diagnostics"] .pv-config-debug-main{
  flex:0 0 clamp(13rem,28vh,18rem);
  min-height:13rem;
  height:clamp(13rem,28vh,18rem);
  max-height:18rem;
}
.pv-config-panel[data-pv-config-panel="diagnostics"] .pv-perf-log{
  max-height:10rem;
}

/* Informes: panel de trabajo, no columna de navegación. En escritorio se superpone
   al timeline para ganar superficie sin comprimir ni recalcular su geometría. */
@media (min-width:1001px){
  .pv-app.pv-report-panel-open:not(.pv-layout-overlay){
    grid-template-columns:var(--rail) 0 minmax(0,1fr) var(--right);
  }
  .pv-app.pv-report-panel-open .pv-left{
    position:fixed;
    top:0;
    bottom:30px;
    left:var(--rail);
    z-index:1550;
    width:min(37.5rem,calc(100vw - var(--rail) - 1.25rem));
    max-width:none;
    opacity:1;
    pointer-events:auto;
    transform:translateX(0);
    box-shadow:12px 0 32px rgba(15,23,42,.16);
  }
  .pv-app.pv-report-panel-open.left-closed .pv-left{
    opacity:0;
    pointer-events:none;
    transform:translateX(calc(-100% - 12px));
  }
  .pv-app.pv-layout-overlay.pv-report-panel-open .pv-left{
    width:min(37.5rem,calc(100vw - var(--rail) - 1.25rem));
  }
}

.pv-tool-panel[data-panel="reports"]{
  padding:1rem 1.1rem;
}
.pv-tool-panel[data-panel="reports"] .pv-report-workspace{
  gap:.85rem;
}
@media (min-width:1001px){
  .pv-tool-panel[data-panel="reports"] .pv-report-controls{
    grid-template-columns:minmax(0,1.55fr) minmax(12rem,1fr);
    padding:.8rem;
  }
  .pv-tool-panel[data-panel="reports"] .pv-report-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .pv-tool-panel[data-panel="reports"] .pv-report-health{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .pv-tool-panel[data-panel="reports"] .pv-report-table{
    min-width:100%;
    font-size:var(--pv-fs-11);
  }
  .pv-tool-panel[data-panel="reports"] .pv-report-table th,
  .pv-tool-panel[data-panel="reports"] .pv-report-table td{
    padding:.52rem .62rem;
  }
  .pv-tool-panel[data-panel="reports"] .pv-report-actions{
    grid-template-columns:repeat(3,minmax(7rem,1fr));
  }
}

/* V4.8.30 — configuración: permitir scroll del contenedor de paneles.
   Evita que el contenido inferior quede inaccesible cuando una sección (p. ej. Diagnóstico)
   supera la altura disponible del modal. */
.pv-config-panels {
  overflow: auto;
}

/* V4.8.31 — informes profesionales: jerarquía visual, gráficos y lectura ejecutiva */
@media (min-width:1001px){
  .pv-app.pv-report-panel-open .pv-left,
  .pv-app.pv-layout-overlay.pv-report-panel-open .pv-left{
    width:min(42.5rem,calc(100vw - var(--rail) - 1.25rem));
  }
}
.pv-tool-panel[data-panel="reports"]{
  background:linear-gradient(180deg,#fbfdff 0,#f7f9fc 100%);
}
.pv-tool-panel[data-panel="reports"] .pv-panel-intro{
  padding:.15rem .1rem .25rem;
}
.pv-tool-panel[data-panel="reports"] .pv-report-meta{
  padding:.05rem .15rem .1rem;
}
.pv-report-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.05rem;
  border:1px solid #dbe5f2;
  border-radius:1rem;
  background:linear-gradient(135deg,#ffffff 0%,#f2f7ff 100%);
  box-shadow:0 .3rem 1rem rgba(15,23,42,.045);
}
.pv-report-hero>div:first-child{min-width:0}
.pv-report-eyebrow{
  display:block;
  margin-bottom:.2rem;
  color:#2563eb;
  font-size:var(--pv-fs-10);
  font-weight:950;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.pv-report-hero h3{
  margin:0;
  color:#0f172a;
  font-size:1.22rem;
  font-weight:950;
  line-height:1.12;
}
.pv-report-hero p{
  margin:.38rem 0 0;
  color:#64748b;
  font-size:var(--pv-fs-11);
  font-weight:700;
}
.pv-report-hero-badge{
  display:flex;
  align-items:center;
  gap:.42rem;
  flex:0 0 auto;
  padding:.42rem .62rem;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:var(--pv-fs-10);
  font-weight:850;
}
.pv-report-kpis{
  gap:.55rem;
}
.pv-report-kpis>div{
  min-height:4.5rem;
  padding:.72rem .78rem;
  border:1px solid #dfe7f1;
  border-radius:.85rem;
  background:#fff;
  box-shadow:0 .2rem .75rem rgba(15,23,42,.035);
}
.pv-report-kpis>div>span{display:flex;flex-direction:column;gap:.08rem}
.pv-report-kpis small{order:0;color:#64748b;font-size:var(--pv-fs-10);font-weight:850;text-transform:uppercase;letter-spacing:.035em}
.pv-report-kpis b{order:1;color:#0f172a;font-size:1.08rem;font-weight:950}
.pv-report-insights{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.55rem;
}
.pv-report-insight{
  min-width:0;
  padding:.72rem .76rem;
  border:1px solid #dfe7f1;
  border-left:3px solid #4f7fd1;
  border-radius:.78rem;
  background:#fff;
}
.pv-report-insight.is-alert{border-color:#fecaca;border-left-color:#dc3545;background:#fffafa}
.pv-report-insight span,.pv-report-insight b,.pv-report-insight small{display:block;min-width:0}
.pv-report-insight span{color:#64748b;font-size:var(--pv-fs-10);font-weight:850;text-transform:uppercase;letter-spacing:.035em}
.pv-report-insight b{margin:.18rem 0;color:#0f172a;font-size:var(--pv-fs-12);font-weight:950;overflow-wrap:anywhere}
.pv-report-insight.is-alert b{color:#b4232f}
.pv-report-insight small{color:#7b8798;font-size:var(--pv-fs-10);line-height:1.25}
.pv-report-chart-block{
  padding:.85rem .9rem .9rem;
  border:1px solid #dfe7f1;
  border-radius:.9rem;
  background:#fff;
}
.pv-report-block-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.75rem;
}
.pv-report-block-head strong{font-size:var(--pv-fs-12);font-weight:950}
.pv-report-block-head span{max-width:58%;color:#7b8798;font-size:var(--pv-fs-10);text-align:right;line-height:1.25}
.pv-report-line-chart{width:100%;overflow:hidden}
.pv-report-line-chart svg{display:block;width:100%;height:auto;min-height:12rem}
.pv-report-line-chart .grid line{stroke:#e3e9f1;stroke-width:1}
.pv-report-line-chart .grid text,.pv-report-line-chart .labels text{fill:#708096;font-size:10px;font-weight:700}
.pv-report-line-chart polyline{fill:none;stroke:#2467d4;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.pv-report-line-chart .dots circle{fill:#2467d4;stroke:#fff;stroke-width:2}
.pv-report-chart-legend{display:flex;gap:1rem;margin:-.2rem 0 .7rem;color:#64748b;font-size:var(--pv-fs-10);font-weight:800}
.pv-report-chart-legend span{display:inline-flex;align-items:center;gap:.32rem}
.pv-report-chart-legend i{width:.72rem;height:.45rem;border-radius:999px;background:#2f6fd0}
.pv-report-chart-legend i.b{background:#8eb7ef}
.pv-report-stacked{display:flex;flex-direction:column;gap:.58rem}
.pv-report-stacked-row>div{display:flex;justify-content:space-between;gap:.7rem;margin-bottom:.24rem;font-size:var(--pv-fs-10)}
.pv-report-stacked-row>div span{min-width:0;color:#475569;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-report-stacked-row>div b{flex:0 0 auto;color:#0f172a}
.pv-report-stacked-row>em{display:flex;height:.55rem;border-radius:999px;overflow:hidden;background:#edf2f7}
.pv-report-stacked-row>em i{height:100%;display:block}
.pv-report-stacked-row>em i.a{background:#2f6fd0}
.pv-report-stacked-row>em i.b{background:#8eb7ef}
.pv-report-bars{gap:.62rem}
.pv-report-bar>div{gap:.75rem}
.pv-report-bar>div span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-report-bar>div b{flex:0 0 auto}
.pv-report-bar em{height:.56rem;background:#edf2f7}
.pv-report-bar em i{background:linear-gradient(90deg,#2c64bc,#3b82f6)}
.pv-report-table-wrap{
  box-shadow:0 .22rem .8rem rgba(15,23,42,.03);
}
.pv-report-table th{font-weight:900}
.pv-report-table td{color:#334155}
.pv-report-actions .btn{font-weight:800}
@media(max-width:1200px){
  .pv-report-insights{grid-template-columns:1fr}
}
@media(max-width:50rem){
  .pv-report-hero{flex-direction:column}
  .pv-report-hero-badge{align-self:flex-start}
  .pv-report-insights{grid-template-columns:1fr}
  .pv-report-block-head{flex-direction:column;gap:.25rem}
  .pv-report-block-head span{max-width:none;text-align:left}
}

/* V4.8.32 RC — el panel de Informes es overlay y no reserva la columna de Tareas
   cuando la cola derecha está cerrada. Evita el hueco vacío a la derecha del timeline. */
@media (min-width:1001px){
  .pv-app.pv-report-panel-open.right-collapsed:not(.pv-layout-overlay){
    grid-template-columns:var(--rail) 0 minmax(0,1fr) 0;
  }
}


/* V4.8.38 RC — cards de máquina reorganizadas siguiendo el patrón visual
   validado por el usuario: asa de ordenación en el carril izquierdo, jerarquía
   vertical clara para nombre/categoría/turno y pie estable con permiso + acciones.
   Mantiene filtros, selección, orden, visibilidad, solapamientos y turnos. */
.pv-tool-panel[data-panel="machines"] .pv-machine-setting-item{
  grid-template-rows:auto auto!important;
}
.pv-tool-panel[data-panel="machines"] .pv-machine-setting-main{
  grid-row:1!important;
}
.pv-tool-panel[data-panel="machines"] .pv-machine-setting-footer{
  grid-column:2 / -1;
  grid-row:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.4rem;
  min-width:0;
  padding:.15rem .1rem .05rem .35rem;
}
.pv-tool-panel[data-panel="machines"] .pv-machine-setting-footer .pv-machine-setting-permission{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-tool-panel[data-panel="machines"] .pv-machine-setting-footer .pv-machine-setting-actions{
  position:static!important;
  grid-column:auto!important;
  grid-row:auto!important;
  flex:0 0 auto;
}
@media (min-width:1001px){
  .pv-app.pv-machine-panel-open:not(.pv-layout-overlay){
    grid-template-columns:var(--rail) 0 minmax(0,1fr) var(--right);
  }
  .pv-app.pv-machine-panel-open .pv-left{
    position:fixed;
    top:0;
    bottom:30px;
    left:var(--rail);
    z-index:1550;
    width:min(29rem,calc(100vw - var(--rail) - 1.25rem));
    max-width:none;
    opacity:1;
    pointer-events:auto;
    transform:translateX(0);
    box-shadow:12px 0 32px rgba(15,23,42,.15);
  }
  .pv-app.pv-machine-panel-open.left-closed .pv-left{
    opacity:0;
    pointer-events:none;
    transform:translateX(calc(-100% - 12px));
  }
  .pv-app.pv-layout-overlay.pv-machine-panel-open .pv-left{
    width:min(29rem,calc(100vw - var(--rail) - 1.25rem));
  }
  .pv-app.pv-machine-panel-open.right-collapsed:not(.pv-layout-overlay){
    grid-template-columns:var(--rail) 0 minmax(0,1fr) 0;
  }
}

.pv-tool-panel[data-panel="machines"]{
  padding:.8rem .9rem;
  background:linear-gradient(180deg,#fbfdff 0,#f7f9fc 100%);
}
.pv-tool-panel[data-panel="machines"] .pv-machine-panel-section{
  padding:.85rem;
  gap:.65rem;
  border-color:#dce5f0;
  border-radius:1rem;
  box-shadow:0 .35rem 1.2rem rgba(15,23,42,.045);
}
.pv-machine-panel-heading{
  min-width:0;
}
.pv-machine-panel-heading .pv-section-title{
  margin-bottom:.15rem!important;
}
.pv-machine-panel-heading .pv-muted{
  display:block;
  max-width:19rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-machine-panel-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.45rem;
  flex:0 0 auto;
}
.pv-machine-panel-head-actions .pv-machine-load-toggle{
  min-height:1.9rem;
  padding:.35rem .55rem;
  border-radius:.55rem;
  white-space:nowrap;
}
.pv-machine-panel-head-actions .pv-machine-load-toggle span{
  font-size:var(--pv-fs-10);
}
.pv-machine-panel-head-actions .pv-count-badge{
  min-width:2rem;
  text-align:center;
}

@media (min-width:1001px){
  .pv-app.pv-machine-panel-open .pv-machine-panel-tools{
    gap:.55rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-searchbox{
    min-height:2.2rem;
    padding:.45rem .65rem;
    border-color:#d8e2ef;
    border-radius:.65rem;
    box-shadow:0 .12rem .35rem rgba(15,23,42,.025);
  }
  .pv-app.pv-machine-panel-open .pv-machine-searchbox input{
    font-size:var(--pv-fs-12);
  }
  .pv-app.pv-machine-panel-open .pv-machine-advanced{
    border-radius:.7rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-advanced-toggle{
    min-height:2.15rem;
    padding:.42rem .62rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-advanced-body{
    gap:.55rem;
    padding:.6rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-filter-grid{
    gap:.5rem .6rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-filter-grid label>span{
    margin-left:.05rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-filter-grid .form-select{
    min-height:2rem;
    padding-left:.55rem;
    font-size:var(--pv-fs-10);
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-tools{
    gap:.5rem;
    padding:.58rem;
    border-radius:.65rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-head{
    flex-wrap:nowrap;
    align-items:center;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-head strong{
    flex:1 1 auto;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-head>div{
    flex-wrap:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-scope{
    gap:.3rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-actions{
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:.3rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-actions button{
    min-height:2.55rem;
    padding:.3rem .2rem;
    flex-direction:column;
    gap:.2rem;
    line-height:1.05;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-actions button i{
    font-size:.72rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-batch-actions button span{
    max-width:100%;
    font-size:var(--pv-fs-9);
  }
  .pv-app.pv-machine-panel-open .pv-machine-panel-legend{
    min-height:1.35rem;
    gap:.75rem;
    padding:0 .15rem;
  }

  .pv-app.pv-machine-panel-open .pv-machine-settings{
    padding:.1rem .2rem .25rem .05rem;
    gap:.42rem!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-item{
    grid-template-columns:1.75rem minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    min-height:6.15rem;
    padding:.58rem .62rem .55rem .52rem!important;
    border-radius:.78rem!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-item:hover{
    box-shadow:0 .3rem .9rem rgba(15,23,42,.065);
  }
  .pv-app.pv-machine-panel-open .pv-machine-card-rail{
    grid-column:1!important;
    grid-row:1 / span 2!important;
    display:grid!important;
    grid-template-rows:auto 1fr;
    align-items:start;
    justify-items:center;
    gap:.4rem;
    min-height:0;
    padding:.05rem 0 0;
  }
  .pv-app.pv-machine-panel-open .pv-machine-select{
    margin-top:.05rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-item .pv-machine-card-rail .pv-machine-sort{
    align-self:center!important;
    width:1.35rem!important;
    min-width:1.35rem!important;
    height:2.25rem!important;
    margin:0!important;
    border-radius:.42rem;
    color:#9eafc3!important;
    background:transparent;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-item .pv-machine-card-rail .pv-machine-sort:hover{
    color:#5e789d!important;
    background:#f2f6fb;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-main{
    grid-column:2!important;
    grid-row:1!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    align-items:center;
    gap:.25rem .45rem;
    min-width:0;
    padding:.02rem .12rem .4rem .36rem!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-title{
    grid-column:1 / -1;
    display:flex!important;
    align-items:center;
    gap:.45rem!important;
    min-width:0;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-main strong{
    min-width:0;
    overflow:hidden;
    font-size:var(--pv-fs-12)!important;
    line-height:1.25!important;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-state-dot{
    flex:0 0 auto;
    margin-left:auto;
    margin-right:.05rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-type{
    grid-column:1 / -1;
    display:block;
    min-width:0;
    max-width:100%;
    margin:0!important;
    padding:0!important;
    overflow:hidden;
    border:0!important;
    background:transparent!important;
    color:#53647b!important;
    font-size:var(--pv-fs-10)!important;
    font-weight:650;
    line-height:1.22;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-shift{
    grid-column:1 / -1;
    display:flex!important;
    align-items:center;
    gap:.28rem;
    width:100%;
    min-width:0;
    max-width:100%!important;
    margin:0!important;
    padding:.13rem .42rem!important;
    overflow:hidden;
    border:1px solid #dfe7f1!important;
    border-radius:999px;
    background:#f8fafc!important;
    color:#52657d!important;
    font-size:var(--pv-fs-9)!important;
    line-height:1.22;
    white-space:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-shift i{
    flex:0 0 auto;
    font-size:.62rem;
    opacity:.78;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-shift span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-footer{
    grid-column:2!important;
    grid-row:2!important;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:.55rem;
    min-width:0;
    padding:.02rem .08rem 0 .36rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-permission{
    display:flex!important;
    align-items:center;
    gap:.28rem;
    justify-self:start;
    width:auto;
    min-width:0;
    max-width:11rem!important;
    margin:0!important;
    padding:.14rem .42rem!important;
    overflow:hidden;
    border:1px solid #d6e4fa!important;
    border-radius:999px;
    background:#eef4ff!important;
    color:#3566a3!important;
    font-size:var(--pv-fs-9)!important;
    line-height:1.2;
    white-space:nowrap;
    cursor:help;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-permission i{
    flex:0 0 auto;
    font-size:.62rem;
    opacity:.82;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-permission span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-actions{
    position:static!important;
    grid-column:auto!important;
    grid-row:auto!important;
    align-self:center!important;
    justify-self:end!important;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:.34rem;
    width:auto;
    min-width:max-content;
    padding:0!important;
    border:0!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-action{
    width:1.95rem;
    min-width:1.95rem;
    height:1.9rem;
    border-radius:.55rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-sort-placeholder{
    min-height:6.15rem;
  }
  .pv-app.pv-machine-panel-open .pv-machine-sort-hint{
    padding:.08rem .15rem 0;
    color:#8390a2;
  }
}

/* El drawer de Máquinas trabaja a z-index alto para superponerse al timeline.
   Cuando Bootstrap abre un modal, se rebaja únicamente ese drawer para que
   backdrop y modal recuperen el orden visual esperado. */
body.modal-open .pv-app.pv-machine-panel-open .pv-left{
  z-index:1040!important;
}
#pvMachineScheduleModal{
  z-index:1060;
}

@media (max-width:1000px){
  .pv-machine-panel-head{
    align-items:flex-start;
  }
  .pv-machine-panel-head-actions{
    flex-direction:column-reverse;
    align-items:flex-end;
  }
  .pv-machine-panel-head-actions .pv-machine-load-toggle span{
    display:none;
  }
}

/* V4.8.39 RC — anclaje exacto del cursor al asa de ordenación de máquinas.
   El propio listado es el contenedor con scroll. Al posicionarlo de forma relativa,
   el helper absoluto de jQuery UI Sortable comparte el mismo sistema de coordenadas
   y no salta verticalmente cuando la lista ya está desplazada. */
.pv-app.pv-machine-panel-open .pv-machine-settings{
  position:relative;
}
.pv-app.pv-machine-panel-open .pv-machine-setting-item.ui-sortable-helper{
  z-index:4;
  cursor:grabbing;
}
.pv-app.pv-machine-panel-open .pv-machine-setting-item.ui-sortable-helper .pv-machine-sort{
  cursor:grabbing!important;
}


/* V4.8.40 RC — colocación fina de selección y asa en las cards de Máquinas.
   El checkbox queda anclado a la esquina superior izquierda y el asa se centra
   verticalmente junto al borde, dejando el carril de contenido completamente libre. */
@media (min-width:1001px){
  .pv-app.pv-machine-panel-open .pv-machine-setting-item{
    position:relative;
    grid-template-columns:1.55rem minmax(0,1fr)!important;
    padding-left: 0.28rem!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-card-rail{
    position:absolute!important;
    inset:0 auto 0 0!important;
    width:1.85rem!important;
    min-width:1.85rem!important;
    display:block!important;
    padding:0!important;
    margin:0!important;
    z-index:2;
  }
  .pv-app.pv-machine-panel-open .pv-machine-select{
    position:absolute!important;
	top: 0.06rem !important;
	left: 0.16rem !important;
    margin:0!important;
    z-index:3;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-item .pv-machine-card-rail .pv-machine-sort{
    position:absolute!important;
    top:50%!important;
    left: -0.04rem !important;
    transform:translateY(-50%)!important;
    align-self:auto!important;
    width:1.28rem!important;
    min-width:1.28rem!important;
    height:2.35rem!important;
    margin:0!important;
    z-index:2;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-main{
    padding-left:.18rem!important;
  }
  .pv-app.pv-machine-panel-open .pv-machine-setting-footer{
    padding-left:.18rem!important;
  }
}


/* V4.8.42 RC — Autoavance de Vista de control y estado de ejecución real. */
.pv-control-meta .pv-control-auto-advance{transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}
.pv-control-meta .pv-control-auto-advance.is-active{background:#eaf2ff;border-color:#8fb5f5;color:#1d4ed8;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.pv-control-notice.is-auto-advance{color:#1e4f91}.pv-control-notice.is-auto-advance i{color:#2563eb}
.pv-real-state-chip{max-width:9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#eef6ff!important;color:#24558d!important;border-color:#c6dcf5!important}
.pv-real-state-chip i{margin-right:.25rem}
.pv-task-real-state{position:absolute;right:.32rem;top:.28rem;display:inline-flex;align-items:center;gap:.2rem;max-width:42%;padding:.08rem .28rem;border:1px solid rgba(255,255,255,.58);border-radius:.35rem;background:rgba(255,255,255,.84);color:#294a70;font-size:.56rem;font-style:normal;font-weight:800;line-height:1.1;box-shadow:0 1px 2px rgba(15,23,42,.08);z-index:4}
.pv-task-real-state span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-task.has-real-state .pv-task-code{padding-right:3.4rem}
.pv-task-density-compact .pv-task-real-state{display:none}

.pv-task.locked .pv-task-real-state{right:1.75rem}
.pv-task-real-dot{position:absolute;right:.35rem;top:.34rem;color:#24558d;font-size:.6rem;z-index:4}
.pv-task-density-compact.locked .pv-task-real-dot{right:1.45rem}


/* V4.8.43 RC — jerarquía visual entre Ordenación y filtros y Cola de trabajo.
   Los controles se leen como una herramienta auxiliar azul y la cola como el
   bloque principal de resultados, sin alterar su estructura ni interacción. */
.pv-right .pv-queue-controls{
  border-color:#b9cde4;
  border-left:4px solid #3976bd;
  background:#edf4fb;
  box-shadow:0 3px 10px rgba(31,65,104,.08);
}
.pv-right .pv-queue-controls .pv-queue-collapsible-toggle{
  background:linear-gradient(180deg,#f2f7fc 0%,#e6eff9 100%);
}
.pv-right .pv-queue-controls .pv-queue-collapsible-toggle:hover{
  background:#deebf8;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-title>i{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:7px;
  background:#d6e6f7;
  color:#2865aa;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-title strong{
  color:#244b78;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-body,
.pv-right .pv-queue-controls-group--sort,
.pv-right .pv-queue-controls-group--filter{
  background:#edf3f9;
}
.pv-right .pv-queue-controls .pv-queue-collapsible-body{
  border-top-color:#c7d7e7;
}
.pv-right .pv-queue-controls-group + .pv-queue-controls-group{
  border-top-color:#cbd9e7;
}

/* El selector de vista queda como transición neutra entre herramienta y datos. */
.pv-right .pv-queue-view-tabs--persistent{
  border-color:#d3dde8;
  background:#e8edf3;
}

/* La cola recupera un perímetro propio. La cabecera conserva el fondo claro
   y se diferencia únicamente por bordes y jerarquía tipográfica. */
.pv-right .pv-backlog-lanes{
  margin:0 10px 10px;
  padding:0;
  border:1px solid #c3d0df;
  border-top:3px solid #3976bd;
  border-radius:.82rem;
  background:#f3f6fa;
  box-shadow:0 5px 16px rgba(31,50,73,.09);
}
.pv-right .pv-backlog-lane{
  border:0;
  border-radius:.78rem;
  background:#f3f6fa;
}
.pv-right .pv-lane-head.pv-queue-head{
  margin:0;
  padding:.58rem .62rem .62rem;
  border:0;
  border-bottom:2px solid #b7cae0;
  border-radius:.76rem .76rem 0 0;
  background:#fbfcfe;
  box-shadow:none;
}
.pv-right .pv-queue-head-top .pv-lane-title{
  color:#244b78;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.12em;
}
.pv-right .pv-pending-list{
  padding:.62rem;
  background:#f3f6fa;
}
.pv-right .pv-pending-list.is-hierarchical{
  padding:.62rem;
}

@media (max-width:520px){
  .pv-right .pv-backlog-lanes{margin-left:7px;margin-right:7px}
}


/* V4.8.44 RC — estado de carga discreto y accesible para la cola. */
.pv-right .pv-queue-head-top .pv-lane-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.42rem;
}
.pv-right .pv-queue-title-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pv-right .pv-queue-loading{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:.24rem;
  color:#3976bd;
  font-size:.61rem;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
  white-space:nowrap;
  opacity:0;
  animation:pvQueueLoadingReveal .14s ease .18s forwards;
}
.pv-right .pv-queue-loading[hidden]{display:none!important}
.pv-right .pv-queue-loading i,
.pv-right.is-loading #pvRefreshQueue i,
.pv-right #pvRefreshQueue.is-loading i{
  animation:pvQueueLoadingSpin .8s linear infinite;
}
.pv-right.is-loading #pvRefreshQueue,
.pv-right #pvRefreshQueue.is-loading{
  color:#3976bd;
}
@keyframes pvQueueLoadingReveal{to{opacity:1}}
@keyframes pvQueueLoadingSpin{to{transform:rotate(360deg)}}
@media (max-width:520px){
  .pv-right .pv-queue-head-top .pv-lane-title{justify-content:flex-start}
}
@media (prefers-reduced-motion:reduce){
  .pv-right .pv-queue-loading{opacity:1;animation:none}
  .pv-right .pv-queue-loading i,
  .pv-right.is-loading #pvRefreshQueue i,
  .pv-right #pvRefreshQueue.is-loading i{animation:none}
}

/* V4.8.45 RC — experiencia operativa para tablet y móvil.
   La adaptación conserva el timeline como superficie principal y convierte
   cola y herramientas en vistas superpuestas. En dispositivos táctiles las
   operaciones críticas se realizan mediante toque, formularios y acciones
   explícitas; drag, resize y relaciones gráficas quedan reservados al ratón. */
.pv-mobile-only,
.pv-mobile-nav,
.pv-mobile-backdrop{
  display:none;
}

.pv-app.pv-touch-layout .pv-toolbtn,
.pv-app.pv-touch-layout .pv-icon-btn,
.pv-app.pv-touch-layout .pv-menu-compact,
.pv-app.pv-touch-layout .form-control,
.pv-app.pv-touch-layout .form-select{
  min-height:2.75rem;
}
.pv-app.pv-touch-layout .pv-task,
.pv-app.pv-touch-layout .pv-card{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.pv-app.pv-touch-restricted .pv-rel-handle,
.pv-app.pv-touch-restricted .ui-resizable-handle{
  display:none!important;
}
.pv-app.pv-touch-restricted .pv-card-sort,
.pv-app.pv-touch-restricted .pv-machine-sort{
  opacity:.38;
  pointer-events:none;
}
.pv-app.pv-touch-layout .pv-shortcuts{
  display:none;
}
.pv-app.pv-touch-restricted #pvViewport{
  touch-action:none;
  overscroll-behavior:contain;
}

@media (min-width:768px) and (max-width:1180px){
  .pv-app.pv-tablet-layout{
    --rail:64px;
    --machine:166px;
  }
  .pv-app.pv-tablet-layout .pv-rail{
    padding-left:5px;
    padding-right:5px;
  }
  .pv-app.pv-tablet-layout .pv-rail-btn{
    width:52px;
    height:54px;
  }
  .pv-app.pv-tablet-layout.pv-layout-overlay .pv-left,
  .pv-app.pv-tablet-layout.pv-layout-overlay .pv-right{
    width:min(27rem,calc(100vw - var(--rail) - .75rem));
  }
  .pv-app.pv-tablet-layout .pv-board{
    margin:8px;
  }
}

@media (max-width:767.98px){
  html,body{
    width:100%;
    min-width:0;
    overscroll-behavior:none;
  }
  body{
    background:#eef3fa;
  }
  .pv-app.pv-mobile-layout{
    --rail:0px;
    --left:100vw;
    --right:100vw;
    --machine:112px;
    height:100dvh;
    min-height:100vh;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr) 62px!important;
    overflow:hidden;
  }
  .pv-app.pv-mobile-layout .pv-main{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0;
  }
  .pv-app.pv-mobile-layout .pv-statusbar{
    display:none!important;
  }
  .pv-app.pv-mobile-layout .pv-desktopbar{
    min-height:94px;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:38px 50px;
    gap:0 6px;
    padding:4px 6px 5px;
  }
  .pv-app.pv-mobile-layout .pv-window-title{
    grid-column:1;
    grid-row:1;
    flex-direction:row;
    align-items:center;
    gap:.45rem;
    min-width:0;
    padding-left:3px;
  }
  .pv-app.pv-mobile-layout .pv-window-title .pv-app-title{
    display:none;
  }
  .pv-app.pv-mobile-layout .pv-window-title #pvTitle{
    max-width:100%!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#334155;
    font-size:.78rem;
    font-weight:850;
  }
  .pv-app.pv-mobile-layout .pv-top-row{
    grid-column:2;
    grid-row:1;
    justify-content:flex-end;
  }
  .pv-app.pv-mobile-layout .pv-menu-strip,
  .pv-app.pv-mobile-layout .pv-menu-compact,
  .pv-app.pv-mobile-layout .pv-data-mode,
  .pv-app.pv-mobile-layout .pv-presence-badge,
  .pv-app.pv-mobile-layout #pvFit,
  .pv-app.pv-mobile-layout #pvToggleBacklog,
  .pv-app.pv-mobile-layout #pvSelectionTool,
  .pv-app.pv-mobile-layout #pvMode,
  .pv-app.pv-mobile-layout .pv-zoom-label{
    display:none!important;
  }
  .pv-app.pv-mobile-layout .pv-user-badge{
    display:inline-flex!important;
    width:2.25rem!important;
    min-width:2.25rem!important;
    height:2.25rem;
    padding:0!important;
    justify-content:center;
  }
  .pv-app.pv-mobile-layout .pv-user-badge span{
    display:none!important;
  }
  .pv-app.pv-mobile-layout .pv-toolbar{
    grid-column:1 / -1;
    grid-row:2;
    min-width:0;
    padding:4px;
    gap:4px;
    border-radius:.72rem;
    box-shadow:none;
  }
  .pv-app.pv-mobile-layout .pv-toolbar-left,
  .pv-app.pv-mobile-layout .pv-toolbar-right{
    gap:4px;
  }
  .pv-app.pv-mobile-layout .pv-toolbar-left{
    flex:1 1 auto;
    overflow:hidden;
  }
  .pv-app.pv-mobile-layout .pv-toolbar-right{
    flex:0 0 auto;
  }
  .pv-app.pv-mobile-layout .pv-toolbar .pv-toolbtn{
    min-width:2.55rem;
    min-height:2.35rem;
    padding:0 .58rem;
    border-radius:.62rem;
    font-size:.72rem;
  }
  .pv-app.pv-mobile-layout .pv-mobile-only{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .pv-app.pv-mobile-layout .pv-mobile-zoom{
    flex:0 0 2.55rem;
    padding:0!important;
  }
  .pv-app.pv-mobile-layout #pvSave{
    max-width:5.3rem;
  }
  .pv-app.pv-mobile-layout .pv-board{
    margin:5px;
    border-radius:.72rem;
    box-shadow:0 7px 20px rgba(13,25,46,.10);
  }
  .pv-app.pv-mobile-layout .pv-board-head{
    height:48px;
  }
  .pv-app.pv-mobile-layout .pv-machine-col{
    padding-left:8px;
    font-size:.68rem;
  }
  .pv-app.pv-mobile-layout .pv-machine{
    padding:.38rem .4rem;
  }
  .pv-app.pv-mobile-layout .pv-machine .pv-machine-name{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.72rem;
  }
  .pv-app.pv-mobile-layout .pv-machine small,
  .pv-app.pv-mobile-layout .pv-machine em{
    font-size:.57rem;
  }
  .pv-app.pv-mobile-layout .pv-machine .status{
    margin-top:4px;
    padding:1px 5px;
    font-size:.54rem;
  }
  .pv-app.pv-mobile-layout .pv-machine-load{
    margin-top:4px;
  }
  .pv-app.pv-mobile-layout .pv-navigator{
    display:none!important;
  }
  .pv-app.pv-mobile-layout .pv-hscroll{
    height:10px;
  }
  .pv-app.pv-mobile-layout #pvViewport{
    touch-action:none;
    overscroll-behavior:contain;
  }
  .pv-app.pv-mobile-layout .pv-task{
    min-height:2.35rem;
  }
  .pv-app.pv-mobile-layout .pv-task:not(.pv-task-density-compact)>span:not(.pv-task-code),
  .pv-app.pv-mobile-layout .pv-task:not(.pv-task-density-compact)>small{
    display:none;
  }
  .pv-app.pv-mobile-layout .pv-task .pv-task-code{
    font-size:.66rem;
  }

  .pv-app.pv-mobile-layout .pv-left,
  .pv-app.pv-mobile-layout .pv-right,
  .pv-app.pv-mobile-layout.pv-layout-overlay .pv-left,
  .pv-app.pv-mobile-layout.pv-layout-overlay .pv-right{
    position:fixed!important;
    inset:0 0 62px 0!important;
    width:100vw!important;
    max-width:none!important;
    min-width:0!important;
    z-index:1550;
    border:0;
    border-radius:0;
    box-shadow:none;
    transform:none;
  }
  .pv-app.pv-mobile-layout.left-closed .pv-left,
  .pv-app.pv-mobile-layout.pv-layout-overlay.left-closed .pv-left{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateX(-100%);
  }
  .pv-app.pv-mobile-layout.right-collapsed .pv-right,
  .pv-app.pv-mobile-layout.pv-layout-overlay.right-collapsed .pv-right{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateX(100%);
  }
  .pv-app.pv-mobile-layout .pv-left:not([aria-hidden="true"]),
  .pv-app.pv-mobile-layout .pv-right:not([aria-hidden="true"]){
    visibility:visible;
  }
  .pv-app.pv-mobile-layout .pv-left-head,
  .pv-app.pv-mobile-layout .pv-panel-head{
    height:58px;
    padding:10px 12px;
  }
  .pv-app.pv-mobile-layout .pv-tool-panel{
    height:calc(100% - 58px);
    padding:10px;
  }
  .pv-app.pv-mobile-layout .pv-backlog-tools{
    padding:8px 10px 6px;
  }
  .pv-app.pv-mobile-layout .pv-queue-controls,
  .pv-app.pv-mobile-layout .pv-queue-view-tabs--persistent{
    margin-left:7px;
    margin-right:7px;
  }
  .pv-app.pv-mobile-layout .pv-backlog-lanes{
    margin:0 7px 7px;
  }
  .pv-app.pv-mobile-layout .pv-pending-list,
  .pv-app.pv-mobile-layout .pv-pending-list.is-hierarchical{
    padding:.45rem;
  }
  .pv-app.pv-mobile-layout .pv-card{
    min-height:5.15rem;
  }
  .pv-app.pv-mobile-layout .pv-card-main{
    cursor:pointer;
  }

  .pv-app.pv-mobile-layout .pv-mobile-backdrop{
    position:fixed;
    inset:0 0 62px;
    z-index:1500;
    width:auto;
    height:auto;
    padding:0;
    border:0;
    background:rgba(15,23,42,.28);
  }
  .pv-app.pv-mobile-layout .pv-mobile-backdrop:not([hidden]){
    display:block;
  }
  .pv-app.pv-mobile-layout .pv-mobile-nav{
    grid-column:1;
    grid-row:2;
    position:relative;
    z-index:1700;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    min-width:0;
    height:62px;
    padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));
    border-top:1px solid #cbd6e4;
    background:rgba(255,255,255,.98);
    box-shadow:0 -8px 24px rgba(15,23,42,.10);
  }
  .pv-app.pv-mobile-layout .pv-mobile-nav>button{
    min-width:0;
    border:0;
    border-radius:.65rem;
    background:transparent;
    color:#64748b;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    font-size:.62rem;
    font-weight:800;
  }
  .pv-app.pv-mobile-layout .pv-mobile-nav>button i{
    font-size:1.02rem;
  }
  .pv-app.pv-mobile-layout .pv-mobile-nav>button.is-active{
    background:#eaf2ff;
    color:#2458d3;
  }

  .pv-app.pv-mobile-layout .pv-rail{
    display:none;
  }
  .pv-app.pv-mobile-layout.pv-mobile-rail-open .pv-rail{
    position:fixed;
    left:8px;
    right:8px;
    bottom:68px;
    top:auto;
    z-index:1650;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-auto-rows:64px;
    gap:6px;
    width:auto;
    max-height:calc(100dvh - 86px);
    padding:10px;
    overflow:auto;
    border:1px solid rgba(148,163,184,.26);
    border-radius:1rem;
    box-shadow:0 22px 60px rgba(15,23,42,.34);
  }
  .pv-app.pv-mobile-layout.pv-mobile-rail-open .pv-rail-logo,
  .pv-app.pv-mobile-layout.pv-mobile-rail-open .pv-rail-bottom{
    display:none;
  }
  .pv-app.pv-mobile-layout.pv-mobile-rail-open .pv-rail-btn{
    width:100%;
    height:64px;
    margin:0;
  }

  body.modal-open .modal{
    padding:0!important;
  }
  body.modal-open .pv-app.pv-mobile-layout .pv-left,
  body.modal-open .pv-app.pv-mobile-layout .pv-right,
  body.modal-open .pv-app.pv-mobile-layout .pv-rail{
    z-index:1040!important;
  }
  body.modal-open .pv-app.pv-mobile-layout .pv-mobile-nav,
  body.modal-open .pv-app.pv-mobile-layout .pv-mobile-backdrop{
    visibility:hidden;
    pointer-events:none;
  }
  body.modal-open .modal-dialog,
  body.modal-open .pv-editor-modal .modal-dialog,
  body.modal-open .pv-conflict-modal .modal-dialog{
    position:relative!important;
    inset:auto!important;
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    min-height:calc(100dvh - 12px);
    margin:6px auto!important;
    transform:none!important;
  }
  body.modal-open .modal-content{
    max-height:calc(100dvh - 12px);
    border-radius:.9rem;
  }
  body.modal-open .modal-header,
  body.modal-open .modal-footer{
    padding:.75rem;
  }
  body.modal-open .modal-body{
    padding:.75rem;
  }
  body.modal-open .modal-footer{
    gap:.45rem;
  }
  body.modal-open .modal-footer .btn{
    min-height:2.75rem;
    flex:1 1 auto;
  }
  .pv-toast{
    right:8px;
    bottom:70px;
    width:calc(100vw - 16px);
  }
}

@media (min-width:768px) and (max-width:1180px){
  body.modal-open .pv-app.pv-tablet-layout .pv-left,
  body.modal-open .pv-app.pv-tablet-layout .pv-right{
    z-index:1040!important;
  }
}

@media (max-width:380px){
  .pv-app.pv-mobile-layout{
    --machine:98px;
  }
  .pv-app.pv-mobile-layout #pvWeek{
    display:none;
  }
  .pv-app.pv-mobile-layout .pv-toolbar .pv-toolbtn{
    padding:0 .45rem;
  }
  .pv-app.pv-mobile-layout.pv-mobile-rail-open .pv-rail{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
