/*
  Legacy layout styles (deprecated).
  These rules are kept for backward compatibility but should only apply
  when explicitly opting in via body.legacy-layout.
*/
body.legacy-layout {
  display: flex;
  height: 100vh;
}

body.legacy-layout .sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: #f8f9fa;
  padding: 1rem;
  overflow-y: auto;
  position: relative;
  z-index: 1000;
}

body.legacy-layout .main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
}

body.legacy-layout .sidebar .nav-link {
  color: #333;
}

body.legacy-layout .sidebar .nav-link.active,
body.legacy-layout .sidebar .nav-link:hover {
  color: #0d6efd;
  background-color: #e9ecef;
}

.cliente-quick-lookup {
  padding: .8rem .9rem .85rem;
  border: 1px solid rgba(var(--bs-primary-rgb), .35);
  border-radius: .6rem;
  background: rgba(var(--bs-primary-rgb), .08);
}

/* La ventana de alta rápida necesita un poco más de espacio para el catálogo. */
#clienteVehiculoRapidoModal .modal-dialog {
  max-width: min(575px, calc(100% - 2rem));
}

.cliente-quick-lookup .form-control {
  min-width: 0;
}

.cliente-quick-lookup__status {
  margin-top: .55rem;
  color: var(--bs-info-text-emphasis);
  font-size: .82rem;
}

.cliente-quick-lookup__status.is-error {
  color: var(--bs-danger-text-emphasis);
}

.vehicle-catalog-lookup {
  position: relative;
}

.vehicle-catalog-lookup__label-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 1.5rem;
  margin-bottom: .35rem;
}

.vehicle-catalog-lookup__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(var(--bs-primary-rgb), .55);
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb), .14);
  color: var(--bs-primary-text-emphasis);
  font-size: .7rem;
  line-height: 1;
}

.vehicle-catalog-lookup__add:hover,
.vehicle-catalog-lookup__add:focus-visible {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
}

.vehicle-catalog-quick-add__context {
  margin-bottom: .75rem;
}

.vehicle-catalog-lookup__control {
  position: relative;
  display: flex;
  align-items: center;
}

.vehicle-catalog-lookup__input {
  padding-right: 4rem;
  padding-left: 2.25rem;
}

.vehicle-catalog-lookup__icon {
  position: absolute;
  left: .8rem;
  z-index: 2;
  color: var(--bs-secondary-color);
  pointer-events: none;
}

.vehicle-catalog-lookup__toggle {
  position: absolute;
  right: .2rem;
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: var(--bs-secondary-color);
}

.vehicle-catalog-lookup__toggle:hover,
.vehicle-catalog-lookup__toggle:focus-visible {
  background: rgba(var(--bs-primary-rgb), .16);
  color: var(--bs-body-color);
}

.vehicle-catalog-lookup__menu {
  position: absolute;
  z-index: 1070;
  top: calc(100% + .25rem);
  right: 0;
  left: 0;
  max-height: 15rem;
  padding: .35rem;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: .6rem;
  background: var(--bs-body-bg);
  box-shadow: 0 .65rem 1.4rem rgba(0, 0, 0, .3);
}

.vehicle-catalog-lookup__option,
.vehicle-catalog-lookup__empty {
  display: block;
  width: 100%;
  padding: .52rem .65rem;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: var(--bs-body-color);
  text-align: left;
}

.vehicle-catalog-lookup__option { cursor: pointer; }

.vehicle-catalog-lookup__option:hover,
.vehicle-catalog-lookup__option:focus-visible,
.vehicle-catalog-lookup__option.is-highlighted {
  background: rgba(var(--bs-primary-rgb), .18);
  outline: 0;
}

.vehicle-catalog-lookup__empty {
  color: var(--bs-secondary-color);
  font-size: .85rem;
}

.vehicle-catalog-lookup.is-disabled { opacity: .68; }

body.legacy-layout .sidebar .nav-link .bi {
  margin-right: 0.5rem;
}

@media (max-width: 767.98px) {
  body.legacy-layout {
    padding-top: 56px;
  }
}
.system-print-preview-modal {
  padding: 0 !important;
  background: #fff !important;
  color-scheme: only light;
}

.system-print-preview-modal .modal-dialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
}

.system-print-preview-modal .modal-content {
  width: 100%;
  height: 100% !important;
  max-height: 100vh !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.system-print-preview-modal .modal-header,
.system-print-preview-modal .modal-footer {
  display: none !important;
}

.system-print-preview-modal .modal-body {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 6.15rem 0 0 !important;
  overflow: hidden;
  background: #fff !important;
}

.system-print-preview-modal .modal-body > .ratio,
.system-print-preview-modal .modal-body > [style*="height: 72vh"] {
  width: 100%;
  height: 100% !important;
  min-height: 0;
  flex: 1 1 auto;
}

.system-print-preview-modal .modal-body > .ratio {
  --bs-aspect-ratio: 0;
}

.system-print-preview-modal iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color-scheme: only light;
}

.system-print-preview-modal iframe.system-print-preview-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.system-print-preview-pages {
  position: absolute;
  top: 6.15rem;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  overflow: auto;
  padding: .25rem 1rem 3rem;
  background: #fff !important;
  color: #334155;
  color-scheme: only light;
}

.system-print-preview-pages__status {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: auto;
  color: #64748b;
  font-weight: 600;
  text-align: center;
}

.system-print-preview-pages__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border-width: .22rem;
  color: #111827;
}

.system-print-preview-pages canvas {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 .25rem 1rem rgba(15, 23, 42, .14);
}

body.app-body .system-print-preview-actions-wrap:not(.d-none) {
  position: absolute !important;
  top: 1.4rem;
  left: 50%;
  z-index: 20;
  display: flex !important;
  width: min(calc(100% - 3rem), 34rem) !important;
  justify-content: center;
  padding: 0 !important;
  transform: translateX(-50%);
  pointer-events: none;
}

body.app-body .system-print-preview-actions {
  display: flex !important;
  width: auto !important;
  max-width: 100%;
  flex-wrap: nowrap;
  justify-content: center;
  gap: .45rem !important;
  border: 0;
  border-radius: 999px !important;
  padding: .6rem !important;
  background: #fff !important;
  box-shadow: 0 .55rem 1.75rem rgba(15, 23, 42, .16) !important;
  pointer-events: auto;
}

body.app-body .system-print-preview-action {
  min-width: 0;
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px !important;
  padding: .5rem 1rem !important;
  background: #fff !important;
  color: #000 !important;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  opacity: 1;
}

body.app-body .system-print-preview-action:hover,
body.app-body .system-print-preview-action:focus-visible {
  border-color: #94a3b8 !important;
  background: #f1f5f9 !important;
  color: #000 !important;
}

body.app-body .system-print-preview-action--primary {
  border-color: #111827 !important;
  background: #111827 !important;
  color: #fff !important;
  font-weight: 750;
}

body.app-body .system-print-preview-action--primary:hover,
body.app-body .system-print-preview-action--primary:focus-visible {
  border-color: #263248 !important;
  background: #263248 !important;
  color: #fff !important;
}

body.app-body .system-print-preview-action:disabled,
body.app-body .system-print-preview-action.disabled,
body.app-body .system-print-preview-action[aria-disabled="true"] {
  border-color: #dbe2ea !important;
  background: #fff !important;
  color: #000 !important;
  opacity: 1 !important;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .system-print-preview-modal .modal-dialog {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
  }

  .system-print-preview-modal .modal-content {
    border-radius: 0 !important;
  }

  body.app-body .system-print-preview-actions-wrap:not(.d-none) {
    top: 1.2rem;
    width: calc(100% - 2.5rem) !important;
  }

  body.app-body .system-print-preview-actions {
    width: 100% !important;
  }

  body.app-body .system-print-preview-action {
    flex: 1 1 0;
    padding-right: .65rem !important;
    padding-left: .65rem !important;
  }
}
