/* ============================================================
   FINVERZ CRM V2.4 — Calculadora de productos
   ============================================================ */

#finverz-v24-calculator-button > svg.nav-icon,
.v24-card-button > svg.nav-icon,
.v24-external-button > svg.nav-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  max-width: 20px;
  flex: 0 0 20px;
  display: block;
}

.v24-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 18px;
  overflow: auto;
  background: rgba(5, 20, 38, .76);
  backdrop-filter: blur(6px);
}

.v24-modal {
  width: min(1240px, 100%);
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, .75);
  border-radius: 22px;
  background: #f4f7fb;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .38);
}

.v24-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 28px;
  border-bottom: 1px solid #dbe4ef;
  background: #fff;
}

.v24-modal-head h2 {
  margin: 4px 0 6px;
  color: #102f55;
  font-size: clamp(1.35rem, 2.2vw, 1.72rem);
}

.v24-modal-head p {
  margin: 0;
  color: #65758a;
}

.v24-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef3f8;
  color: #17395e;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.v24-close:hover {
  transform: scale(1.04);
  background: #dfe8f2;
}

.v24-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .68fr);
  gap: 18px;
  padding: 22px;
}

.v24-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 49, 83, .055);
}

.v24-calculator-panel {
  grid-column: 1;
}

.v24-rules-panel {
  grid-column: 2;
}

.v24-catalog-panel {
  grid-column: 1 / -1;
}

.v24-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.v24-panel-title h3 {
  margin: 3px 0 0;
  color: #102f55;
}

.v24-panel-title p {
  margin: 5px 0 0;
  color: #65758a;
  font-size: .84rem;
}

.v24-count {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding-inline: 10px;
  border: 1px solid #c9d9ee;
  border-radius: 999px;
  background: #edf4ff;
  color: #123b70;
  font-size: .78rem;
  font-weight: 900;
}

.v24-select-grid,
.v24-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.v24-input-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) auto;
  align-items: end;
  margin-top: 16px;
}

.v24-input-grid .button {
  min-height: 44px;
  white-space: nowrap;
}

.v24-modal .field {
  min-width: 0;
}

.v24-modal .field > span {
  display: block;
  margin-bottom: 7px;
  color: #334f70;
  font-size: .78rem;
  font-weight: 800;
}

.v24-modal .field small {
  color: #7a8798;
  font-weight: 600;
}

.v24-modal input,
.v24-modal select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd7e5;
  border-radius: 10px;
  background: #fff;
  color: #153759;
  font: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.v24-modal input:focus,
.v24-modal select:focus {
  border-color: #174cc7;
  box-shadow: 0 0 0 3px rgba(23, 76, 199, .12);
}

.v24-condition-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d1deec;
  border-radius: 13px;
  background: #f7faff;
}

.v24-condition-strip span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px 8px;
  border-right: 1px solid #dce6f1;
}

.v24-condition-strip span:last-child {
  border-right: 0;
}

.v24-condition-strip small {
  color: #6a7b90;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.v24-condition-strip strong {
  overflow: hidden;
  color: #102f55;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v24-mode {
  display: inline-flex;
  gap: 5px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid #d7e1ed;
  border-radius: 12px;
  background: #f3f6fa;
}

.v24-mode button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #52677e;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  padding: 9px 13px;
}

.v24-mode button.active {
  background: #102f55;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 47, 85, .18);
}

.v24-result {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #cbd9e7;
  border-left: 5px solid #174cc7;
  border-radius: 15px;
  background: #fff;
}

.v24-result.valid {
  border-left-color: #15803d;
}

.v24-result.invalid {
  border-left-color: #c69214;
}

.v24-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 12px;
}

.v24-result-head h3 {
  margin: 3px 0 0;
  color: #102f55;
}

.v24-eligibility {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.v24-eligibility.valid {
  border: 1px solid #a9ddbb;
  background: #ecfdf3;
  color: #166534;
}

.v24-eligibility.invalid {
  border: 1px solid #ead190;
  background: #fff7df;
  color: #855600;
}

.v24-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #e6edf5;
  border-block: 1px solid #e0e8f1;
}

.v24-result-grid > div {
  min-width: 0;
  padding: 12px 14px;
  background: #f9fbfd;
}

.v24-result-grid dt {
  margin-bottom: 4px;
  color: #718196;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.v24-result-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #102f55;
  font-size: .88rem;
  font-weight: 800;
}

.v24-result-message,
.v24-rounding {
  margin: 13px 16px;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: .8rem;
  line-height: 1.5;
}

.v24-result-message.success {
  border: 1px solid #b9e1c6;
  background: #ecfdf3;
  color: #166534;
}

.v24-result-message.warning {
  border: 1px solid #ead190;
  background: #fff7df;
  color: #795100;
}

.v24-rounding {
  border: 1px solid #cbd9e7;
  background: #f2f7fd;
  color: #405d7d;
}

.v24-save-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 0 16px 16px;
}

.v24-formula {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  background: #f8fbff;
}

.v24-formula strong {
  color: #17395e;
  font-size: .8rem;
}

.v24-formula code {
  overflow-x: auto;
  color: #b91320;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.v24-rules-panel > p {
  color: #607288;
  font-size: .8rem;
  line-height: 1.55;
}

.v24-empty,
.v24-loading,
.v24-error-screen {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-align: center;
  padding: 36px;
}

.v24-loading {
  min-height: 350px;
  flex-direction: row;
  color: #53667c;
}

.v24-empty h3,
.v24-error-screen h2 {
  margin: 0;
  color: #102f55;
}

.v24-empty p,
.v24-error-screen p {
  max-width: 620px;
  margin: 0;
  color: #65758a;
}

.v24-empty-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  background: #edf4ff;
  color: #174cc7;
  font-size: 1.65rem;
  font-weight: 900;
}

.v24-import-grid {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: 14px;
}

.v24-file-drop {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  border: 2px dashed #b9cbe0;
  border-radius: 14px;
  background: #f8fbff;
  color: #17395e;
  cursor: pointer;
  text-align: center;
}

.v24-file-drop:hover {
  border-color: #174cc7;
  background: #f2f7ff;
}

.v24-file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.v24-file-drop > span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #102f55;
  color: #fff;
  font-size: .7rem;
  font-weight: 900;
}

.v24-file-drop strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v24-file-drop small {
  color: #718196;
}

.v24-import-info {
  padding: 15px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fbfcfe;
}

.v24-import-info > strong {
  color: #102f55;
}

.v24-import-info > p {
  overflow-wrap: anywhere;
  color: #687a90;
  font-size: .76rem;
  line-height: 1.55;
}

.v24-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2c7ca;
  border-radius: 12px;
  background: #fff6f7;
  cursor: pointer;
}

.v24-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  padding: 0;
  accent-color: #c7192d;
}

.v24-check span {
  display: grid;
  gap: 3px;
}

.v24-check strong {
  color: #7a1723;
  font-size: .8rem;
}

.v24-check small {
  color: #86535a;
  line-height: 1.4;
}

.v24-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0 8px;
  color: #17395e;
  font-size: .8rem;
}

.v24-preview-head span {
  color: #6b7d91;
}

.v24-table-scroll {
  overflow-x: auto;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
}

.v24-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: .76rem;
}

.v24-table-scroll th,
.v24-table-scroll td {
  padding: 9px 11px;
  border-bottom: 1px solid #e5ebf2;
  color: #334f70;
  text-align: left;
  white-space: nowrap;
}

.v24-table-scroll th {
  background: #eef4fa;
  color: #17395e;
  font-size: .68rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.v24-catalog-panel > .button-danger {
  margin-top: 14px;
}

.v24-card-button,
.v24-external-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.v24-card-button {
  width: 100%;
  margin-top: 12px;
}

.v24-external-button {
  min-height: 38px;
  white-space: nowrap;
}

.v24-external-applied,
.v24-linked-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #b8d3f1;
  border-left: 4px solid #174cc7;
  border-radius: 12px;
  background: #f1f7ff;
  color: #17395e;
  font-size: .8rem;
  line-height: 1.5;
}

.v24-linked-note {
  width: min(520px, 100%);
  text-align: left;
}

.v24-linked-note.error {
  border-color: #efb7be;
  border-left-color: #c91d2e;
  background: #fff2f4;
  color: #851b29;
}

.v24-external-applied span,
.v24-linked-note span {
  color: #536b85;
}

.v24-modal [hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .v24-content {
    grid-template-columns: 1fr;
  }

  .v24-calculator-panel,
  .v24-rules-panel,
  .v24-catalog-panel {
    grid-column: 1;
  }

  .v24-rules-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .v24-rules-panel .v24-panel-title {
    grid-column: 1 / -1;
  }

  .v24-rules-panel > p {
    margin: 0;
  }
}

@media (max-width: 720px) {
  #finverz-v24-calculator-button > svg.nav-icon,
  .v24-card-button > svg.nav-icon,
  .v24-external-button > svg.nav-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    max-width: 18px;
    flex-basis: 18px;
  }

  .v24-overlay {
    padding: 0;
  }

  .v24-modal {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .v24-modal-head {
    padding: 17px;
  }

  .v24-content {
    gap: 12px;
    padding: 13px;
  }

  .v24-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .v24-select-grid,
  .v24-input-grid,
  .v24-import-grid,
  .v24-save-area,
  .v24-rules-panel {
    grid-template-columns: 1fr;
  }

  .v24-input-grid .button,
  .v24-save-area .button {
    width: 100%;
  }

  .v24-condition-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v24-condition-strip span:nth-child(2) {
    border-right: 0;
  }

  .v24-condition-strip span:nth-child(-n+2) {
    border-bottom: 1px solid #dce6f1;
    padding-bottom: 9px;
  }

  .v24-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v24-mode {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .v24-panel-title {
    flex-wrap: wrap;
  }

  .v24-external-button {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 430px) {
  .v24-result-grid,
  .v24-condition-strip {
    grid-template-columns: 1fr;
  }

  .v24-condition-strip span {
    border-right: 0;
    border-bottom: 1px solid #dce6f1;
    padding-block: 8px;
  }

  .v24-condition-strip span:last-child {
    border-bottom: 0;
  }

  .v24-result-head {
    flex-direction: column;
  }
}

.v24-product-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(90px, .75fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #cddbea;
  border-left: 4px solid #174cc7;
  border-radius: 11px;
  background: #dfe8f2;
}

.v24-product-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  background: #f7faff;
}

.v24-product-summary span {
  color: #738399;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.v24-product-summary strong {
  overflow: hidden;
  color: #17395e;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .v24-product-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
