.modal-backdrop { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.72); display: grid; place-items: start center; padding: 28px; overflow-y: auto; }
.modal { width: min(980px, 100%); background: linear-gradient(180deg, #132235, #0d1826); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: 0 30px 120px rgba(0,0,0,.55); }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal__title { margin: 0; font-size: 20px; }
.modal__body { padding: 22px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px; border-top: 1px solid var(--line); }
.close-btn { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--soft); border-radius: 12px; width: 40px; height: 40px; }
.calculated-box { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.calc-item { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.035); }
.calc-item span { display: block; color: var(--muted); font-size: 12px; }
.calc-item strong { display: block; margin-top: 6px; font-size: 17px; }
.file-drop { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 16px; background: rgba(255,255,255,.035); }
.file-list { display: grid; gap: 8px; margin-top: 10px; }
.file-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.045); color: var(--soft); }

/* V20 — metálico simplificado */
.is-hidden { display: none !important; }
.field.is-disabled { opacity: .62; }
.field.is-disabled .switch { cursor: not-allowed; }
.field.is-disabled input { cursor: not-allowed; }
[data-cash-help] { display: block; margin-top: 7px; color: var(--yellow); line-height: 1.35; }

/* V41 — editor específico de nóminas */
.payroll-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(15,28,43,.72));
}
.payroll-editor.is-hidden { display: none !important; }
.payroll-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.payroll-editor__head > div { display: grid; gap: 4px; }
.payroll-editor__head strong { font-size: 16px; }
.payroll-editor__head small { color: var(--muted); line-height: 1.4; }
.payroll-editor__fields { margin: 0; }
.payroll-breakdown { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.payroll-editor__note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.18);
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .payroll-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-editor__head { flex-direction: column; }
}

/* V43 — perfil fiscal simple de proveedor */
.expense-tax-profile {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(96,165,250,.24);
  border-radius: 16px;
  background: rgba(59,130,246,.055);
}
.expense-tax-profile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.expense-tax-profile__head > div { display: grid; gap: 3px; }
.expense-tax-profile__head small { color: var(--muted); line-height: 1.35; }
.expense-tax-profile__fields { margin: 0; }
.expense-tax-profile__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.expense-tax-profile__summary span {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 12px;
}
.expense-tax-profile__summary strong { color: var(--text); font-size: 15px; }
.expense-tax-profile__note {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.035);
}
@media (max-width: 760px) {
  .expense-tax-profile__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-tax-profile__head { align-items: flex-start; }
}


/* V44 — IVA opcional en ingresos y modo sin IVA sin controles contradictorios */
.income-vat-profile {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(34,197,94,.24);
  border-radius: 16px;
  background: rgba(34,197,94,.05);
}
.income-vat-profile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.income-vat-profile__head > div { display: grid; gap: 3px; }
.income-vat-profile__head small { color: var(--muted); line-height: 1.35; }
.income-vat-profile__fields { margin: 0; }
.income-vat-profile__note {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.035);
}
@media (max-width: 760px) {
  .income-vat-profile__head { align-items: flex-start; }
}
