@layer products-studio {
 @media screen {
  html[data-products-hosted][data-products-studio] #fp-stage .products-window-shell {
    inset: 0 !important;
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    translate: none !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  html[data-products-hosted][data-products-studio] .products-window-head > :is([data-min],[data-max]),
  html[data-products-hosted][data-products-studio] #productDetail > .dialog-head > :is(button:not(#closeProductDetail),.cw-grips) {
    display:none!important;
  }
  html[data-products-hosted][data-products-studio] :is(.products-window-head [data-close],#closeProductDetail) {
    width:auto!important;
    min-width:75px!important;
    padding-inline:8px!important;
    flex:0 0 auto!important;
    font-size:13px!important;
    order:-1;
  }
  html[data-products-hosted][data-products-studio] .products-dialog-shade {display:none!important}
  html[data-products-hosted][data-products-studio] #productDetail[open] {
    inset:0!important;
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
    translate:none!important;
    transform:none!important;
    border:0!important;
    border-radius:0!important;
    resize:none!important;
  }
  html[data-products-hosted][data-products-studio] #productDetail .dialog-head {
    background:#fff!important;
    border-bottom:1px solid #e7e0d9;
    color:#443638!important;
    cursor:default!important;
  }
  html[data-products-hosted][data-products-studio] #productDetail .dialog-head::before,
  html[data-products-hosted][data-products-studio] #productDetail .dialog-head::after {content:none!important}
  html[data-products-hosted][data-products-studio] #productDetail .dialog-head :is(h2,small) {color:#443638!important}
  html[data-products-hosted][data-products-studio] #productDetail .dialog-head #closeProductDetail {
    color:#443638!important;
    border:1px solid #d8cdc4!important;
    background:#fff!important;
    font-size:13px!important;
  }
  html[data-products-hosted][data-products-studio] #fp-stage .products-window-shell .products-window-head {
    background:#faf8f6!important;
    border-bottom:1px solid #e7e0d9;
    cursor:default!important;
  }
  html[data-products-hosted][data-products-studio] #fp-stage .products-window-head::before,
  html[data-products-hosted][data-products-studio] #fp-stage .products-window-head::after {
    content:none!important;
  }
  html[data-products-hosted][data-products-studio] #fp-stage .products-window-head [data-close] {
    background:#fff!important;
    border:1px solid #d8cdc4!important;
    color:#443638!important;
    -webkit-text-fill-color:#443638!important;
  }
  html[data-products-hosted][data-products-studio] .products-window-shell:has(iframe[src*="/facturas/"]) .products-window-title {
    display:none!important;
  }
  @media (max-width:639px) {
    html[data-products-hosted][data-products-studio] #productDetail table {
      display:block!important;
      min-width:0!important;
    }
    html[data-products-hosted][data-products-studio] #productDetail thead {
      position:absolute;
      width:1px;
      height:1px;
      overflow:hidden;
      clip-path:inset(50%);
    }
    html[data-products-hosted][data-products-studio] #productDetail tbody {
      display:grid!important;
      gap:7px;
    }
    html[data-products-hosted][data-products-studio] #productDetail tbody tr {
      display:grid!important;
      grid-template-columns:repeat(2,minmax(0,1fr));
      padding:6px 8px!important;
      gap:5px 8px;
      border:1px solid #e7e0d9;
      border-radius:7px;
    }
    html[data-products-hosted][data-products-studio] #productDetail tbody td {
      display:block!important;
      padding:0!important;
      border:0!important;
      min-width:0;
      overflow-wrap:anywhere;
    }
    html[data-products-hosted][data-products-studio] #productDetail tbody td[colspan] {grid-column:1 / -1}
    html[data-products-hosted][data-products-studio] #productDetail td[data-movement-label]::before {
      display:block!important;
      content:attr(data-movement-label);
      color:#66585a;
      font-size:10px;
      font-weight:650;
    }
  }
 }
}
@layer quotation-overrides {
  @media screen {
    #fp-stage[data-products-host] > .caja-module-chrome > header {
      background: linear-gradient(110deg,#292530,#695045) !important;
    }
    #fp-stage[data-products-host] > .caja-module-chrome > header button {
      background: transparent !important;
      color: #fff !important;
      -webkit-text-fill-color: #fff !important;
      border: 0 !important;
      box-shadow: none !important;
    }
    #fp-stage[data-products-host] > .caja-module-chrome > header button:is(:hover,:focus-visible) {
      background: #ffffff25 !important;
    }
  }
}
@layer products-studio {
  @media screen {
    html[data-products-hosted][data-products-studio] .module-bar {display:none!important}
    html[data-products-hosted] .rc-query-search {
      display:flex!important;
      align-items:center!important;
      flex:1 1 155px!important;
      border:1px solid #d8cdc4!important;
      border-radius:8px;
      min-width:0;
      background:#fff!important;
    }
    html[data-products-hosted] .rc-query-search:focus-within {border-color:#765c4e!important}
    html[data-products-hosted][data-products-studio] .rc-query-search > #query {
      flex:1;
      min-width:0;
      border:0!important;
      background:transparent!important;
      box-shadow:none!important;
      outline:none!important;
    }
    html[data-products-hosted] .rc-query-search > .sn-search-camera504 {
      border:0!important;
      background:transparent!important;
      box-shadow:none!important;
      margin:0!important;
    }
    html[data-products-hosted] .products-export-actions {
      display:flex!important;
      flex:none;
      gap:6px;
      margin:0!important;
    }
    html[data-products-hosted] .products-export-actions button {
      min-height:44px;
      padding:6px 9px;
      border-radius:8px;
      border:1px solid #d8cdc4!important;
      color:#493b3d!important;
      background:#fff!important;
      font-size:12px!important;
    }
    @media (max-width:767px) {
      html[data-products-hosted] .rc-query-search {flex:0 1 auto!important}
      html[data-products-hosted] .products-export-actions {width:100%}
      html[data-products-hosted] .products-export-actions button {flex:1}
    }
  }
}
@layer brand-density {
  @media screen {
    html[data-products-hosted][data-products-studio] .rc-query-search > #query {
      border:0!important;
      box-shadow:none!important;
      outline:none!important;
      background:transparent!important;
    }
  }
}
@layer fiscalCaja {
  @media screen {
    html[data-products-inline-document] #detailDialog[open] {
      position:fixed!important;
      box-sizing:border-box;
      inset:0!important;
      width:100%!important;
      height:100%!important;
      max-width:none!important;
      max-height:none!important;
      margin:0!important;
      border:0!important;
      border-radius:0!important;
      translate:none!important;
      transform:none!important;
      resize:none!important;
    }
    html[data-products-inline-document] #detailDialog[open] > :is(#detailDragHandle,.cw-grips),
    html[data-products-inline-document] #detailDialog[open] > footer > small {
      display:none!important;
    }
  }
}

@layer fiscalCaja {
  @media screen {
    html[data-sales-receipt-content="receipt"] #detailDialog #detailBody {
      background: #f2f4f8 !important;
      padding: 12px !important;
    }

    [data-sales-document] {
      display: grid !important;
      gap: 10px !important;
      max-width: 1050px !important;
      color: #253450;
    }
    [data-sales-document] :is(.fi-receipt-displaybar,.fi-receipt-paper-heading,
      .fi-receipt-payments,.fi-receipt-amounts,.fi-receipt-technical) {
      display: none !important;
    }
    [data-sales-document] :is(.fi-receipt-main,.fi-receipt-detail-column) {
      display: block !important;
      min-width: 0 !important;
      background: transparent !important;
      border: 0 !important;
      padding: 0 !important;
      box-shadow: none !important;
    }
    .sales-document-summary {
      display: grid;
      grid-template-columns: minmax(0,.65fr) minmax(0,1.35fr);
      gap: 18px;
      align-items: start;
      background: #fff;
      border: 1px solid #d8deeb;
      border-radius: 10px;
      padding: 13px 15px;
    }
    .sales-document-reference {
      min-width: 0;
    }
    .sales-document-type {
      margin: 0 0 4px;
      color: #514c78;
      font-weight: 650;
      font-size: 12px;
    }
    .sales-document-number {
      margin: 0 0 5px;
      color: #27304f;
      font-size: clamp(16px, 2.6vw, 22px);
      line-height: 1.2;
      overflow-wrap: anywhere;
    }
    .sales-document-sale-reference {
      margin: 0 0 4px;
      color: #56647c;
      font-size: 12px;
    }
    .sales-document-summary .status {
      display: inline-flex;
    }
    [data-sales-document] .sales-document-summary .doc-meta {
      display: grid !important;
      grid-template-columns: repeat(2,minmax(0,1fr)) !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      gap: 8px 16px !important;
      background: transparent !important;
      border: 0 !important;
    }
    [data-sales-document] .doc-meta > div {
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      background: transparent !important;
      border: 0 !important;
      overflow: visible !important;
    }
    [data-sales-document] :is(.doc-meta > div,.credit-links)[hidden] {
      display: none !important;
    }
    [data-sales-document] .doc-meta small {
      color: #56647c !important;
      letter-spacing: .04em !important;
    }
    [data-sales-document] .doc-meta b {
      display: block !important;
      color: #26324e !important;
      white-space: normal !important;
      overflow-wrap: anywhere !important;
      line-height: 1.35 !important;
    }
    [data-sales-document] .ticket-content-grid {
      display: grid !important;
      grid-template-columns: minmax(0,1fr) minmax(235px,.56fr) !important;
      align-items: start !important;
      gap: 10px !important;
      margin: 0 !important;
      padding: 0 !important;
      background: transparent !important;
    }
    [data-sales-document][data-receipt-format="horizontal"] .ticket-content-grid {
      grid-template-columns: minmax(0,1fr) !important;
    }
    [data-sales-document] :is(.ticket-products,.ticket-payment) {
      min-width: 0 !important;
      margin: 0 !important;
      padding: 10px 12px !important;
      background: #fff !important;
      border: 1px solid #d8deeb !important;
      border-radius: 10px !important;
    }
    [data-sales-document] :is(.ticket-products,.ticket-payment) > .ticket-card-heading {
      color: #27304f !important;
      padding-block: 2px 8px !important;
      margin-block: 0 8px !important;
      border-bottom: 1px solid #e0e5ef !important;
    }
    [data-sales-document] :is(.ticket-products,.ticket-payment) h3 {
      color: inherit !important;
      font-size: 14px !important;
      margin: 0 !important;
    }
    [data-sales-document] .commercial-items th {
      background: #f0f1f7 !important;
    }
    [data-sales-document] .commercial-items :is(td,th):not(:first-child) {
      text-align: right !important;
      font-variant-numeric: tabular-nums;
    }
    [data-sales-document] .commercial-items td:first-child {
      overflow-wrap: anywhere;
    }
    [data-sales-document] .commercial-items small {
      color: #53647b !important;
    }
    .sales-document-totals {
      display: grid;
      gap: 6px;
      padding-bottom: 6px;
    }
    [data-sales-document] .sales-document-totals :is(.commercial-total,.payment-summary > span) {
      display: flex !important;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 3px 12px;
      margin: 0 !important;
      padding: 6px 9px !important;
      border: 0 !important;
      border-radius: 6px !important;
      background: #efedf8 !important;
      color: #383260 !important;
      text-align: start !important;
    }
    [data-sales-document] .sales-document-totals .payment-summary {
      display: grid !important;
      margin: 0 !important;
      padding: 0 !important;
      background: transparent !important;
    }
    [data-sales-document] .sales-document-totals .payment-summary > span {
      background: #fbf3d5 !important;
      color: #534018 !important;
    }
    [data-sales-document] .sales-document-totals .payment-summary > span > span {
      border: 0 !important;
      background: transparent !important;
      padding: 0 !important;
      color: inherit !important;
      font-size: inherit !important;
    }
    .sales-document-totals :is(b,strong) {
      font-size: 14px;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .sales-document-adjustment-summary {
      margin: 0;
      padding: 5px 9px;
      color: #434d65;
      line-height: 1.4;
    }
    .sales-document-adjustment-summary b {
      font-size: inherit;
    }
    [data-sales-document] .ticket-payment dl {
      margin: 0 !important;
    }
    .sales-document-activity {
      margin-top: 10px;
      padding: 0 12px;
      border: 1px solid #d8deeb;
      border-radius: 9px;
      background: #fff;
    }
    .sales-document-activity > summary {
      cursor: pointer;
      padding: 9px 0;
      font: 650 13px/1.3 "Segoe UI", sans-serif;
      color: #383260;
    }
    .sales-document-activity .fi-receipt-secondary {
      padding: 0 0 9px !important;
      margin: 0 !important;
    }

    html[data-sales-receipt-content="receipt"] #detailDialog > footer {
      overflow: visible !important;
    }
    html[data-sales-receipt-content="receipt"] #detailDialog > footer > div {
      display: flex !important;
      width: 100% !important;
      min-width: 0;
      flex-wrap: nowrap !important;
      gap: 6px !important;
    }
    html[data-sales-receipt-content="receipt"] #detailDialog > footer #printInvoice {
      background: #34305b !important;
      border-color: #34305b !important;
      color: #fff !important;
    }
    .sales-document-more {
      position: relative;
      min-width: 0;
    }
    .sales-document-more > summary {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 34px;
      box-sizing: border-box;
      padding: 6px 9px;
      cursor: pointer;
      border: 1px solid #c4d0e0;
      border-radius: 7px;
      background: #fff;
      color: #344664;
      font: 600 12px/1.2 "Segoe UI", sans-serif;
      text-align: center;
    }
    .sales-document-more > summary::-webkit-details-marker { display: none; }
    .sales-document-more > summary::after {
      content: '';
      width: 5px;
      height: 5px;
      border: solid currentColor;
      border-width: 1.5px 0 0 1.5px;
      transform: rotate(45deg);
      margin: 3px 0 0 7px;
      flex: none;
    }
    .sales-document-more > summary:focus-visible,
    .sales-document-activity > summary:focus-visible {
      outline: 2px solid #6863a2;
      outline-offset: 2px;
    }
    .sales-document-menu {
      position: absolute;
      z-index: 3;
      right: 0;
      bottom: calc(100% + 6px);
      width: max-content;
      max-width: min(260px, calc(100vw - 28px));
      max-height: calc(100dvh - 62px);
      overflow: auto;
      padding: 6px;
      background: #fff;
      border: 1px solid #c4d0e0;
      border-radius: 8px;
      box-shadow: 0 8px 24px #222e4c26;
    }
    html[data-sales-receipt-content="receipt"] #detailDialog > footer .sales-document-menu > button:not([hidden]) {
      display: flex !important;
      justify-content: flex-start !important;
      text-align: start !important;
      width: 100% !important;
      padding: 6px 8px !important;
      min-height: 34px !important;
      border: 0 !important;
      background: #fff !important;
      color: #263650 !important;
    }
    html[data-sales-receipt-content="receipt"] #detailDialog > footer .sales-document-menu > button:is(:hover,:focus-visible) {
      background: #eeedf7 !important;
    }
    .sales-document-view-options:not(:empty) {
      display: grid;
      gap: 5px;
      padding: 7px 5px 2px;
      border-top: 1px solid #e0e5ef;
      color: #56647c;
      font: 600 11px/1.3 "Segoe UI", sans-serif;
    }
    @media (max-width: 640px) {
      .sales-document-summary {
        grid-template-columns: minmax(0,1fr);
        gap: 9px;
        padding: 10px 11px;
      }
      [data-sales-document] .ticket-content-grid {
        grid-template-columns: minmax(0,1fr) !important;
      }
      [data-sales-document] .commercial-items :is(td,th) {
        padding-inline: 4px !important;
      }
      [data-sales-document] .commercial-items th {
        font-size: 11px !important;
      }
      [data-sales-document] .commercial-items td {
        font-size: 12px !important;
      }
      .sales-document-view-options {
        display: none !important;
      }
      html[data-sales-receipt-content="receipt"] #detailDialog > footer > div {
        display: grid !important;
        grid-template-columns: repeat(3,minmax(0,1fr));
      }
      .sales-document-more > summary {
        min-height: 44px;
      }
      html[data-sales-receipt-content="receipt"] #detailDialog > footer .sales-document-menu > button:not([hidden]) {
        min-height: 44px !important;
      }
    }
  }
}
