[hidden] {
  display: none !important;
}
.qw-results > main,
.qw-results > .bar,
.qw-results > #order-bar {
  display: none !important;
}
#results {
  scroll-margin-top: 15px;
}
.qw-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.qw-heading h2 {
  font-size: 26px;
}
.qw-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: #f4f7ef;
  padding: 10px;
  border: 1px solid #d3ddce;
  border-radius: 12px;
  margin: 15px 0;
}
.qw-nav a,
.qw-subnav a {
  display: inline-flex;
  padding: 12px 16px;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  color: #274538;
  text-decoration: none;
  border-radius: 8px;
}
.qw-nav a[aria-current] {
  background: #244338;
  color: white;
}
.qw-context {
  color: #506256;
}
.qw-alerts {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #dfc780;
  background: #fff8e6;
  border-radius: 9px;
}
.qw-alerts > summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 30px;
}
.qw-alerts #diagnostics {
  max-height: 420px;
  overflow: auto;
}
.qw-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.qw-unit-card {
  background: #fff;
  border: 1px solid #d1dbd0;
  border-radius: 12px;
  padding: 18px;
}
.qw-unit-card img {
  display: block;
  width: 100%;
  height: 135px;
  object-fit: contain;
  background: #f5f7f1;
}
.qw-unit-card h4 {
  font-size: 17px;
  margin: 14px 0 8px;
}
.qw-unit-card p {
  font-size: 14px;
}
.qw-open {
  width: 100%;
  background: #d6e6ad !important;
  color: #213c30 !important;
  font-weight: 650;
}
.qw-view {
  min-width: 0;
}
.qw-view:focus {
  outline: none;
}
.qw-view table {
  max-width: 100%;
}
.qw-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.qw-subnav a {
  border: 1px solid #ccd6c9;
}
#pedido-aberturas > input {
  width: min(100%, 440px);
  box-sizing: border-box;
  margin: 14px 0;
  min-height: 44px;
}
#mesa-units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
#mesa-units button {
  min-height: 52px;
  text-align: left;
}
#mesa-frame {
  min-height: 650px;
  width: 100%;
}
.qw-view button,
.qw-heading button {
  min-height: 44px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #487527;
  outline-offset: 3px;
}
body > .alk-nav {
  flex-wrap: nowrap;
}
.qw-view #bom,
.qw-view #glass-tables,
.qw-view #cutplan-tables {
  overflow-x: auto;
}
#results.only-error > *:not(#error) {
  display: none !important;
}
@media (max-width: 650px) {
  .qw-heading h2 {
    font-size: 21px;
  }
  .qw-nav {
    gap: 3px;
    padding: 5px;
  }
  .qw-nav a {
    padding: 10px;
    font-size: 14px;
  }
  .qw-cards {
    grid-template-columns: 1fr;
  }
  .qw-results #results {
    padding: 12px;
  }
  .qw-heading {
    align-items: flex-start;
  }
  #mesa-frame {
    min-height: 560px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}
@media print {
  .qw-nav,
  .qw-heading button,
  .qw-subnav {
    display: none !important;
  }
  .qw-view[hidden] {
    display: block !important;
  }
  .qw-results > main {
    display: none !important;
  }
  #mesa-panel {
    display: none !important;
  }
  .qw-alerts #diagnostics {
    max-height: none;
    overflow: visible;
  }
}
#totals {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}
#totals > .qw-total-detail {
  background: transparent !important;
  flex: 1;
  min-width: 220px;
  padding: 12px;
}
#totals > .qw-total-detail summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.qw-total-detail .totals {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.qw-total-detail .totals > div {
  min-width: 140px;
  padding: 10px;
  background: #f0f4e9;
}
#totals > div:first-child {
  max-width: 440px;
  min-width: 240px;
}
.qw-steps {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 12px;
  background: #f0f4e9;
  border-radius: 10px;
}
.qw-steps label {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.qw-steps button {
  min-height: 44px;
}
.qw-steps button[aria-current="step"] {
  background: #244338;
  color: white;
}
.qw-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.qw-step-actions button {
  min-height: 44px;
}
.qw-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 3px 8px #203b3310;
}
.qw-view {
  scroll-margin-top: 100px;
}
#totals span {
  color: #42583e !important;
  font-size: 12px !important;
}
#totals strong {
  color: #203b33;
}
.qw-total-detail summary {
  color: #32482c;
}
@media (max-width: 650px) {
  .qw-nav {
    position: static;
  }
  .qw-view {
    scroll-margin-top: 10px;
  }
}
#results > #ws-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px;
  background: #edf3e8;
  border-radius: 9px;
}
#results > #ws-box[hidden] {
  display: none !important;
}
#results > #ws-box .wide {
  width: auto;
  min-height: 44px;
}
#results > #ws-box input {
  min-width: 240px;
  flex: 1;
}

/* Ícono de cubo junto al texto «Ver abertura en 3D» (el ícono acompaña, no reemplaza al texto). */
.qw-open,
#mesa-units button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#mesa-units button {
  justify-content: flex-start;
}
.qw-open::before,
#mesa-units button::before {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23213c30' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 20.5 7.4v9.2L12 21.2 3.5 16.6V7.4z'/%3E%3Cpath d='M3.5 7.4 12 12l8.5-4.6M12 12v9.2'/%3E%3C/svg%3E");
}
.qw-unit-card .qw-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #506256;
}
/* La casilla «ver todas las opciones» no hereda el estilo de rótulo de campo del formulario. */
.qw-steps .qw-steps-all {
  flex-direction: row;
  justify-content: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #33503f;
  text-align: left;
}
.qw-steps .qw-steps-all input {
  width: auto;
  margin: 0;
}
