
/*
  AVANZA CONTROL V5.5.0
  Espacio operativo de Ventas.
  No modifica lógica, cálculos ni datos.
*/

#salesSection.sales-workspace-v550 {
  width: 100%;
  min-width: 0;
}

#salesSection.sales-workspace-v550
.page-heading {
  margin-bottom: 13px !important;
}

#salesSection.sales-workspace-v550
.page-heading h2 {
  margin-bottom: 4px;
  font-size: 24px;
}

#salesSection.sales-workspace-v550
.page-heading p,
#salesSection.sales-workspace-v550
.page-heading small {
  color: #78899a;
}


/* ==================================================
   PESTAÑAS SUPERIORES
   ================================================== */

#salesSection.sales-workspace-v550
.sales-command-tabs {
  width: 100%;
  margin: 0 0 14px;
  padding: 5px;
  display: grid !important;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(145px, 1fr)
    ) !important;
  gap: 7px !important;
  overflow: visible !important;
  border: 1px solid #dce6ef;
  border-radius: 15px;
  background: #edf3f8;
}

#salesSection.sales-workspace-v550
.sales-command-tabs
.sales-tab {
  width: 100%;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 8px 11px !important;
  border-color: transparent;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
}

#salesSection.sales-workspace-v550
.sales-command-tabs
.sales-tab:hover {
  background: rgba(255, 255, 255, .75);
}

#salesSection.sales-workspace-v550
.sales-command-tabs
.sales-tab.active {
  border-color: #bfd8ed;
  background: #ffffff;
  box-shadow:
    0 5px 14px rgba(7, 31, 61, .07);
}


/* ==================================================
   CONTENEDOR PRINCIPAL
   ================================================== */

#salesSection.sales-workspace-v550
.sales-operation-shell {
  width: 100%;
  overflow: visible;
  border: 1px solid #d6e2ec;
  border-radius: 21px;
  background: #f4f8fb;
  box-shadow:
    0 15px 36px rgba(7, 31, 61, .08);
}

#salesSection.sales-workspace-v550
.sales-operation-header {
  position: relative;
  padding: 16px 18px 14px !important;
  align-items: center;
  border-bottom: 1px solid #dde7ef;
  border-radius: 21px 21px 0 0;
  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f5f9fd 100%
    );
}

#salesSection.sales-workspace-v550
.sales-operation-header::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background:
    linear-gradient(
      90deg,
      #0b5eb8,
      #1283d5,
      #d5a631
    );
  content: "";
}

#salesSection.sales-workspace-v550
.sales-operation-header h2 {
  margin: 2px 0 3px;
  font-size: 21px !important;
}

#salesSection.sales-workspace-v550
.sales-operation-header p {
  max-width: 680px;
}

#salesSection.sales-workspace-v550
.sales-operation-meta {
  gap: 8px;
}

#salesSection.sales-workspace-v550
.sales-meta-field {
  min-height: 55px;
  padding: 8px 11px;
  border-color: #dce6ee;
  border-radius: 11px;
  background: #ffffff;
}


/* ==================================================
   FORMULARIO Y RESUMEN
   ================================================== */

#salesSection.sales-workspace-v550
.sales-operation-grid {
  width: 100%;
  padding: 13px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: start;
  gap: 13px !important;
}

#salesSection.sales-workspace-v550
.sales-operation-main {
  width: 100%;
  min-width: 0;
  display: grid !important;
  grid-template-columns:
    repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 12px !important;
}

#salesSection.sales-workspace-v550
.sales-form-section {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 14px !important;
  overflow: visible;
  border: 1px solid #dbe5ed;
  border-radius: 15px;
  background: #ffffff;
  box-shadow:
    0 4px 13px rgba(7, 31, 61, .035);
  transition:
    border-color .16s ease,
    box-shadow .16s ease;
}

#salesSection.sales-workspace-v550
.sales-form-section.is-active-v550 {
  border-color: #aacce8;
  box-shadow:
    0 0 0 3px rgba(18, 131, 213, .07),
    0 7px 18px rgba(7, 31, 61, .05);
}

#salesSection.sales-workspace-v550
.sales-block-customer-v550,
#salesSection.sales-workspace-v550
.sales-block-device-v550,
#salesSection.sales-workspace-v550
.sales-block-mode-v550,
#salesSection.sales-workspace-v550
.sales-block-finance-v550,
#salesSection.sales-workspace-v550
.sales-block-notes-v550,
#salesSection.sales-workspace-v550
.sales-block-wide-v550 {
  grid-column: 1 / -1;
}


/* ==================================================
   ENCABEZADOS DE CADA PASO
   ================================================== */

#salesSection.sales-workspace-v550
.sales-step-heading {
  margin-bottom: 11px !important;
  padding-bottom: 10px;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
}

#salesSection.sales-workspace-v550
.sales-step-heading h3 {
  margin: 0 0 2px;
  font-size: 15px !important;
}

#salesSection.sales-workspace-v550
.sales-step-heading p {
  font-size: 10px;
  line-height: 1.45;
}

#salesSection.sales-workspace-v550
.sales-step-number {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
  box-shadow: none;
}


/* ==================================================
   CAMPOS Y CONTROLES
   ================================================== */

#salesSection.sales-workspace-v550
input,
#salesSection.sales-workspace-v550
select,
#salesSection.sales-workspace-v550
textarea {
  min-height: 42px;
  border-radius: 10px;
}

#salesSection.sales-workspace-v550
textarea {
  min-height: 82px;
}

#salesSection.sales-workspace-v550
button {
  border-radius: 10px;
}

#salesSection.sales-workspace-v550
.form-grid,
#salesSection.sales-workspace-v550
.sales-form-grid,
#salesSection.sales-workspace-v550
.sales-walk-in-grid {
  gap: 10px !important;
}

#salesSection.sales-workspace-v550
.sales-search-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 8px;
}

#salesSection.sales-workspace-v550
.unified-customer-results {
  max-height: 220px;
}

#salesSection.sales-workspace-v550
#clientSaleMasterBox {
  margin-bottom: 9px;
  padding: 11px;
  border-color: #d7e6f2;
  border-radius: 12px;
  background: #f8fbfe;
}


/* ==================================================
   MODALIDAD Y SISTEMAS
   ================================================== */

#salesSection.sales-workspace-v550
.unified-choice-row {
  gap: 8px !important;
}

#salesSection.sales-workspace-v550
.unified-choice {
  min-height: 52px;
  padding: 9px 11px;
  border-radius: 11px;
}

#salesSection.sales-workspace-v550
.unified-choice strong {
  font-size: 11px;
}

#salesSection.sales-workspace-v550
.unified-choice span {
  font-size: 9px;
}

#salesSection.sales-workspace-v550
.unified-choice.active {
  border-color: #8abce4 !important;
  background:
    linear-gradient(
      135deg,
      #e9f4fd,
      #f6fbff
    ) !important;
  box-shadow:
    0 0 0 2px rgba(18, 131, 213, .08);
}

#salesSection.sales-workspace-v550
.sales-system-box {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #dce7ef;
  border-radius: 12px;
  background: #f8fafc;
}


/* ==================================================
   PLAN CONTADO Y FINANCIAMIENTO
   ================================================== */

#salesSection.sales-workspace-v550
.promo-plan-box {
  margin-top: 11px;
  padding: 13px;
  border: 1px solid #c9dff1;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      #f6fbff 0%,
      #ffffff 100%
    );
}

#salesSection.sales-workspace-v550
.promo-plan-heading {
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dfebf4;
}

#salesSection.sales-workspace-v550
.promo-plan-heading b {
  font-size: 13px;
}

#salesSection.sales-workspace-v550
.promo-plan-heading span {
  font-size: 9px;
}

#salesSection.sales-workspace-v550
.promo-plan-grid {
  display: grid !important;
  grid-template-columns:
    repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

#salesSection.sales-workspace-v550
.promo-schedule-layout {
  margin: 10px 0 !important;
  padding: 11px !important;
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  border-radius: 11px !important;
}

#salesSection.sales-workspace-v550
.promo-plan-quick {
  display: grid !important;
  grid-template-columns:
    repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#salesSection.sales-workspace-v550
.promo-plan-quick button {
  min-height: 43px;
  padding: 7px 8px;
  font-size: 10px;
}

#salesSection.sales-workspace-v550
.promo-plan-summary {
  margin-top: 10px;
  border-radius: 11px;
}

#salesSection.sales-workspace-v550
.promo-automatic-dates-status {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 10px;
}


/* ==================================================
   RESUMEN DE VENTA
   ================================================== */

#salesSection.sales-workspace-v550
.sales-operation-summary {
  width: 100%;
  min-width: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #d1e0eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 10px 26px rgba(7, 31, 61, .07);
}

#salesSection.sales-workspace-v550
.sales-summary-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 15px;
  border-bottom: 1px solid #dce6ee;
  background:
    linear-gradient(
      135deg,
      #071f3d,
      #0b4f8e
    );
}

#salesSection.sales-workspace-v550
.sales-summary-head h3,
#salesSection.sales-workspace-v550
.sales-summary-head p,
#salesSection.sales-workspace-v550
.sales-summary-head span,
#salesSection.sales-workspace-v550
.sales-summary-head small {
  color: #ffffff !important;
}

#salesSection.sales-workspace-v550
.sales-summary-head p {
  opacity: .76;
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.unified-review {
  padding: 6px 14px 12px !important;
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.unified-review span {
  grid-template-columns:
    112px minmax(0, 1fr);
  padding: 9px 0;
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.unified-review small {
  font-size: 8px;
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.unified-review b {
  font-size: 11px;
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.actions {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #e1e9f0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
}

#salesSection.sales-workspace-v550
.sales-operation-summary
.actions .primary,
#salesSection.sales-workspace-v550
.sales-operation-summary
.actions button:first-child {
  grid-column: 1 / -1;
}


/* ==================================================
   ESCRITORIOS AMPLIOS
   ================================================== */

@media (min-width: 1360px) {
  #salesSection.sales-workspace-v550
  .sales-operation-grid {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(345px, 390px) !important;
  }

  #salesSection.sales-workspace-v550
  .sales-operation-main {
    grid-column: 1;
    grid-row: 1;
  }

  #salesSection.sales-workspace-v550
  .sales-operation-summary {
    grid-column: 2;
    grid-row: 1;
    position: sticky !important;
    top: 92px !important;
    max-height:
      calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}


/* Cliente y teléfono lado a lado cuando hay espacio real. */

@media (min-width: 1540px) {
  #salesSection.sales-workspace-v550
  .sales-block-customer-v550 {
    grid-column: span 7;
  }

  #salesSection.sales-workspace-v550
  .sales-block-device-v550 {
    grid-column: span 5;
  }
}


/* ==================================================
   TABLETAS Y TELÉFONOS
   ================================================== */

@media (max-width: 1099px) {
  #salesSection.sales-workspace-v550
  .sales-command-tabs {
    display: flex !important;
    overflow-x: auto !important;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #salesSection.sales-workspace-v550
  .sales-command-tabs
  .sales-tab {
    width: auto;
    min-width: 145px !important;
  }

  #salesSection.sales-workspace-v550
  .sales-operation-main {
    display: flex !important;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  #salesSection.sales-workspace-v550
  .promo-plan-grid,
  #salesSection.sales-workspace-v550
  .promo-schedule-layout,
  #salesSection.sales-workspace-v550
  .promo-plan-quick {
    grid-template-columns: 1fr !important;
  }

  #salesSection.sales-workspace-v550
  .sales-operation-summary
  .actions {
    grid-template-columns: 1fr;
  }
}
