/* Modal desglose v2 — alineado a maqueta design-options/desglose-modal-v2 */

.modal-card--recibo-exp-v2 {
  --rex-border: rgba(186, 168, 142, 0.22);
  --rex-muted: #a8a29e;
  --rex-accent: #c4a574;
  --rex-green: #10b981;
  --rex-green-bg: rgba(16, 185, 129, 0.15);
  --rex-prop-bg: rgba(96, 86, 125, 0.18);
  --rex-prop-border: rgba(140, 120, 190, 0.45);
  --rex-prop-text: #d6cff8;
  --rex-inf-bg: rgba(196, 165, 116, 0.16);
  --rex-inf-border: rgba(210, 175, 110, 0.48);
  --rex-inf-text: #e8d4a8;
  --rex-blue-bg: rgba(96, 165, 250, 0.12);
  --rex-gray-bg: rgba(120, 113, 108, 0.35);
  --rex-warn-bg: rgba(251, 191, 36, 0.12);
  --rex-chip-glow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.18);
  --rex-col-label: 6.75rem;
  --rex-col-monto: 10.5rem;
  --rex-col-pct: 7.25rem;

  max-width: min(96vw, 1120px);
  max-height: min(92vh, 900px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.theme-f10 .modal-card--recibo-exp-v2 {
  --rex-border: rgba(186, 168, 142, 0.22);
  --rex-muted: #a8a29e;
}

/* Cabecera */
.modal-card--recibo-exp-v2 .recibo-exp-v2-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--rex-border);
  background: rgba(36, 34, 32, 0.85);
  flex-shrink: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-head-meta {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--rex-muted);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-ctx-help {
  margin: 0 !important;
  padding: 0.55rem 1.15rem;
  border-bottom: 1px solid var(--rex-border);
  font-size: 0.78rem;
  color: var(--rex-muted) !important;
  line-height: 1.45;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-help-details {
  margin: 0;
  padding: 0 1.15rem 0.5rem;
  border-bottom: 1px solid var(--rex-border);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-help-details summary {
  cursor: pointer;
  color: var(--rex-accent);
  font-weight: 500;
  user-select: none;
  list-style: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-help-details summary::-webkit-details-marker {
  display: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-help-details-body {
  margin: 0.35rem 0 0;
  line-height: 1.45;
  font-size: 0.78rem;
  color: var(--rex-muted) !important;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-help-details-body strong {
  color: var(--text);
  font-weight: 600;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-view-only-hint {
  margin: 0;
  padding: 0.45rem 1.15rem;
  font-size: 0.78rem;
  color: var(--rex-accent);
  flex-shrink: 0;
}

/* Pestañas (sin flechas de scroll vertical: overflow-y hidden + scrollbar oculta) */
.modal-card--recibo-exp-v2 .recibo-exp-v2-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem 1rem 0;
  border-bottom: 1px solid var(--rex-border);
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-tab {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--rex-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin: 0;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
  line-height: 1.25;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-tab:hover {
  color: var(--text);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-tab.is-active {
  color: var(--text);
  background: rgba(62, 58, 54, 0.6);
  border-bottom-color: var(--rex-green);
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-tab.is-active {
  background: rgba(0, 0, 0, 0.06);
  border-bottom-color: var(--primary, #a89274);
}

/* Cuerpo dos columnas (flex: el <aside> del resumen NO es el menú lateral global) */
.modal-card--recibo-exp-v2 .recibo-exp-v2-body {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-main {
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.15rem 1.25rem;
  box-sizing: border-box;
}

.modal-card--recibo-exp-v2 .recibo-exp-scroll.recibo-exp-v2-main {
  flex: 1 1 0% !important;
  margin-bottom: 0;
  padding-right: 0.25rem;
}

/*
 * Reset obligatorio: styles.css define `aside { position:fixed; left:0; width:250px; … }`
 * para el menú de la app; sin esto el resumen del modal queda superpuesto a la izquierda.
 */
#expensasServiciosModalBackdrop .recibo-exp-v2-aside {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  flex: 0 0 260px;
  width: 260px !important;
  min-width: 240px;
  max-width: 280px;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box;
  border-left: 1px solid var(--rex-border);
  border-right: none;
  background: rgba(36, 34, 32, 0.55);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

html:not(.theme-f10) #expensasServiciosModalBackdrop .recibo-exp-v2-aside {
  background: rgba(0, 0, 0, 0.04);
}

html.theme-f10 #expensasServiciosModalBackdrop .recibo-exp-v2-aside {
  background: rgba(36, 34, 32, 0.55);
  border-right: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-panel:not(.is-active) {
  display: none;
}

/* Canon */
.modal-card--recibo-exp-v2 .recibo-exp-v2-canon {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--rex-border);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(62, 58, 54, 0.5));
  margin-bottom: 1rem;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-canon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(0, 0, 0, 0.04));
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-canon-k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rex-muted);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-canon-input {
  display: block;
  margin-top: 0.2rem;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  width: 100%;
  max-width: 12rem;
  box-shadow: none;
  box-sizing: border-box;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-canon-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--rex-muted);
}

/* Acordeones */
.modal-card--recibo-exp-v2 .recibo-exp-v2-acc {
  border: 1px solid var(--rex-border);
  border-radius: 10px;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-acc summary {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: rgba(62, 58, 54, 0.45);
  user-select: none;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-acc summary {
  background: rgba(0, 0, 0, 0.05);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-acc summary::-webkit-details-marker {
  display: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-acc summary::before {
  content: "▸ ";
  color: var(--rex-accent);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-acc[open] summary::before {
  content: "▾ ";
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-acc-body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-srv-grid {
  gap: 0;
}

/* Filas tipo maqueta */
.modal-card--recibo-exp-v2 .recibo-exp-v2-line {
  display: grid;
  grid-template-columns: var(--rex-col-label) minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(186, 168, 142, 0.1);
  font-size: 0.84rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line:last-child {
  border-bottom: none;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line--solo-monto,
.modal-card--recibo-exp-v2 .recibo-exp-v2-line--mora {
  grid-template-columns: var(--rex-col-label) max-content auto;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line--bono {
  grid-template-columns: var(--rex-col-label) minmax(0, 1fr);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line-label {
  font-weight: 500;
  line-height: 1.3;
  align-self: center;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line-fields {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) var(--rex-col-monto);
  gap: 0.45rem;
  min-width: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line--solo-monto .recibo-exp-v2-line-fields {
  grid-template-columns: var(--rex-col-monto);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line-fields--mora {
  grid-template-columns: var(--rex-col-monto) max-content;
  align-items: center;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line-fields--bono {
  grid-template-columns: minmax(11rem, 1fr) var(--rex-col-monto);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-inp-desc,
.modal-card--recibo-exp-v2 .recibo-exp-v2-inp-monto,
.modal-card--recibo-exp-v2 .recibo-exp-admin-fields input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--rex-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}

/* Selects visibles (p. ej. tipo honorarios): lista desplegable legible en tema oscuro */
#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) {
  width: 100%;
  padding: 0.45rem 0.55rem;
  padding-right: 1.75rem;
  border-radius: 8px;
  border: 1px solid var(--rex-border);
  background-color: #2e2b29;
  color: #eae8e6;
  font: inherit;
  font-size: 0.84rem;
  color-scheme: dark;
  cursor: pointer;
}

#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced):focus {
  outline: none;
  border-color: rgba(196, 165, 116, 0.55);
  box-shadow: 0 0 0 2px rgba(168, 146, 116, 0.2);
}

#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) option {
  background-color: #2e2b29;
  color: #eae8e6;
}

#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) option:checked,
#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) option:hover {
  background-color: #3a3836;
  color: #fff;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-inp-desc,
html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-inp-monto {
  background: var(--panel-bg, #fff);
  color: var(--text);
}

html:not(.theme-f10) #expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) {
  background-color: var(--panel-bg, #f5f2ee);
  color: var(--text);
  color-scheme: light;
}

html:not(.theme-f10) #expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 select:not(.recibo-exp-modo-select--enhanced) option {
  background-color: #fff;
  color: #1a1816;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-inp-monto {
  text-align: right;
  font-variant-numeric: tabular-nums;
  max-width: var(--rex-col-monto);
  justify-self: start;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-line--solo-monto .recibo-exp-v2-inp-monto {
  width: var(--rex-col-monto);
}

.modal-card--recibo-exp-v2 .recibo-exp-modo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}

.modal-card--recibo-exp-v2 .recibo-exp-modo-select--enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  padding: 0;
  margin: -1px;
}

.modal-card--recibo-exp-v2 .recibo-exp-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.modal-card--recibo-exp-v2 .recibo-exp-chip {
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--rex-border);
  background: var(--rex-gray-bg);
  color: var(--rex-muted);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}

.modal-card--recibo-exp-v2 .recibo-exp-chip:hover {
  border-color: rgba(186, 168, 142, 0.45);
  color: var(--text);
}

.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-cobrar {
  background: var(--rex-green-bg);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  box-shadow: var(--rex-chip-glow), 0 0 12px rgba(16, 185, 129, 0.12);
}

/* Propietario: activo violeta/gris petróleo (externo al cobro, no neutro ni alerta) */
.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-prop {
  background: var(--rex-prop-bg);
  border-color: var(--rex-prop-border);
  color: var(--rex-prop-text);
  box-shadow: var(--rex-chip-glow), 0 0 14px rgba(140, 120, 190, 0.2);
}

/* Informativo: ámbar/champagne (distinto de Propietario) */
.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-inf {
  background: var(--rex-inf-bg);
  border-color: var(--rex-inf-border);
  color: var(--rex-inf-text);
  box-shadow: var(--rex-chip-glow), 0 0 12px rgba(210, 175, 110, 0.14);
}

/* Legacy (filas viejas / maquetas) */
.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-ref {
  background: var(--rex-inf-bg);
  border-color: var(--rex-inf-border);
  color: var(--rex-inf-text);
  box-shadow: var(--rex-chip-glow), 0 0 12px rgba(210, 175, 110, 0.14);
}

.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-oculto {
  background: var(--rex-prop-bg);
  border-color: var(--rex-prop-border);
  color: var(--rex-prop-text);
  box-shadow: var(--rex-chip-glow), 0 0 14px rgba(140, 120, 190, 0.2);
}

.modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-desc {
  background: var(--rex-warn-bg);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-cobrar {
  color: #15803d;
  box-shadow: var(--rex-chip-glow), 0 0 10px rgba(16, 185, 129, 0.1);
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-prop,
html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-oculto {
  background: rgba(96, 86, 125, 0.12);
  border-color: rgba(100, 85, 140, 0.5);
  color: #4c3d6e;
  box-shadow: var(--rex-chip-glow), 0 0 10px rgba(100, 85, 140, 0.12);
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-inf,
html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-ref {
  background: rgba(220, 190, 130, 0.28);
  border-color: rgba(180, 140, 70, 0.45);
  color: #92680a;
  box-shadow: var(--rex-chip-glow), 0 0 10px rgba(180, 140, 70, 0.1);
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-chip.is-on.is-desc {
  color: #b45309;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-extra-block,
.modal-card--recibo-exp-v2 .recibo-exp-v2-otros-block {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(186, 168, 142, 0.15);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-otros-hint {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--rex-muted);
  line-height: 1.4;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-btn-inline {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Administración */
.modal-card--recibo-exp-v2 .recibo-exp-admin-grid {
  gap: 1rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-row {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-label {
  padding-top: 0;
  font-size: 0.84rem;
  color: var(--text);
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6.5rem, var(--rex-col-pct));
  gap: 0.45rem 0.55rem;
  align-items: center;
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-fields .recibo-exp-modo-wrap {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-fields .recibo-en-recibo {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-admin-fields--hon-contrato {
  display: block;
}

.modal-card--recibo-exp-v2 .rec-hon-contrato-panel {
  border-color: var(--border);
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
}

.modal-card--recibo-exp-v2 .rec-hon-contrato-panel__resumen {
  font-size: 0.88rem;
}

.modal-card--recibo-exp-v2 .rec-hon-contrato-panel__hint {
  font-size: 0.75rem;
}

.modal-card--recibo-exp-v2 .recibo-en-recibo__label {
  font-size: 0.72rem;
}

/* Bonificación */
.modal-card--recibo-exp-v2 .recibo-exp-v2-bono-block {
  margin-top: 0.35rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-desc-ln-container {
  gap: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-desc-ln-tipo-label {
  display: none;
}

/* Observaciones */
.modal-card--recibo-exp-v2 .recibo-exp-v2-obs-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--rex-muted);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-obs {
  margin-top: 0.35rem;
  width: 100%;
  resize: vertical;
}

/* Resumen lateral */
.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-title {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rex-muted);
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--rex-muted) !important;
  line-height: 1.45;
}

html.theme-f5 .modal-card--recibo-exp-v2 p.recibo-exp-v2-ctx-help,
html.theme-f5 .modal-card--recibo-exp-v2 .recibo-exp-v2-help-details-body {
  color: var(--muted) !important;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-list,
.modal-card--recibo-exp-v2 .recibo-exp-res-list.recibo-exp-v2-sum-list {
  margin: 0;
  padding: 0;
  padding-left: 0 !important;
  list-style: none;
  font-size: 0.8rem;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(186, 168, 142, 0.1);
  color: var(--rex-muted);
  line-height: 1.35;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-list li > span {
  flex: 1 1 6rem;
  min-width: 0;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-list strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-hint {
  font-size: 0.68rem;
  font-weight: normal;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-hero strong {
  color: #6ee7b7;
  font-size: 1.05rem;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-sum-hero strong {
  color: #15803d;
}

.modal-card--recibo-exp-v2 .recibo-exp-v2-sum-diff {
  margin: 0 !important;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: var(--rex-warn-bg);
  font-size: 0.72rem !important;
  color: #fcd34d !important;
  line-height: 1.4;
}

html:not(.theme-f10) .modal-card--recibo-exp-v2 .recibo-exp-v2-sum-diff {
  color: #b45309 !important;
}

/* Pie */
#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 .modal-actions {
  flex-shrink: 0;
  margin: 0;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--rex-border);
  background: rgba(36, 34, 32, 0.5);
}

#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 .modal-actions .btn-primary {
  border-color: rgba(196, 165, 116, 0.5);
  background: linear-gradient(180deg, #c9a86c, #a8864f);
  color: #1a1816;
  font-weight: 600;
}

#expensasServiciosModalBackdrop .modal-card--recibo-exp-v2 .modal-actions .btn:not(.btn-primary) {
  border-color: var(--rex-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.modal-card--recibo-exp-v2 .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Anular grillas legacy dentro del v2 */
.modal-card--recibo-exp-v2 .recibo-exp-srv-row.recibo-exp-v2-line {
  grid-template-columns: var(--rex-col-label) minmax(0, 1fr) auto;
}

.modal-card--recibo-exp-v2 .recibo-exp-srv-row.recibo-exp-v2-line--solo-monto {
  grid-template-columns: var(--rex-col-label) max-content auto;
}

@media (max-width: 900px) {
  .modal-card--recibo-exp-v2 .recibo-exp-v2-body {
    flex-direction: column !important;
  }

  .modal-card--recibo-exp-v2 .recibo-exp-v2-main {
    flex: 1 1 auto;
    min-height: 12rem;
  }

  #expensasServiciosModalBackdrop .recibo-exp-v2-aside {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--rex-border);
  }

  .modal-card--recibo-exp-v2 .recibo-exp-v2-line,
  .modal-card--recibo-exp-v2 .recibo-exp-srv-row.recibo-exp-v2-line {
    grid-template-columns: 1fr;
  }

  .modal-card--recibo-exp-v2 .recibo-exp-v2-line-label {
    grid-column: 1 / -1;
  }

  .modal-card--recibo-exp-v2 .recibo-exp-v2-line-fields {
    grid-template-columns: 1fr;
  }

  .modal-card--recibo-exp-v2 .recibo-exp-modo-wrap {
    justify-content: flex-start;
  }

  .modal-card--recibo-exp-v2 .recibo-exp-chips {
    flex-wrap: wrap;
  }
}

/* Confirmación al cerrar sin guardar (desglose expensas, ABM propietarios) — clase .modal-backdrop--recibo-exp-confirm */
.modal-backdrop--recibo-exp-confirm.modal-backdrop {
  z-index: 10295;
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm.modal-backdrop {
  background: rgba(20, 18, 17, 0.62);
  backdrop-filter: blur(6px);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm.modal-backdrop {
  background: rgba(15, 15, 18, 0.55);
  backdrop-filter: blur(4px);
}

.modal-backdrop--recibo-exp-confirm .modal-card--recibo-exp-confirm {
  max-width: min(92vw, 400px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

/* Evitar #fecaca global de .modal-card h3 / p */
.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body h3,
.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-lead {
  -webkit-text-fill-color: currentColor;
  background: none;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body {
  padding: 1.15rem 1.25rem 0.35rem;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top-width: 1px;
  border-top-style: solid;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9px;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  box-shadow: none;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--primary {
  order: 1;
  font-weight: 600;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--secondary {
  order: 2;
}

.modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--discard {
  order: 3;
  font-weight: 500;
}

/* Tema oscuro caramelo (theme-f10) — como .nd-modal y .modal-card--recibo-exp-v2 */
html.theme-f10 .modal-backdrop--recibo-exp-confirm .modal-card--recibo-exp-confirm {
  background: linear-gradient(165deg, #33302e 0%, var(--neo-base) 50%, var(--neo-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    12px 12px 26px var(--neo-d),
    -8px -8px 18px var(--neo-l),
    inset 1px 1px 0 rgba(255, 255, 255, 0.03);
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body h3 {
  background: linear-gradient(120deg, #f5f2ee 0%, #dccab0 45%, #a89274 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-lead {
  color: rgba(196, 188, 178, 0.9);
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-actions {
  border-top-color: rgba(255, 255, 255, 0.07);
  background: rgba(24, 22, 20, 0.45);
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--primary {
  border-color: rgba(196, 165, 116, 0.5);
  background: linear-gradient(180deg, #c9a86c, #a8864f);
  color: #1a1816;
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--secondary {
  border-color: rgba(186, 168, 142, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #e7e2db;
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(196, 165, 116, 0.4);
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--discard {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(69, 26, 26, 0.55);
  color: #fecaca;
}

html.theme-f10 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--discard:hover {
  background: rgba(127, 29, 29, 0.65);
  border-color: rgba(252, 165, 165, 0.45);
}

/* Tema claro (f5 / sin f10) — como .modal-card--recibo-exp claro */
html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .modal-card--recibo-exp-confirm {
  background: var(--panel-bg, #f5f2ee);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body h3,
html.theme-f5 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-body h3 {
  color: var(--text);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-lead,
html.theme-f5 .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-lead {
  color: var(--muted);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-actions {
  border-top-color: var(--border, rgba(0, 0, 0, 0.08));
  background: rgba(0, 0, 0, 0.025);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--primary {
  border-color: rgba(168, 134, 79, 0.55);
  background: linear-gradient(180deg, #d4b87a, #b89558);
  color: #1a1816;
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--primary:hover {
  filter: brightness(1.04);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--secondary {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--text);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--secondary:hover {
  background: #faf8f5;
  border-color: rgba(168, 134, 79, 0.35);
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--discard {
  border-color: rgba(185, 28, 28, 0.32);
  background: #fef2f2;
  color: #991b1b;
}

html:not(.theme-f10) .modal-backdrop--recibo-exp-confirm .recibo-exp-confirm-btn--discard:hover {
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.45);
}
